# GHZ experiment

The Greenberger–Horne–Zeilinger experiment or GHZ experiments are a class of physics experiments that can be used to generate starkly contrasting predictions from local hidden-variable theory and quantum mechanical theory, and permit immediate comparison with actual experimental results. A GHZ experiment is similar to a test of Bell's inequality, except using three or more entangled particles, rather than two. With specific settings of GHZ experiments, it is possible to demonstrate absolute contradictions between the predictions of local hidden variable theory and those of quantum mechanics, whereas tests of Bell's inequality only demonstrate contradictions of a statistical nature. The results of actual GHZ experiments agree with the predictions of quantum mechanics.
The GHZ experiments are named for Daniel M. Greenberger, Michael A. Horne, and Anton Zeilinger (GHZ) who first analyzed in 1990 certain measurements involving four observers and who subsequently (together with Abner Shimony (GHSZ), upon a suggestion by David Mermin) applied their arguments to certain measurements involving three observers.

## Summary description and example

A GHZ experiment is performed using a quantum system in a Greenberger–Horne–Zeilinger state. An example of a GHZ state is three photons in an entangled state, with the photons being in a superposition of being all horizontally polarized (HHH) or all vertically polarized (VVV), with respect to some coordinate system. The GHZ state can be written in bra–ket notation as
    $|\mathrm {GHZ} \rangle ={\frac {1}{\sqrt {2}}}(|\mathrm {HHH} \rangle +|\mathrm {VVV} \rangle ).$
Prior to any measurements being made, the polarizations of the photons are indeterminate. If a measurement is made on one of the photons using a two-channel polarizer aligned with the axes of the coordinate system, each orientation will be observed, with 50% probability. Which ever polarization is observed first will be seen in the two other observations.
In a GHZ experiment regarding photon polarization, however, two other orientations of two-channel polarizers are used to measure the photons:
* A linear polarizer rotated by 45° from the axes of the coordinate system, which distinguishes between a polarization rotated 45° clockwise from horizontal (+) and a polarization rotated 45° counterclockwise from horizontal (−).
* A circular polarizer, which distinguishes between right-handed polarization (R) and left-handed polarization (L).
When specific combinations of those two types of measurements are performed on each of the three entangled photons, perfect (rather than statistical) correlations between the three polarizations are predicted by quantum mechanics. For example, when the circular polarizer is used on photons 1 and 2, and the 45° linear polarizer is used on photon 3, the only four possible result combinations (out of $2^{3}=8$ total) are as follows:
    RL+, LR+, RR−, LL−.
Such a correlation is perfect in the sense that knowing two of the measurement results allows one to predict the third with certainty. (Of course, real experiments will have a small amount of error.)
A local hidden variable theory (aka "local realism") can also explain any one of those correlations in isolation by postulating that each photon has local variables that perfectly dictate what the result for each type of measurement should be. However, when different measurement combinations are simultaneously considered, the predictions of a local hidden variable theory will necessarily contradict those of quantum mechanics. In particular, given that when using the circular polarizer on any two photons and the 45° linear polarizer on the third photon, the possible result combinations are the four mentioned above, a local hidden variable theory must predict that when using the 45° linear polarizer on all three photons, the possible result combinations should be:
However, quantum mechanics predict that exactly the other four result combinations should be possible. The results of actual experiments agree with the predictions of quantum mechanics, not those of local realism.
Zeilinger was awarded the (shared) 2022 Nobel Prize in physics for his contributions to understand quantum entanglement.

## Quantum computation explanation

In the language of quantum computation, the polarization state of each photon is a qubit, the basis of which can be chosen to be
    $|0\rangle \equiv |\mathrm {H} \rangle ,\qquad |1\rangle \equiv |\mathrm {V} \rangle .$
With appropriately chosen phase factors for $|\mathrm {H} \rangle$ and $|\mathrm {V} \rangle$, both types of measurements used in the experiment becomes Pauli measurements, with the two possible results represented as +1 and −1 respectively:
* The 45° linear polarizer implements a Pauli $X$ measurement, distinguishing between the eigenstates
    $|{+X}\rangle \equiv |+\rangle ={\frac {1}{\sqrt {2}}}(|\mathrm {H} \rangle +|\mathrm {V} \rangle ),\qquad |{-X}\rangle \equiv |-\rangle ={\frac {1}{\sqrt {2}}}(|\mathrm {H} \rangle -|\mathrm {V} \rangle ).$
