GHZ States
GHZ states are maximally entangled states of three or more qubits that give an all-or-nothing violation of local realism.
Multi-qubit entanglement
The Greenberger-Horne-Zeilinger (GHZ) state generalises the Bell state to three or more qubits. For three qubits it is (|000> + |111>)/sqrt(2): all qubits are 0 together or all are 1 together, in superposition.
Preparation
A GHZ state is built with one Hadamard and a chain of CNOTs. Apply H to the first qubit, then CNOT from qubit 1 to qubit 2, then CNOT from qubit 2 to qubit 3. Starting from |000> this yields (|000>+|111>)/sqrt(2). The pattern extends to any number of qubits.
import numpy as np
H=np.array([[1,1],[1,-1]])/np.sqrt(2); I=np.eye(2)
CNOT=np.array([[1,0,0,0],[0,1,0,0],[0,0,0,1],[0,0,1,0]])
s=np.kron(np.kron(H@np.array([1,0]),[1,0]),[1,0])
s=np.kron(CNOT,I)@s; s=np.kron(I,CNOT)@s
print(np.round(s,3)) # [.707 0 0 0 0 0 0 .707]
Fragility
GHZ states are maximally entangled but delicate: measuring or losing a single qubit collapses the whole state to a classical mixture. Tracing out one qubit of a GHZ state leaves the remaining pair unentangled. This contrasts with W states, whose entanglement is more robust to particle loss.
All-or-nothing nonlocality
GHZ states sharpen the argument against local realism. Where Bell inequalities are statistical, a suitable set of measurements on a GHZ state produces a contradiction with local hidden variables in a single run — the predictions differ deterministically, not just on average. This is the GHZ theorem, a stronger no-go than Bell's.
Uses
GHZ states are resources for multiparty protocols: quantum secret sharing, anonymous communication, and clock synchronisation. They also serve as benchmarks — preparing and verifying a high-fidelity GHZ state across many qubits is a standard test of a processor's entangling capability.