An entangled state of three photons in a superposition, either with all horizontally polarized (

) or with all vertically polarized (

), is known as a Greenberger–Horne–Zeilinger (GHZ) state [1, 2]. It is represented by the state vector

. A measurement on any one of the photons, using a two-channel polarizer, would give 50% probability for either

or

. Measurements on the other two photons would then be found to show the same polarization. In the canonical GHZ experiment, measurements are performed on the three entangled photons using two-channel polarizers

,

and

set to orientations different from the original

and

, which we denote by

and

. The

polarizations are at angles of

with respect to the original polarizations, such that

. The

polarizations are left and right circular polarizations, represented by

. The polarization detectors are set in one of four possible combinations:

,

,

or

. We use binary notation, 0 and 1, to label the two possible polarizations for either the

or

orientation. For the

,

or

configuration, we observe four equally probable results, which we designate 001, 010, 001 and 111. For

, we again observe four equally probable results, but now 000, 011, 101 or 110. In all of these cases, any two detector readings, say those of

and

, unambiguously determine the reading of

. For example, for configuration

, if the first two detectors read 01 or 10, the third would then show 0.

In this Demonstration, a GHZ experiment is simulated using a three-qubit quantum computer [3]. The GHZ state

is produced by a circuit using one Hadamard (

) and two CNOT gates. The polarization detectors are simulated by a combination of

and

gates. The output state, for example,

, implies that the final bit measurements give the results 001, 010, 100 and 111 with equal probability. Also shown is an illustration of Mermin's Gedankenexperiment [4], which is a simplification of the actual GHZ experiment. The results shown are those corresponding to local realism, with the selected "presets," which can be compared with the quantum-mechanics results.

The results of all reproducible experiments agree with the predictions of quantum mechanics and are contrary to those of

*local realism,* which would entail the existence of hidden variables. According to local realism, each photon would be presumed to carry an "instruction set" that determines, in advance, its polarization in any

or

measurement. The result that any two readings unambiguously determine the third itself negates the possibility of local realism, since the third photon cannot "communicate" with the other two once they leave the source. The failure of local realism is shown in the references, using more tediously detailed arguments. In contrast to Bell's inequalities, in which this conclusion is reached by statistical analysis of a multitude of experimental results, the GHZ experiment requires only a single run.