Coherent Cooper-pair pumping by magnetic flux control