Capstone: Design Your Own Demo
Every project in this module focused on one idea at a time: a Hadamard for randomness, a CNOT for entanglement, a rotation for bias. A real quantum demo rarely uses just one idea. This capstone asks you to combine them all in a single circuit — the GHZ state, named after Greenberger, Horne, and Zeilinger, who used it to give the most striking proof that quantum correlations are incompatible with any classical hidden-variable theory.
What the GHZ state is
The three-qubit GHZ state is defined as
It is a superposition of two perfectly opposite outcomes. If all three qubits are measured in the
computational basis, the result is always either 000 or 111, each with probability
— just like a quantum coin flip. But unlike the single-qubit coin flip, the three outcomes are
maximally correlated: every qubit agrees with every other qubit on every single shot.
The individual qubits, viewed in isolation, look completely random — qubit 0 alone is in an equal mixture of and . The correlations live in the joint state, not in any one qubit separately.
Building it step by step
Start with all three qubits in . Apply a Hadamard to qubit 0:
Now apply a CNOT with control 0 and target 1. The CNOT flips qubit 1 whenever qubit 0 is :
Finally, apply a second CNOT with control 0 and target 2. Qubit 0 is still in the second term, so it flips qubit 2 as well:
Three gates — , , — and the GHZ state is ready.
Why this is the right capstone
Each gate in the GHZ circuit plays a role you have seen individually in this module:
- The Hadamard is the quantum coin flip from the first project — it seeds the randomness.
- The CNOT is the entangling gate from the Bell pair projects — it spreads the superposition.
- The result combines into a multi-qubit state whose measurement statistics require the Born rule applied to a joint state, just as in the multi-qubit RNG project.
Checking the state vector directly (no measurement needed) also illustrates something deeper: the grader verifies that your circuit implements the correct operation, not just a distribution that happens to look right. A circuit that measures during preparation, or uses the wrong gate sequence, will produce a different state vector and fail even if its output looks similar at first glance.
Try it
Prepare the GHZ state on three qubits. The grader compares the full state vector, so every amplitude must be correct — on and on , zero everywhere else.
After running, check the State Vector panel. You should see exactly two non-zero amplitudes:
on 000 and on 111. That pattern — a superposition of the two
fully-correlated extremes — is the signature of the GHZ state and the culmination of everything you
have built in this beginner track.
Sign in on the full site to ask questions and join the discussion.