Relative phase is invisible to a single direct measurement, yet it is one of the most important quantities in quantum computing. This simulator dials the phase of an equal superposition around the Bloch-sphere equator, then applies a second Hadamard gate to reveal exactly how that hidden phase turns into a real probability difference.
• A phase slider sweeping phi from 0 to 360 degrees on the equator of the Bloch sphere. • Live labeled reference points for |+>, |->, |+i> and |-i>. • A one-click action applying a second Hadamard gate and reporting the resulting measurement probabilities. • Before/after probability comparison showing 50/50 pre-Hadamard regardless of phi, contrasted with the post-Hadamard result that depends entirely on phi.
• Set phi to 0 degrees, apply the second Hadamard, and confirm P(0) reaches 100% — fully constructive interference. • Set phi to 180 degrees and confirm P(0) drops to 0% — fully destructive interference. • Sweep phi continuously and watch P(0) trace a smooth cosine-squared curve between those two extremes.
Because a plain measurement cannot see phase directly, algorithms that want to use it have to first encode useful information into phase and then design a sequence of gates that converts that phase difference into a probability difference — exactly the pattern reproduced here in miniature. This is the same principle behind phase estimation and many of the specific speedups quantum algorithms achieve over classical ones.
It does not affect a single direct measurement of that qubit alone, but it fully determines what happens when the qubit later passes through another gate that recombines its amplitudes, such as a second Hadamard gate. At that point the phase becomes a real, measurable difference in outcome probabilities.
Global phase multiplies both amplitudes by the same factor and is never observable by any experiment. Relative phase is the phase difference between the |0> and |1> amplitudes specifically, and while it is invisible to a direct measurement, it is physically real and becomes visible through interference.
At phi = 0 degrees the two amplitude paths reinforce fully, giving P(0) = 100% after the second Hadamard. At phi = 180 degrees they cancel fully, giving P(0) = 0% (certain to measure 1) — the exact constructive and destructive interference cases explored further in the Quantum Interference lab.
Yes, in essence. Quantum phase estimation encodes information into exactly this kind of relative phase and then uses interference, via controlled operations and an inverse Fourier transform, to read that hidden phase back out as a measurable result — the same "hide it in phase, reveal it with interference" principle shown here in its simplest form.