Predict the output
This circuit is sampled for 1024 shots on the seeded simulator (seed 1827). How many of the shots come out |010⟩? Estimate P(|010⟩) × 1024 and pick the closest option.
const c = circuit(3); c.h(0); c.cx(0, 1); c.cx(0, 2); // encode |+_L> c.x(1); // injected bit-flip error on qubit 1 // Decode: run the encoder backwards (CNOT is its own inverse). c.cx(0, 1); c.cx(0, 2); // Coherent majority correction: flip qubit 0 iff both partners say "1". c.ccx(2, 1, 0); return c;
Commit your prediction for counts of |010⟩ over 1024 shots — then run it.