1. A method for performing a quantum error correction comprising: performing an error correction on each of a plurality of qubit sets to restore a desired basis state of the qubit set, each qubit set corresponding to an associated logical qubit of a plurality of logical qubits; recording a number of corrected qubits at each of the plurality of qubit sets; determining a first set of the plurality of logical qubits having a first state and a second set of the plurality of logical qubits having a second state; and correcting one of the first set of logical qubits and the second set of logical qubits according to the recorded numbers of corrected qubits.