* The circular polarizer implements a Pauli $Y$ measurement, distinguishing between the eigenstates
    $|{+Y}\rangle \equiv |R\rangle ={\frac {1}{\sqrt {2}}}(|\mathrm {H} \rangle +i|\mathrm {V} \rangle ),\qquad |{-Y}\rangle \equiv |L\rangle ={\frac {1}{\sqrt {2}}}(|\mathrm {H} \rangle -i|\mathrm {V} \rangle ).$
A combination of those measurements on each of the three qubits can be regarded as a destructive multi-qubit Pauli measurement, the result of which being the product of each single-qubit Pauli measurement. For example, the combination "circular polarizer on photons 1 and 2, 45° linear polarizer on photon 3" corresponds to a $Y_{1}Y_{2}X_{3}$ measurement, and the four possible result combinations (RL+, LR+, RR−, LL−) are exactly the ones corresponding to an overall result of −1.
The quantum mechanical predictions of the GHZ experiment can then be summarized as
    $\langle \mathrm {GHZ} |Y_{1}Y_{2}X_{3}|\mathrm {GHZ} \rangle =\langle \mathrm {GHZ} |Y_{1}X_{2}Y_{3}|\mathrm {GHZ} \rangle =\langle \mathrm {GHZ} |X_{1}Y_{2}Y_{3}|\mathrm {GHZ} \rangle =-1,$
    $\langle \mathrm {GHZ} |X_{1}X_{2}X_{3}|\mathrm {GHZ} \rangle =+1,$
which is consistent in quantum mechanics because all these multi-qubit Paulis commute with each other, and
    $Y_{1}Y_{2}X_{3}\cdot Y_{1}X_{2}Y_{3}\cdot X_{1}Y_{2}Y_{3}\cdot X_{1}X_{2}X_{3}=-1$
due to the anticommutativity between $X$ and $Y$.
These results lead to a contradiction in any local hidden variable theory, where each measurement must have definite (classical) values $x_{i},y_{i}=\pm 1$ determined by hidden variables, because
    $y_{1}y_{2}x_{3}\cdot y_{1}x_{2}y_{3}\cdot x_{1}y_{2}y_{3}\cdot x_{1}x_{2}x_{3}=x_{1}^{2}x_{2}^{2}x_{3}^{2}y_{1}^{2}y_{2}^{2}y_{3}^{2}$
must equal +1, not −1.

## Detailed technical example
### Preliminary considerations

Frequently considered cases of GHZ experiments are concerned with observations obtained by three measurements, A, B, and C, each of which detects one signal at a time in one of two distinct mutually exclusive outcomes (called channels): for instance A detecting and counting a signal either as (A↑) or as (A↓), B detecting and counting a signal either as (B ≪) or as (B ≫), and C detecting and counting a signal either as (C ◊) or as (C ♦).
Signals are to be considered and counted only if A, B, and C detect them trial-by-trial together; i.e. for any one signal which has been detected by A in one particular trial, B must have detected precisely one signal in the same trial, and C must have detected precisely one signal in the same trial; and vice versa.
For any one particular trial it may be consequently distinguished and counted whether
* A detected a signal as (A↑) and not as (A↓), with corresponding counts n$_t$(A↑) = 1 and n$_t$(A↓) = 0, in this particular trial t, or
* A detected a signal as (A↓) and not as (A↑), with corresponding counts n$_f$ (A↑) = 0 and n$_f$(A↓) = 1, in this particular trial f, where trials f and t are evidently distinct;
similarly, it can be distinguished and counted whether
* B detected a signal as (B ≪) and not as (B ≫), with corresponding counts n$_g$(B ≪) = 1 and n$_g$(B ≫) = 0, in this particular trial g, or
* B detected a signal as (B ≫) and not as (B ≪), with corresponding counts n$_h$(B «) = 0 and n$_h$(B ≫) = 1, in this particular trial h, where trials g and h are evidently distinct;
and correspondingly, it can be distinguished and counted whether
* C detected a signal as (C ◊) and not as (C ♦), with corresponding counts n$_l$(C ◊) = 1 and n$_l$(C ♦) = 0, in this particular trial l, or
* C detected a signal as (C ♦) and not as (C ◊), with corresponding counts n$_m$(C ◊) = 0 and n$_m$(C ♦) = 1, in this particular trial m, where trials l and m are evidently distinct.
For any one trial j it may be consequently distinguished in which particular channels signals were detected and counted by A, B, and C together, in this particular trial j; and correlation numbers such as
    $p_{(\mathrm {A} \uparrow )(B\ll )(C\lozenge )}(j)=[n_{j}(\mathrm {A} \uparrow )-n_{j}(\mathrm {A} \downarrow )][n_{j}(\mathrm {B} \ll )-n_{j}(\mathrm {B} \gg )][n_{j}(\mathrm {C} \;\lozenge )-n_{j}(\mathrm {C} \;\blacklozenge )]$
