A method of copying a classical state of a first qubit to a second qubit, wherein the first qubit is a flux qubit comprising a loop of superconducting material interrupted by at least one Josephson junction and characterized by a potential energy configuration that comprises a first tunneling barrier, and the second qubit is a flux qubit comprising a loop of superconducting material interrupted by at least one Josephson junction and characterized by a potential energy configuration that comprises a first potential well, a second potential well, and a second tunneling barrier; the method comprising: lowering the second tunneling barrier by tuning a Josephson energy of the second qubit via an applied magnetic flux to bring the second qubit into a quantum regime where tunneling between the first potential well and the second potential well of the second qubit can occur; ferromagnetically or anti-ferromagnetically coupling the first qubit and the second qubit for a duration t by turning on a coupling device between the first qubit and the second qubit such that it is energetically favourable for a state of the second qubit to be, in case of ferromagnetic coupling, the same state of the first qubit or, in case of anti-ferromagnetic coupling, the opposite state of the first qubit, wherein, in the energetically favourable state of the second qubit, an overall energy of the coupled first qubit and second qubit is reduced; and raising the second tunneling barrier by tuning the Josephson energy of the second qubit via an applied magnetic flux to bring the second qubit into a classical regime where tunneling between the first potential well and the second potential well of the second qubit is prevented, wherein, in case of anti-ferromagnetic coupling, the steps of lowering, coupling and raising are performed an even number of times, or the opposite state of the second qubit is compensated by post-processing. lowering the second tunneling barrier by tuning a Josephson energy of the second qubit via an applied magnetic flux to bring the second qubit into a quantum regime where tunneling between the first potential well and the second potential well of the second qubit can occur; ferromagnetically or anti-ferromagnetically coupling the first qubit and the second qubit for a duration t by turning on a coupling device between the first qubit and the second qubit such that it is energetically favourable for a state of the second qubit to be, in case of ferromagnetic coupling, the same state of the first qubit or, in case of anti-ferromagnetic coupling, the opposite state of the first qubit, wherein, in the energetically favourable state of the second qubit, an overall energy of the coupled first qubit and second qubit is reduced; and raising the second tunneling barrier by tuning the Josephson energy of the second qubit via an applied magnetic flux to bring the second qubit into a classical regime where tunneling between the first potential well and the second potential well of the second qubit is prevented, wherein, in case of anti-ferromagnetic coupling, the steps of lowering, coupling and raising are performed an even number of times, or the opposite state of the second qubit is compensated by post-processing.