TransWikia.com

Simulating electrons passing through a beam splitter for random number generation

Mathematica Asked on July 18, 2021

I would like to write a program that would simulate the trajectory of an electron/photon passing through a 50-50% beam splitter and depending on which detector the particle is measured, it would return 0 or 1. The particle would be in a superposition state
$$vert{psi}rangle=frac{vert{0}rangle+vert{1}rangle}{sqrt{2}}$$ Is there some book that can help me with what i am trying to do? Also, I am a novice at programming in Mathematica, so I do not know how hard it would be.

enter image description here

One Answer

Maybe you want a random number generator that uses RandomChoice to map probabilities to outcomes?

Ket[0] = {1, 0};
Ket[1] = {0, 1};

ψ = (Ket[0] + Ket[1])/Sqrt[2]
(*    {1/Sqrt[2], 1/Sqrt[2]}    *)

RandomChoice[Abs[ψ]^2 -> {0, 1}]
(*    0    *)

Table[RandomChoice[Abs[ψ]^2 -> {0, 1}], 10]
(*    {0, 0, 1, 1, 1, 1, 0, 0, 0, 0}    *)

For added generalizability you could go through the density matrix:

ρ = KroneckerProduct[Conjugate[ψ], ψ]
(*    {{1/2, 1/2}, {1/2, 1/2}}    *)

RandomChoice[Diagonal[ρ] -> {0, 1}]
(*    1    *)

For even more generalizability, I suggest you look into positive operator-valued measures:

Bra[0] = Conjugate[Ket[0]];
Bra[1] = Conjugate[Ket[1]];
zero = KroneckerProduct[Bra[0], Ket[0]];
one = KroneckerProduct[Bra[1], Ket[1]];

prob[0] = Tr[ρ . zero];
prob[1] = Tr[ρ . one];

RandomChoice[{prob[0], prob[1]} -> {0, 1}]
(*    1    *)

Of course all these formalisms give the same results in this simple example; but the latter ones can be extended to mixed states, asymmetric particle losses, etc. if desired.

Please remember that using a quantum-mechanical beam splitter to generate randomness is not different from using a classical mechanism (flipping a coin or using a Galton board). If you want true demonstrable quantum randomness, you need to look at two-particle correlations and go in the direction of Bell's inequality.

Answered by Roman on July 18, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP