Simulated optics experiment/Data analysis: Difference between revisions

Content added Content deleted
(→‎{{header|ObjectIcon}}: Fixed the fix.)
m (→‎{{header|Wren}}: Realigned output to match Python entry.)
Line 1,108: Line 1,108:


Fmt.print()
Fmt.print()
Fmt.print(" light pulse events $,10d", data.count)
Fmt.print(" light pulse events $,10d", data.count)
Fmt.print()
Fmt.print()
Fmt.print(" correlation coefs")
Fmt.print(" correlation coefs")
Fmt.print(" $2d° $2d° $+9.6f", anglesL[0].floor, anglesR[0].floor, kappaL1R1)
Fmt.print(" $4.1f° $4.1f° $+9.6f", anglesL[0], anglesR[0], kappaL1R1)
Fmt.print(" $2d° $2d° $+9.6f", anglesL[0].floor, anglesR[1].floor, kappaL1R2)
Fmt.print(" $4.1f° $4.1f° $+9.6f", anglesL[0], anglesR[1], kappaL1R2)
Fmt.print(" $2d° $2d° $+9.6f", anglesL[1].floor, anglesR[0].floor, kappaL2R1)
Fmt.print(" $4.1f° $4.1f° $+9.6f", anglesL[1], anglesR[0], kappaL2R1)
Fmt.print(" $2d° $2d° $+9.6f", anglesL[1].floor, anglesR[1].floor, kappaL2R2)
Fmt.print(" $4.1f° $4.1f° $+9.6f", anglesL[1], anglesR[1], kappaL2R2)
Fmt.print()
Fmt.print()
Fmt.print(" CHSH contrast $+9.6f", chshContrast)
Fmt.print(" CHSH contrast $+9.6f", chshContrast)
Fmt.print(" 2*sqrt(2) = nominal $+9.6f", chshContrastNominal)
Fmt.print(" 2*sqrt(2) = nominal $+9.6f", chshContrastNominal)
Fmt.print(" difference $+9.6f", chshContrast - chshContrastNominal)
Fmt.print(" difference $+9.6f", chshContrast - chshContrastNominal)


// A "CHSH violation" occurs if the CHSH contrast is > 2.
// A "CHSH violation" occurs if the CHSH contrast is > 2.
// https://en.wikipedia.org/w/index.php?title=CHSH_inequality&oldid=1142431418
// https://en.wikipedia.org/w/index.php?title=CHSH_inequality&oldid=1142431418
Fmt.print()
Fmt.print()
Fmt.print(" CHSH violation $+9.6f", chshContrast - 2)
Fmt.print(" CHSH violation $+9.6f", chshContrast - 2)
Fmt.print()</syntaxhighlight>
Fmt.print()</syntaxhighlight>


Line 1,130: Line 1,130:
<pre>
<pre>


light pulse events 100,000
light pulse events 100,000


correlation coefs
correlation coefs
0° 22° -0.702281
0.0° 22.5° -0.702281
0° 67° +0.702892
0.0° 67.5° +0.702892
45° 22° +0.696311
45.0° 22.5° +0.696311
45° 67° +0.710296
45.0° 67.5° +0.710296


CHSH contrast +2.811781
CHSH contrast +2.811781
2*sqrt(2) = nominal +2.828427
2*sqrt(2) = nominal +2.828427
difference -0.016646
difference -0.016646


CHSH violation +0.811781
CHSH violation +0.811781
</pre>
</pre>