Modeling Bell's (CHSH) inequality with Qiskit.
CHSH correlation function vs relative angle between detectors ().
From the classical point of view, the following inequality holds for any local hidden variable theory
Here
and
- is a correlation function (for example, spin-spin correlation function) between two points on different sides of the source and arbitrary unit vectors
and
give the orientation of the detectors.
However, within the framework of quantum mechanics (QM), things are different. There are spicific orientations of the ditectors for which is greater than two.
Thus ineq. 1 appears to be an important and convenient test in favor of one or another theory. So far, the experiment (despite some challenges) confirms the prediction of the quantum mechanic and, consequently, the non-locality of our nature.
We can arbitrary constrain angles between detectors to be .
Then becomes only a function of
.
Projection of Bloch's sphere onto xz plane and positions of detectors (A, A', B, B') for .
here is an entangled state of two qubits (Bell state):
is a number of counts registered in a given state (
), where
.
While quantum simulator gives perfect agreement with the analytical solution, quantum calculations on real devices accompanied by certain noise/errors. For example, measurement of the Bell state along the z-axis, should not in principle, contains any contribution with mixed spin. Still, QC produces non-zero probability to obtain |01> and |10> states (check /quantum_errors/).
Required packages can be installed using pip and are listed in requirements.txt file.
$ python run.py
There are two options for QM calculations using Aer qiskit simulator (run_type='sim') or real quantum computer (run_type='ibmq').
To use ibm quantum computer one has to register here and specify token and name of the machine in ibm_setting.json.

