Skip to main content
Visual Simulation of a Two-Channel Quantum Bell Test Experiment
---------------------------------------------------------------

Run the program from the command line with something like

Quantum-Correlations-Visualized pi/8
Quantum-Correlations-Visualized 3pi/8
Quantum-Correlations-Visualized pi/4
Quantum-Correlations-Visualized 30
Quantum-Correlations-Visualized 60

or run it without an argument to get a usage message.

This program simulates in animation an experiment of a kind for which
the Nobel Prize in Physics for the year 2022 was in part awarded. A
Wikipedia article on this kind of experiment can be found at
https://en.wikipedia.org/w/index.php?title=CHSH_inequality&oldid=1173584834
See also
https://en.wikipedia.org/w/index.php?title=Bell_test&oldid=1174875317#A_typical_CHSH_(two-channel)_experiment

There is a difference, however. In the simulation, the two polarizing
beam splitters are rotated continuously on axles, in unison. Also, the
photodetectors are able to tell whether the photons they detected were
the vertically polarized ones or the horizontally polarized ones. One
might suppose this information available as a ‘hidden variable’, if by
no other means. In any case, to calculate the correlation coefficient
it is necessary to take account of whether the photon was horizontally
or vertically polarized, and thus obviously this information is
implicitly assumed by quantum mechanics itself. We need the
information, so we can estimate the correlation coefficient.

The correlation coefficient is estimated by using detection
frequencies as stand-ins for probabilities. Various conditional
probabilities in this experimental arrangement take forms such as
cos²(this)×sin²(that) and so on. Thus one can substitute detection
frequencies for these, take square roots, use some algebra and
trigonometric identities, and eventually end up calculating an
approximation of the ideal value, −cos(2×(phi_2 − phi_1)). A little
care has to be taken with quadrants and signs, because there are
actually two square roots that are negatives of each other, but
otherwise the process is straightforward, if tedious. Before being
displayed, the estimated correlation coefficients are passed through a
digital lowpass filter with a very low cutoff frequency, so they do
not change too rapidly.

As for the sense of the correlation coefficient, some will prefer
+cos(2×(phi_2 − phi_1)). The sense is arbitrary, as long as it is kept
consistent, and then only if one cares about more than just the
magnitude of the coefficient.

Incidentally, a better way to write the coefficient is

−(cos²(phi_2 − phi_1) − sin²(phi_2 − phi_1))

which expresses it in relative intensities of the two polarizing beam
splitters, according to the Law of Malus. The correlation coefficient
written in this form thus applies almost intuitively to
plane-polarized electromagnetic waves. And it is the formula actually
used in the program. It is equivalent to the other form via one of the
trigonometric double-angle identities found in CRC handbooks and
Wikipedia.

At the sides of the display are ‘meters’ that show which detectors are
detecting what percentage of the horizontally or vertically polarized
photons. Thus one has visual confirmation of the correlations, even if
the correlation coefficient should seem difficult to interpret. Lines
between the ‘meter pointers’ are there to help with seeing the
pointers move together, and also just to look pretty.

Comments in the source code explain more about the program, such as
how the simulation reproduces empirically the correlations predicted
by quantum mechanics for a Bell test. The method used might seem novel
and surprising.

Metadata

Release files for Quantum-Correlations-Visualized 0.1.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Quantum-Correlations-Visualized 0.1.13
File Size Uploaded
quantum_correlations_visualized-0.1.13.tar.gz 10.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Quantum-Correlations-Visualized 0.1.13
File Interpreter ABI Platform
quantum_correlations_visualized-0.1.13-py3-none-any.whl Python 3 none any Details

Total release size: 21.6 kB

Release files / quantum_correlations_visualized-0.1.13.tar.gz

Download URL quantum_correlations_visualized-0.1.13.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4875d2023f775071e7c8a83227a84197666194154f944fad07d8e2bfa84b37e8
BLAKE2b-256 checksum
How to use checksums
3558d567ee26bed1e5f0325d243e674afb2013b76c1ff85d337b676ecec4b57b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release files / quantum_correlations_visualized-0.1.13-py3-none-any.whl

Download URL quantum_correlations_visualized-0.1.13-py3-none-any.whl
Size 11.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7edd663071a1395033d1238589fb1dc47e99dea188b9ab28315d0908ff5d54c4
BLAKE2b-256 checksum
How to use checksums
cd29998eae1695427a6d407e4b955badce0d91847c6bf30733bf94f9e425392f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release history Release notifications | RSS feed

This release

0.1.13 This release

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page