deltakit.explorer.codes.UnrotatedPlanarCode.calculate_number_of_logical_qubits#

UnrotatedPlanarCode.calculate_number_of_logical_qubits() int#

Calculate the maximum number of logical qubits that are encoded into the code by subtracting the rank of Hx and Hz parity matrices from the number of (data) qubits.

Note: this might not agree with the number of logicals that the user specified when initialising the CSSCode instance.