Predict the output
On the seeded simulator (seed 1366), this circuit runs for 1024 shots. About how many come out |001⟩? Estimate P(|001⟩) × 1024 and pick the closest option.
const c = circuit(3); // 1. Encode |+_L>. c.h(0); c.cx(0, 1); c.cx(0, 2); // 2. Inject an X error on qubit 2. c.x(2); // 3. Decode (CNOT is self-inverse). c.cx(0, 1); c.cx(0, 2); // 4. Coherent majority correction onto the data qubit. c.ccx(2, 1, 0); return c;
Commit your prediction for counts of |001⟩ over 1024 shots — then run it.