mirror of
https://asciireactor.com/otho/phy-521.git
synced 2024-11-24 01:25:08 +00:00
43 lines
859 B
C++
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;
|
||
|
|
||
|
|
||
|
//=============================================================================
|