|q⟩ Bad Qubits

← Question Bank

Multiple choice
Run this circuit, then measure. With what probability do you get |101⟩?
⚛ The apparatus
const c = circuit(3);
c.x(2);
c.h(0); c.h(1);
c.cz(1, 2);
// 2-qubit IQFT on q0, q1:
// IQFT = SWAP then H(q1) then CP(-π/2, q0, q1) then H(q0)
c.swap(0, 1);
c.h(1);
c.cp(-Math.PI / 2, 0, 1);
c.h(0);
c.measure();
return c;

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