|q⟩ Bad Qubits

advanced · Programming · Quantum Sensing & Metrology

Checkpoint: Beat the Standard Limit

Time to put the whole module together. You will build a complete entangled-probe sensing protocol and watch it resolve a phase twice as fast as the single-qubit probe from the standard-quantum-limit lesson — a direct, measurable demonstration of beating the SQL.

The protocol

The 2-qubit GHZ Ramsey protocol has four stages:

  1. Prepare the GHZ probe GHZ2=(00+11)/2|\mathrm{GHZ}_2\rangle = (|00\rangle + |11\rangle)/\sqrt2 with HH then CX(0,1)\mathrm{CX}(0,1).
  2. Encode the phase by applying P(θ)P(\theta) to both qubits. The two branches separate by the amplified phase 2θ2\theta: GHZ200+e2iθ112.|\mathrm{GHZ}_2\rangle \to \frac{|00\rangle + e^{2i\theta}|11\rangle}{\sqrt2}.
  3. Decode by reversing the entangler — CX(0,1)\mathrm{CX}(0,1) then H(0)H(0) — which disentangles the pair and maps the amplified relative phase onto qubit 0 alone, returning qubit 1 to 0|0\rangle.
  4. Measure.

The amplified fringe

Working the decode through, the population of qubit 0 oscillates as

p1(q0)(θ)=1cos(2θ)2.p_1^{(q_0)}(\theta) = \frac{1 - \cos(2\theta)}{2}.

Compare this with the single-qubit Ramsey fringe p1=(1cosθ)/2p_1 = (1-\cos\theta)/2 from Lesson 2. The GHZ probe oscillates at twice the rate — its slope θp1=sin(2θ)\partial_\theta p_1 = \sin(2\theta) is doubled, so the same phase error produces twice the change in counts. That doubled slope is precisely the N=2N = 2 factor in the 1/N1/N Heisenberg scaling.

The headline comparison

In the SQL lesson a single-qubit probe at θ=π/3\theta = \pi/3 gave outcome 1 with probability 0.250.25. Here, with the entangled probe, you reach the same 0.250.25 signal at only θ=π/6\theta = \pi/6half the phase — because 2θ=π/32\theta = \pi/3 does the work. The entangled probe extracts the same information from a smaller phase, which is exactly what "more precise" means.

Try it

Implement the full four-stage protocol at θ=π/6\theta = \pi/6 and measure both qubits. The grader checks the exact distribution: 0.750.75 on outcome 00 and 0.250.25 on outcome 10, with the other two outcomes at 00. Getting this right means you have built — and beaten the SQL with — an entangled quantum sensor.

Run your code to see the quantum state.

Sign in on the full site to ask questions and join the discussion.