Skip to main content
Problem List
Q89.Decode the Bit-Flip CodeMedium

Q89.Decode the Bit-Flip Code

Error CorrectionQubits: 3Q
Encode ∣+⟩|+\rangle, let an XX error hit Qubit 2, and run the encoder backwards. The data qubit is restored and the other two qubits show the syndrome 10: ∣1⟩q2∣0⟩q1∣+⟩q0|1\rangle_{q_2}|0\rangle_{q_1}|{+}\rangle_{q_0}.
Target Objective:
Apply HH, CNOT(0→1), CNOT(0→2), then XX on Qubit 2, then CNOT(0→1) and CNOT(0→2) again.
Judge Acceptance Criteria:

Statevector fidelity must reach ≥ 99.9% with the target unitary solution.

Gates:
q[0]|0⟩
S0
S1
S2
S3
S4
S5
S6
S7
q[1]|0⟩
S0
S1
S2
S3
S4
S5
S6
S7
q[2]|0⟩
S0
S1
S2
S3
S4
S5
S6
S7
Live Python / Qiskit Code (Edit to Update Circuit)
 
Type Qiskit Python code above to update gates on wires automatically0 gates · 3Q
0 gates placed3 Qubits · 8 Steps
State Measurement Distribution:8 non-zero basis states
|100⟩0.0%
|101⟩0.0%
|110⟩0.0%
|111⟩0.0%
|000⟩100.0%
|001⟩0.0%
|010⟩0.0%
|011⟩0.0%