phy-521/presentation/entanglement.cpp
2020-12-23 16:45:08 -05:00

43 lines
859 B
C++

#include <vector>
struct spin {bool up; bool down;}
struct entangled_spin {bool up_1; bool up_2; bool down_1; bool down_2; }
struct state { double prob_up; double prob_down; }
struct entangled_state {}
spin measure (particle measured) {
}
int main(int argc, char const *argv[])
{
std::vector<spin> v;
spin electron_spin;
spin positron_spin;
\\ uncorrelated measurements
for (int trial=1; trial<=1000; trial++) {
particle positron;
particle electron;
measure_spin(positron)
}
\\ entangled measurements
for (int trial=1; trial<=1000; trial++) {
entangled_pair pair = new entangled_pair(
particle position,
particle electron);
measure_spin(positron)
}
return 0;
//=============================================================================