Predict the output
Sampling this circuit 1024 times on the seeded simulator (seed 2850), how many shots land on |000⟩? Estimate P(|000⟩) × 1024 and pick the closest option.
const c = circuit(3); c.x(2); // start at position 1 = |01> // (a) coin toss c.h(0); // (b) conditional shift // decrement when coin = |0> c.x(0); c.cx(0, 2); c.ccx(0, 2, 1); c.x(0); // increment when coin = |1> c.ccx(0, 2, 1); c.cx(0, 2); c.measure(); return c;
Commit your prediction for counts of |000⟩ over 1024 shots — then run it.