can be evaluated in each trial.
Following an argument by John Stewart Bell, each trial is now characterized by particular individual adjustable apparatus parameters, or settings of the observers involved. There are (at least) two distinguishable settings being considered for each, namely A's settings a$_1$, and a$_2$, B's settings b$_1$, and b$_2$, and C's settings c$_1$, and c$_2$.
Trial s for instance would be characterized by A's setting a$_2$, B's setting b$_2$, and C's settings c$_2$; another trial, r, would be characterized by A's setting a$_2$, B's setting b$_2$, and C's settings c$_1$, and so on. (Since C's settings are distinct between trials r and s, therefore these two trials are distinct.)
Correspondingly, the correlation number p$_{(A↑)(B≪)(C◊)}$(s) is written as p$_{(A↑)(B≪)(C◊)}$(a$_2$,b$_2$,c$_2$), the correlation number p$_{(A↑)(B≪)(C◊)}$(r) is written as p$_{(A↑)(B≪)(C◊)}$(a$_2$,b$_2$,c$_1$) and so on.
Further, as Greenberger, Horne, Zeilinger and collaborators demonstrate in detail, the following four distinct trials, with their various separate detector counts and with suitably identified settings, may be considered and be found experimentally:
* trial s as shown above, characterized by the settings a$_2$, b$_2$, and c$_2$, and with detector counts such that
    $p_{(\mathrm {A} \uparrow )(\mathrm {B} \ll )(\mathrm {C} \lozenge )}(s)=[n_{s}(\mathrm {A} \uparrow )-n_{s}(\mathrm {A} \downarrow )][n_{s}(\mathrm {B} \ll )-n_{s}(\mathrm {B} \gg )][n_{s}(\mathrm {C} \;\lozenge )-n_{s}(\mathrm {C} \;\blacklozenge )]=-1,$
* trial u with settings a$_2$, b$_1$, and c$_1$, and with detector counts such that
    $p_{(\mathrm {A} \uparrow )(\mathrm {B} \ll )(\mathrm {C} \lozenge )}(u)=[n_{u}(\mathrm {A} \uparrow )-n_{u}(\mathrm {A} \downarrow )][n_{u}(\mathrm {B} \ll )-n_{u}(\mathrm {B} \gg )][n_{u}(\mathrm {C} \;\lozenge )-n_{u}(\mathrm {C} \;\blacklozenge )]=1,$
* trial v with settings a$_1$, b$_2$, and c$_1$, and with detector counts such that
    $p_{(\mathrm {A} \uparrow )(\mathrm {B} \ll )(\mathrm {C} \lozenge )}(v)=[n_{v}(\mathrm {A} \uparrow )-n_{v}(\mathrm {A} \downarrow )][n_{v}(\mathrm {B} \ll )-n_{v}(\mathrm {B} \gg )][n_{v}(\mathrm {C} \;\lozenge )-n_{v}(\mathrm {C} \;\blacklozenge )]=1,$ and
* trial w with settings a$_1$, b$_1$, and c$_2$, and with detector counts such that
    $p_{(\mathrm {A} \uparrow )(\mathrm {B} \ll )(\mathrm {C} \lozenge )}(w)=[n_{w}(\mathrm {A} \uparrow )-n_{w}(\mathrm {A} \downarrow )][n_{w}(\mathrm {B} \ll )-n_{w}(\mathrm {B} \gg )][n_{w}(\mathrm {C} \;\lozenge )-n_{w}(\mathrm {C} \;\blacklozenge )]=1.$
The notion of local hidden variables is now introduced by considering the following question:
Can the individual detection outcomes and corresponding counts as obtained by any one observer, e.g. the numbers (n$_j$(A↑) − n$_j$(A↓)), be expressed as a function A(a$_x$, λ) (which necessarily assumes the values +1 or −1), i.e. as a function only of the setting of this observer in this trial, and of one other hidden parameter λ, but without an explicit dependence on settings or outcomes concerning the other observers (who are considered far away)?
Therefore: can the correlation numbers such as p$_{(A↑)(B≪)(C◊)}$(a$_x$,b$_x$,c$_x$), be expressed as a product of such independent functions, A(a$_x$, λ), B(b$_x$, λ) and C(c$_x$, λ), for all trials and all settings, with a suitable hidden variable value λ?
Comparison with the product which defined p$_{(A↑)(B≪)(C◊)}$(j) explicitly above, readily suggests to identify
* $\lambda \to j$,
* $A(a_{x},j)\to n_{j}(\mathrm {A} \uparrow )-n_{j}(\mathrm {A} \downarrow ),$
* $B(b_{x},j)\to n_{j}(\mathrm {B} \ll )-n_{j}(\mathrm {B} \gg ),$ and
* $C(c_{x},j)\to n_{j}(\mathrm {C} \;\lozenge )-n_{j}(\mathrm {C} \;\blacklozenge )$,
where j denotes any one trial which is characterized by the specific settings a$_x$, b$_x$, and c$_x$, of A, B, and of C, respectively.
However, GHZ and collaborators also require that the hidden variable argument to functions A, B, and C may take the same value, λ, even in distinct trials, being characterized by distinct experimental contexts. This is the statistical independence assumption (also assumed in Bell's theorem and commonly known as "free will" assumption).
Consequently, substituting these functions into the consistent conditions on four distinct trials, u, v, w, and s shown above, they are able to obtain the following four equations concerning one and the same value λ:
* $A(a_{2},\lambda )B(b_{2},\lambda )C(c_{2},\lambda )=-1,$
* $A(a_{2},\lambda )B(b_{1},\lambda )C(c_{1},\lambda )=1,$
* $A(a_{1},\lambda )B(b_{2},\lambda )C(c_{1},\lambda )=1,$ and
* $A(a_{1},\lambda )B(b_{1},\lambda )C(c_{2},\lambda )=1.$
Taking the product of the last three equations, and noting that A(a$_1$, λ) A(a$_1$, λ) = 1, B(b$_1$, λ) B(b$_1$, λ) = 1, and C(c$_1$, λ) C(c$_1$, λ) = 1, yields
    $A(a_{2},\lambda )B(b_{2},\lambda )C(c_{2},\lambda )=1$
in contradiction to the first equation; 1 ≠ −1.
Given that the four trials under consideration can indeed be consistently considered and experimentally realized, the assumptions concerning hidden variables which lead to the indicated mathematical contradiction are therefore collectively unsuitable to represent all experimental results; namely the assumption of local hidden variables which occur equally in distinct trials.

### Deriving an inequality

Since equations (1) through (4) above cannot be satisfied simultaneously when the hidden variable, λ, takes the same value in each equation, GHSZ proceed by allowing λ to take different values in each equation. They define
* Λ$_1$: the set of all λs such that equation (1) holds,
* Λ$_2$: the set of all λs such that equation (2) holds,
* Λ$_3$: the set of all λs such that equation (3) holds,
* Λ$_4$: the set of all λs such that equation (4) holds.
Also, Λ$_i$$^c$ is the complement of Λ$_i$.
Now, equation (1) can only be true if at least one of the other three is false. Therefore,
    $\Lambda _{1}\subseteq \Lambda _{2}^{\rm {c}}\cup \Lambda _{3}^{\rm {c}}\cup \Lambda _{4}^{\rm {c}}$
In terms of probability,
    $p(\Lambda _{1})\leq p(\Lambda _{2}^{\rm {c}}\cup \Lambda _{3}^{\rm {c}}\cup \Lambda _{4}^{\rm {c}})$
By the rules of probability theory, it follows that
    $p(\Lambda _{1})\leq p(\Lambda _{2}^{\rm {c}})+p(\Lambda _{3}^{\rm {c}})+p(\Lambda _{4}^{\rm {c}})$
This inequality allows for an experimental test.

### Testing the inequality

To test the inequality just derived, GHSZ need to make one more assumption, the "fair sampling" assumption. Because of inefficiencies in real detectors, in some trials of the experiment only one or two particles of the triple will be detected. Fair sampling assumes that these inefficiencies are unrelated to the hidden variables; in other words, the number of triples actually detected in any run of the experiment is proportional to the number that would have been detected if the apparatus had no inefficiencies – with the same constant of proportionality for all possible settings of the apparatus. With this assumption, p(Λ$_1$) can be determined by choosing the apparatus settings a$_2$, b$_2$, and c$_2$, counting the number of triples for which the outcome is −1, and dividing by the total number of triples observed at that setting. The other probabilities can be determined in a similar manner, using $p(\Lambda ^{\rm {c}})=1-p(\Lambda )$, allowing a direct experimental test of the inequality.
GHSZ also show that the fair sampling assumption can be dispensed with if the detector efficiencies are at least 90.8%.