Algorithm guide · games
GHZ game
Three separated players use local measurements to win every ideal round. Classical strategies win at most 75% across uniform questions.
Circuit size: 3 qubits
GHZ state · X and Y measurement · Parity constraints
Review quantum fundamentals →Notation used in this lesson
- |ψ⟩ and ⟨ψ|
- A state vector (ket) and its conjugate transpose (bra). ⟨a|b⟩ is their inner product.
- α, β and i
- α and β are complex amplitudes; i²=−1. A probability is the squared magnitude |α|².
- XOR, · and ⊗
- XOR adds bits modulo two. In s·x, multiply corresponding bits and XOR them. ⊗ combines registers or operations on different wires.
- U†, Σ and Tr
- U† is the adjoint (inverse for a unitary). Σ sums terms. Tr is the matrix trace, the sum of diagonal entries.
- Probability, shots and angles
- Ideal probabilities describe the model; measured shot frequencies fluctuate. Angles inside trigonometric expressions are in radians unless explicitly labeled turns.
1. The problem
Three separated players receive promised question bits ABC∈{000,011,101,110}. They must output bits with even parity for 000 and odd parity for the other questions, without communicating after receiving them.
2. How it works
GHZ correlations have definite products for XXX and for the three XYY permutations. No assignment of predetermined local X and Y answers can have all four required products, but the quantum observables can.
Prepare
Share GHZ+ before the local questions.
Select basis
Question 0 means X measurement; question 1 means Y.
Measure locally
X uses H before Z readout; Y uses S† then H.
Score
XOR the three answer bits and compare with the question’s target parity.
3. The mathematics, one idea at a time
YXY and YYX also have eigenvalue −1. A measured bit b corresponds to sign (−1)^b.
This is the bit form of the required product signs.
XORing four predetermined parity equations repeats every local answer twice on the left, giving zero, but gives one on the right.
Work this through by hand
4. All players receive question 0
Three qubits, one per player, is the fixed GHZ resource.
Select ABC=000 (XXX).
| Stage | Calculation or state | What it means |
|---|---|---|
| Prepare resource | (|000⟩+|111⟩)/√2 | The players share the state before questions arrive. |
| Measure X on all | H⊗H⊗H before Z readout | Only even-parity strings survive interference. |
| Possible answers | 000,011,101,110 | Each has probability 1/4 and wins. |
Expected outcomes for this example
These are ideal predictions for the stated configuration, not a result already measured by your browser. Rows describing alternative modes or combined events are labeled explicitly.
| Outcome or event | Ideal probability | Interpretation |
|---|---|---|
| 000,011,101,110 | 25% each ideally | All have even parity. |
5. Load the worked example in Composer
The worked example can use smaller or simpler inputs than the gallery defaults. The button below loads the exact circuit used in this lesson.
Selected variant: GHZ game · ABC 000 · XXX
- Save any current circuit you want to keep, then open the worked example. Loading it does not execute a paid hardware job.
- Trace the preparation, main operations and measurements against the worked table. Check the gate editor for controls, targets and angles.
- Start with an ideal noiseless simulator compatible with the circuit. Mid-circuit measurement, reset and feed-forward require support from the chosen backend.
- Inspect the live preview. For a recorded experiment, open Execute, set the available backend options and shots, and Run. Sign in when prompted to retain it in My Jobs.
- Read the output as described below before changing one setting and repeating. The guide describes the original example; edits can change the answer.
6. Read the output correctly
c2c1c0 reads Alice, Bob, Charlie. The win summary evaluates parity, not whether one particular string appears.
For ABC=011, switch to XYY and expect odd-parity answers instead. Test all four promised questions to discuss the 75% classical bound.
A bit label is a register value; its bar height is a probability or count. For S shots and observed count k, the sampled frequency is k/S. A typical sampling scale for probability p is √[p(1−p)/S]; this is not a strict error bound. Finite samples do not have to match the ideal percentages exactly.
7. Common mistakes & limits
- A single fixed question can be won classically too; the separation concerns the full uniform promised-question game.
- No participant receives everyone else’s measurement results during the round.
8. Check your understanding
Is answer 101 a win for question 011?
Reveal the reasoning
No. 1 XOR 0 XOR 1=0, but question 011 requires parity one.
9. Further study
The lesson’s register mappings, supported inputs and loadable example follow Quantket’s implemented circuit. A reference may use different wire names, bit order or resource conventions.
Gallery reference: defaults, definitions & implementation notes
Available example inputs
Choose a named circuit variant in Algorithms. Each variant fixes its preparation, operations and measurement mapping; the worked variant above is one of them.
- GHZ game · ABC 000 · XXX
- GHZ game · ABC 011 · XYY
- GHZ game · ABC 101 · YXY
- GHZ game · ABC 110 · YYX
Implementation notes
The referee uniformly chooses ABC = 000, 011, 101 or 110. Win if answer parity is 0 for 000 and 1 otherwise. No communication is allowed after receiving local questions. Everyone always answering 1 wins three settings and loses 000. XORing all four required parity equations gives 0 = 1, so no deterministic local strategy wins all four; shared randomness cannot improve the 75% average bound. The ideal GHZ strategy wins 100%. A single selected question does not test this uniform-game bound. Classical bits shows measured wins and losses for that setting.
Read your saved result
Check the submitted circuit, measured register and execution settings in Run details. Exact results give computed probabilities; sampled results show frequencies from the recorded shots. Edited circuits and noise can change the expected outcome. The algorithm label records the circuit's origin; it does not certify an edited circuit or a measured result.