- class RepetitionCode(d, T=0, xbasis=False, resets=False, delay=0)¶
Implementation of a distance d repetition code, implemented over T syndrome measurement rounds.
Creates the circuits corresponding to a logical 0 and 1 encoded using a repetition code.
d (int) – Number of code qubits (and hence repetitions) used.
T (int) – Number of rounds of ancilla-assisted syndrome measurement.
xbasis (bool) – Whether to use the X basis to use for encoding (Z basis used by default).
resets (bool) – Whether to include a reset gate after mid-circuit measurements.
delay (float) – Time (in dt) to delay after mid-circuit measurements (and delay).
- Additional information:
No measurements are added to the circuit if T=0. Otherwise T rounds are added, followed by measurement of the code qubits (corresponding to a logical measurement and final syndrome measurement round).
self.circuit as a list, with
- param raw_results
A dictionary whose keys are logical values,
Readout of all code qubits, which corresponds to a logical measurement as well as allowing for a measurement of the syndrome to be inferred.
Application of a syndrome measurement round.
Applies a logical x to the circuits for the given logical values.