Implementation of the [[7,1,3]] Steane quantum error correcting code in Qiskit. Includes examples showing how the Steane code can correct any single-qubit error, and also how the probablility of data corruption depends on the probability of any single-qubit error occuring.
Returns:
- a QuantumCircuit which prepares the logical state
$|x_L\rangle$ from an initial state$|x000000\rangle$
Parameters:
- s - a Pauli string, i.e. a string from the alphabet {'I','X','Z'}.
Returns:
- a QuantumCircuit implementing the operation corresponding to s.
Parameters:
- p_strings - an array of Pauli strings.
Returns:
- a QuantumCircuit which stores the syndromes corresponding to inputted Pauli strings in an ancilla register.
Returns:
- a QuantumCircuit with 7 qubits and 6 classical bits, which interprets the classical bits as syndrome measurements from the Steane code and applies the appropriate quantum gates to correct the error.
Returns:
- a QuantumCircuit which prepares logical zero state, applies a random error to a single random qubit, extracts and measures syndromes, corrects the error and decodes the resulting state.
Parameters:
- x - an integer, assumed to be 0 or 1
- p - a real number in the interval [0,1]
Returns:
- a QuantumCircuit which prepares the logical state
$|x\rangle$ , applies with equal probabilities$p/3$ an X, Y, or Z error to each qubit, extracts and measures syndromes, corrects the error and decodes the resulting state