|q⟩ Bad Qubits

← Question Bank

Multiple choice
After running this circuit, what is the probability of measuring |010⟩?
⚛ The apparatus
// Step 1: put qubit 0 into an equal superposition.
const c = circuit(3);
c.h(0);
// After h(0): (1/sqrt(2))(|000> + |100>)
// Step 2: flip q1 when q0=0 (zero-controlled CNOT on q1).
//   Wrap CX(0->1) between two X(0) gates.
c.x(0);
c.cx(0, 1);
c.x(0);
// After this block: (1/sqrt(2))(|010> + |100>)
// Step 3: flip q2 when q0=1 (standard CNOT).
c.cx(0, 2);
// After cx(0,2): (1/sqrt(2))(|010> + |101>)
return c;

Commit your prediction for P(|010⟩) — then run it.