Jump to content

Theoretical

Senior Members
  • Posts

    323
  • Joined

Posts posted by Theoretical

  1. Your simulation has nothing to do with entanglement.

    Let me say it another way. The sim is for Bell's experiment, an experiment where people commonly analyze it using two different methods, one of which is QM. My intent from the start of writing the sim was to not use the QM method. Rather, I wanted to see if the sim would get the correct QM results by making the polarizations know for both photons from the moment they are emitted, and to make the polarization of both photons the same.

     

    Simply stated, the sim is for an entangled experiment, but with the intent of analyzing it using a non-QM method.

  2. Here use these particle entanglement diodes that can and are used. If you look at the links on the same page they also have single photon detectors. I'd say entanglement is real.

    http://www.toshiba-europe.com/research/crl/qig/entangledled.html

    By the way entanglement is NOT instant communications. That's a pop media myth

    It's an interesting article. They make a big claim:

     

    "Measurement of one photon affects the polarisation of the other, even if they are separated by huge distances."

     

    Unfortunately I didn't see where they proved that.

     

    Also make statements such as, "This means the polarisation of a photon can be determined by measurement of it's energy, providing the dreaded which-path information that is well know to destroy entanglement." If there's presently no evidence of the instantaneous link between photons or particles, then I don't think they should make such statements. Perhaps I'm being overly critical, but it's a sensitive topic for me now lol. Again, interesting work they're doing!

     

     

    BTW why put this thread in the speculation section. What claims are being made that are speculation? I think most of the users here agree there's no experimental proof of any kind of instantaneous communication between the photons. My simulation uses well established appropriate equations, and it gets the correct results. Oh well it's your forums lol.

    I think the issue you have is regarding the title. I agree the title should be changed.

  3. Wikipedia:

    "Experiments have been performed involving measuring the polarization or spin of entangled particles in different directions, whichby producing violations of Bell's inequalitydemonstrate statistically that the local realist view cannot be correct. This has been shown to occur even when the measurements are performed more quickly than light could travel between the sites of measurement: there is no lightspeed or slower influence that can pass between the entangled particles.[6] Recent experiments have measured entangled particles within less than one part in 10,000 of the light travel time between them.[7] According to the formalism of quantum theory, the effect of measurement happens instantly."

     

    Maybe someone should tell them that there experiments have absolutely nothing to do with particles communicating instantly because as stated the experiment gets the same results if the particles are emitted from different sources without entanglement.

     

     

    No there's no evidence of instantaneous communication. The fact that the particles always have the same (or always opposite) polarity only proves that's the way they were created. At low temperatures I could emit two photons at say 100GHz from the same source that will have the same polarity. And what does that prove? One could say they're, entangled, linked, in love, or whatever, but what's the purpose if you can't prove they communicate instantaneously with each other after they have been created? We don't know they are truly "entangled." Maybe they should use a different word other than entanglement.

     

     

    That's the error. You don't appear to be simulating the experiment you want to simulate.

    Actually I'm extremely pleased with my sim, if I don't say so myself lol. It shows me that there's nothing special about with these so-called entangled photons in the experiment. No evidence of instantaneous link or communication. That non-entangled photons get the same results. So I'm beginning to wonder of entanglement isn't anything so special. No disrespect to QM.
  4. There is a lot of evidence for entanglement. It is a fundamental part of quantum theory. every experiment and the thousands of practical applications conform that quantum theory works.

    Our conversation has become circular because you keep misstating my words and keep correcting you. Enough.

     

     

     

    Can you show that your algorithm reproduces either the Strapp experiment (with probability) or the Hardy experiment (without probability) ?

    Thanks for the info. I'll take a look at those. If I see even a remote chance that they prove spooky action at a distance, then I'll try to simulate them.

     

     

     

    Einstein did not like the concept of entanglement because he considered it 'action at a distance'.

    That was the crux of the EPR paradox.

    Einstein postulated that there must be other unknown variables that affect the outcome of our experiments. These 'hidden' variables, once found, would get rid of all the strange, probabilistic properties of Quantum theory.

    That has never happened, and, as a matter of fact, Bell's inequality proves no hidden variables exist.

     

    That is what we understand from your Wiki quote.

    What do you understand ?

    Again, it's my understanding that the Bell's experiment only disproves whatever hidden variable theories that give wrong results, but that none of those theories were created by Einstein. It's my understanding that:

     

    1. Einstein believed QM needed hidden variables so we can do away with the spooky action at a distance notion.

     

    2. Bell's experiment does not prove spooky action at a distance since non-entangled particles give the same results of 1/2.

     

    3. Nobody has proven Einstein's idea of hidden variables is wrong. All that's been proven is that existing hidden variable theories are wrong.

     

    4. Over the years I've seen numerous science documentaries where academic scientists talk about how spooky QM.

  5. I now have absolutely no idea what you are on about. I suspect that this is because you have absolutely no idea what you are on about.

    I've already explain the purpose of the sim and this thread:

     

    Honestly, the main reason I wrote the sim is because I'm working on a theory that requires knowing if Einstein was correct about entangled particles. I was expecting to see the weird amazing Bell's experiment results as hyped up so much on youtube, as if the Bell's experiment results could only be proven by spooky action at a distance. In my excitement I shared the results thinking other theorists would like to know. So people can take the sim or ignore it. To each their own.

     

    ... Actually, in one of the youtube videos a guy, who was obviously very much engrossed in Bell's experiment, said a scientists (gave me the impression he was a notable scientist) said the entangled particles are in agreement with relativity because he believes the entanglement exists outside of spacetime.

     

    So if there was experimental evidence of spooky action at a distance, then that would definitely change the path of my theoretical research.

  6. Classical physics is correct. Malus law was a result of the wave like properties of light. Many of these wave properties were discovered before quantum mechanics was developed. It was these wave properties that were the downfall of classical physics. You can not provide a similar argument for electrons because there is no "classical" malus law for electrons.

    I predict you would get the same results using electrons. That is, if the electrons are emitted from separate sources and are not "entangled," you get the same results, 1/2.

     

     

     

    What is "special" about it is that cos2 is used to calculate the correct value in quantum theory (as opposed to classical probabilities). So by using this you are automatically getting the same results as QM. It is not surprising and doesn't demonstrate anything interesting (unless someone thinks your lack of understanding is interesting).

    Funny how that equation works for non-entangled particles as well. Why wouldn't QM use it? It's a very simple equation that shows the obvious. I bet there are countless macro scale experiments that would show the same cos(angle)^2 curve. Shoot marbles at a paddle that can rotate from being parallel to the marbles to being perpendicular.

     

     

    In my opinion the modern debates about hidden variable theories have fallen off track. The following Wikipedia quote, which quotes Einstein, states what EPR was about:

    "Einstein, Podolsky, and Rosen argued that "elements of reality" (hidden variables) must be added to quantum mechanics to explain entanglement without action at a distance."

    Where did Einstein say that hidden variables are required in order for QM to give correct answers? Einstein said the hidden variables must be added to *explain* entanglement *without action at a distance*.

     

     

    If Einstein clearly stated the hidden variables are necessary for QM to produce correct answers, then I stand corrected. Actually I read a quote from Einstein where he said QM gives correct results.

  7. There is lots of evidence for entanglement.

     

     

    Then it sounds like you have a few years of learning about theoretical physics ahead of you before you are ready.

    I said entanglement with regards to spooky action at a distance. Where's the experimental evidence? Bell's experiment is not such evidence. My sim sets the polarization of both photons from the start. It didn't require any instantaneous communication.

     

     

     

    Knowing the polarizations does not require hidden variables. It merely requires knowing a polarization setting. Having correlated polarizations does not automatically mean entanglement. Those are two errors in your simulation.

    They're not errors in the sim. The sim uses simple non-entanglement equations and gets the correct answer.

     

     

    No the cos(angle)^2 equation does not work for hidden variables theory. That is the equation used by quantum mechanics which gives answers inconsistent with hidden variables theory.

    I see nothing special about the I*cos(angle)^2 equation. It took me maybe 30 seconds to derive it myself, later on confirming it to be the correct equation. It's an obvious simple first try.
  8. You are right. Bell's theorem has nothing to do with entanglement. That is just a useful way of testing it. It is about demonstrating that there are no local hidden variables..

    Agreed as far as the entanglement aspect, and therefore there's no experimental evidence of spooky action at a distance. If that's true, and it sure seems like it, then why is everyone on the internet posting videos, blogs, and articles saying Einstein was wrong, that Bell's experiment proves how spooky quantum entanglement is?

     

    Honestly, the main reason I wrote the sim is because I'm working on a theory that requires knowing if Einstein was correct about entangled particles. I was expecting to see the weird amazing Bell's experiment results as hyped up so much on youtube, as if the Bell's experiment results could only be proven by spooky action at a distance. In my excitement I shared the results thinking other theorists would like to know. So people can take the sim or ignore it. To each their own.

     

    ... Actually, in one of the youtube videos a guy, who was obviously very much engrossed in Bell's experiment, said a scientists (gave me the impression he was a notable scientist) said the entangled particles are in agreement with relativity because he believes the entanglement exists outside of spacetime.

  9. Honestly I see no point arguing if my sim is considered another hidden variable theory or not because that's not the point of the sim. I thought to have made it very clear in my previous post the crux of the matter. The Bell's experiment gets the same results regardless if the photons are "entangled" or not. Quote from my previous post, "To be specific, one could get their 50 cent calculator, grab a random number from it, use that random number to emit two common photons from different sources (not a non-linear crystal) such that these photons have the same polarity. Who cares if they're "entangled." You'll get the exact same results as a Bell's experiment that uses some non-linear crystals to produce "entangled" photons. That proves there's absolutely nothing special going on with these "entangled" photons in the Bell's experiment."

  10. You can call it as you wish, but you miss the entire purpose of the sim, which is that it uses equations that do not require spooky action at a distance to correctly predict the outcome of the experiment. If the sim is correct, and it sure appears to be, then Einstein was correct about QM. It is wrong to go through all various different versions of hidden variable theories to show they get wrong results to support this notion that the particles have instantaneous link to each other when it's unnecessary. Of what purpose would it be to invent a hundred theories that incorrectly predicts something? To make your theory appear correct?

     

    Fact still remains that a simple equation that works on any type of photon will correctly predict the outcome, and it does not require the particles to be "entangled." To be specific, one could get their 50 cent calculator, grab a random number from it, use that random number to emit two common photons from different sources (not a non-linear crystal) such that these photons have the same polarity. Who cares if they're "entangled." You'll get the exact same results as a Bell's experiment that uses some non-linear crystals to produce "entangled" photons. That proves there's absolutely nothing special going on with these "entangled" photons in the Bell's experiment.

     

    So if non-entangled similar photons created by separate sources shows the same results, then the Bell's experiment does not prove anything spooky is happening with the entangled photons.

     

    How do I know that the aforementioned non-entangled photon experiment would get the same results of 1/2, and not 5/9? Because that's what the simulation is simulating. It uses the I*cos(angle)^2 equation, which works for normal photons.

     

    Like everyone here I too would love to see some prove of this spooky instantaneous action at a distance. Instantaneous communication, faster than light, Bell's experiment that shows only these "entangled" photons exhibit a unique effect. Something. Anything. But nothing. No proof. I'm disappointed, but I must acknowledge the evidence. If I'm wrong, then point it out. Let's not argue about everything else under the sun and a household of technicalities and definitions. The meat of the simulation is about as simple as it gets. Where's the error? Only if Einstein was still alive. He would set you straight lol!

  11. A 'hidden variable' is something which changes and affects the outcome of experiments, but which is not accounted for by our Quantum Mechanical model or understanding.

    I don't think you've shown that any such thing exists.

    And no, that's not what Einstein was talking about.

    I have to disagree. Einstein was opposed to probabilistic nature of QM. Here's a quote from Wikipedia:

    "Albert Einstein, the most famous proponent of hidden variables, objected to the fundamentally probabilistic nature of quantum mechanics,[1] and famously declared "I am convinced God does not play dice".[2] Einstein, Podolsky, and Rosen argued that "elements of reality" (hidden variables) must be added to quantum mechanics to explain entanglement without action at a distance."

    http://en.m.wikipedia.org/wiki/Hidden_variable_theory

    That's what the sim does. It removes the probabilistic nature of the entangled particles by knowing exactly beforehand what the polarization of both photons are.

  12.  

    So you simply ignore the evidence? Your simulation is obviously worthless compared with real experimental data.

     

    If your simulation disagrees with experiment then it is wrong. That is all there is to say.

    You must be referring to the work of other people because so far the evidence shows my sim got the correct answer and it uses correct equations.

    Nobody's been able to prove there's an instantaneous link between the two entangled particles. Not instantaneous communication. Nothing. The sim is extremely simple. And it appears to work. I'm now a lot more confident in the sim now than when this thread was created. Until someone shows any error in the sim, I have to say Einstein was correct about entanglement.

  13. But the answer in the video is that from entangled ELECTRON measuring their SPIN; you are looking at PHOTONS (that seem not be entangled) and are looking at measuring POLARISATION. These are similar concept but there is no good reason they should give the same answer!

    I'm using polarization. She uses spin. Why would it get different results? Several people in this thread said my sim gets the correct results.

     

    In my sim the photon polarization was random, but yet the polarization of both photons are always the same. How could they not be entangled?

     

     

     

     

    You need to demonstrate

    1. That your process in your simulation requires either entanglement or a hidden variable

    2. That it has a hidden variable (which you don't)

    3. That the answers for entanglement (ie predicted by QM - which is what you are doing whether you know or not ) and those for a hidden variable are the SAME.

    The sim doesn't have a hidden variable? The photon polarizations are known before the polarizers. I believe that's what Einstein was talking about.

     

     

     

    And even once you have done that - I can point to many real world experiments that conclusively show that hidden variables CANNOT account for the behaviour of spin in entangled electrons (per the video) nor for the behaviour of polarisation in entangled photons (per Aspect et al).

     

    You only need a single instance to prove a theory incorrect - this has been done; the experiments that followed from Bell's Inequality have shown that non-locality is crucial. Therefore a theory which claims that non-locality is impossible cannot be correct. per Elfmotat's previous post - this does not prove QM is correct as stands as there are Bohmian mechanics and other ideas which do not get tested by Bells.

    What other experiments conclusively show that hidden variables cannot account for the behaviour of spin in entangled electrons?
  14. First of all, c'mon, select whole Visual Studio project, zip it and attach.

    It must works without having to do anything.

    Nobody will be writing entire program just for your little snippet of code to work..

     

    Secondly, you didn't randomize polarization angle, but you walk through all possible values with constant increment.

    It did have random values at first, but it gives the same results except using rand required a lot more sampling for obvious reasons.

     

     

     

    Some of the commenters are saying this is just a coincidence that the sim got the correct results. That seems unfair. It's not like I hunted through thousands of random equations on the net to find some crazy combination that gives 1/2. The sim uses the correct polarization equation. It's straight forward.

     

    The best part of the sim is not only that it uses the correct equation regarding polarizers that work regardless if the photons are entangled, but it gets the correct answer without any spooky action at a distant. I think that's what bothered Einstein the most about QM.

  15. Just to make something a bit more clear: the Bell inequalities don't rule out all hidden variable theories, just hidden variables which obey local equations. de Broglie-Bohm Theory is an example of a non-local hidden variable theory which is not ruled out by the Bell inequalities.

    Interesting. It seems there're numerous hidden variable theories. My approach was to use a basic well established equation that's based on experiments, such as the I*cos(angle)^2 equation.

     

     

     

    OK - her answer is correct for those angles (*). Although a couple of times she says that spins should be the same rather than different when she is explaining.

     

    But - due to a complete inability to read code I am unaware of what your sim is actually doing; and I still don't see how you are entangling the two photons

    Well actually according to my sim there would be no difference if the results if the photons were entangled or not with the exception that the polarization of both photons must be consistently opposite. In other words, when the photons are emitted, then the photons must always be opposite (or they can be the same, as that merely inverts the results). That is found in the code. The code only has one photon polarization because if you know one then you know the other.

     

     

     

    * I hope

    - the probability of a opposite readings is [1+Cos(Theta)]/2

    - you have three equally likely scenarios a,a a,b and a,c

    - for a,a Theta = 0 [1+Cos(Theta)]/2 = 1. ie if Alice and Bob read on same axis guaranteed to get opposite readings

    - for a,b Theta = 2pi/3 [1+Cos(Theta)]/2 = 1/4 There is only a 1/4 chance that readings will be opposite

    - for a,c similar to a,c Prob of Opposite readings = 1/4

    - Total probability = (1)*1/3 + (1/4)*1/3 + (1/4)*1/3 = 1/3 + 1/12+ 1/12 = 4/12+ 1/12 + 1/12 =1/2

    That's great. So my sim is at least showing the correct results. :)
  16.  

    So it seems you start with the value predicted by quantum theory and then end up with the result predicted by quantum theory.

     

    The bug in your code is: https://en.wikipedia.org/wiki/Begging_the_question

    No that's just wrong. That equation works for non entangled photons. It's a very basic equation that shows how much light will pass through a polarizer where the polarization difference is known.

  17. The math is supposed to be an identical copy of what your program does (by reverse-engineering, not by understanding the intent). The summation sign represents the outer loop and the summation in the loop. The integral is the inner loop (I promoted the sum to an integral because of the many tiny summation steps you do). The two addends under the integral sign are your two "probability_same += ..." lines. The steps taken are then just another method to do get the result (called "solving analytically" in contrast to "solving numerically"). The 1/2 that results of course is supposed to equal the 0.5 you get.

     

    It's just a different way to do the same calculation which, in my experience, is often more insightful than playing around with simulations. Simulations usually are used in cases too complicated for an analytical solution. Part of the reason putting your code into math was also to demonstrate that what you are talking about is a relatively simple case. Nothing actually wrong with doing calculations by the computer if that suits you better, though.

    Nice! I appreciate it. Is the girl in the video correct, that particular Bell's experiment she goes over will produce 1/2 (same results 50% of the time)? If that's the case, then shouldn't this be looked at very closely? Because it would mean Einstein was correct about QM.

     

     

     

    Fine. What's the citation for the people that carried out the experiment you are describing?

    I could go through the video and type her exact words regarding the results if you like.
  18. 1)

    The calculation your computer program does can be performed analytically (with the help of Wolfram Alpha for the integrals):

    [math]\frac 13 \sum_{P = 0, 2\pi/3, 4\pi/3} \frac{1}{2\pi} \int_{0}^{2\pi} \cos^2 \alpha \, \cos^2 ( \alpha - P) + \left( 1- \cos^2 \alpha \right) \left( 1-\cos^2 ( \alpha - P) \right) \, d\alpha[/math]

    [math]= \frac 13 \sum_{P = 0, 2\pi/3, 4\pi/3} \frac{1}{2\pi} \int_{0}^{2\pi} 1 + 2 \cos^2 \alpha \, \cos^2 ( \alpha - P) - \cos^2 \alpha -\cos^2 ( \alpha - P) \, d\alpha[/math]

    [math]= \frac 13 \sum_{P = 0, 2\pi/3, 4\pi/3} \left[ 1 + \frac{1}{2\pi} 2 \left( \frac{\pi}{4}(\cos(2P) +2 ) \right) - \frac 12 -\frac 12 \right][/math]

    [math]= \frac 13 \sum_{P = 0, 2\pi/3, 4\pi/3} \left[ \left( \frac{1}{4}\cos(2P) \right) +\frac 12 \right] = \frac 12[/math]

     

    Thanks. I'm first to admit that math is my weakness, but I know how to code. It's been my experience that simulations can reveal some amazing surprises.

     

    So I assume the above math you provide shows a different answer than my simulation. If that's the case, then the simulation code must be different.

     

     

    2)

    I was expecting entanglement to play a role. But I do not see how this is reflected in your code.

    In the source code the variable photon_polarization represents the polarization of both photons. This is determined when both photons are emitted. I should probably update the code so that photon #2 polarization is at right angle to photon #1, but that shouldn't give a bad result. I'm certain that only invert the results, which in this case it will still be 0.5. I think this is more of a point of view in the simulation because we would say in the simulation that photon #2 is as such and that the polarizer is merely rotated at a different perspective.

     

     

    3)

    Similarly, I do not see the connection to hidden variables. Are there any in your code?

    The simulation determines the photon polarization angle when it's emitted, before it arrives at the polarizer. This can be seen in the photon_polarization variable.

     

     

    4)

    The movie is very nicely made. But my first impression is that it should be considered a nicely made movie about a topic, and that you should not expect a 7-minute movie to give a complete or accurate picture. I guess the point I am trying to make is: Do expect that the movie is made to make you start exploring the topic, not to completely cover it. Some arguments made there may be incomplete as presented.

    True, but it was difficult finding any video on this that contains sufficient details regarding such an experiment. My goal was to create a simulation on photons based on how I thought the real world behaves. There seems to be numerous ways of doing this. If my simulation is without error, then I would have to assume it's a reflection on how the real world behaves.

     

    BTW I should add that the results of 1/2 means that half of the time both of the photons take the same path, on their own side of course. Example, if photon #1 goes through it's polarizer, and photon #2 goes through it's polarizer, then both photons took the same path. If that happened 100% of the time, then the simulation results would be 1. If both photons never took the same path, then the results would be 0. So the possible range for the results is from 0 to 1.

     

    Today I'll try to formulate a math equation which reflects the simulation.

    Another issue is that a simulation can't prove something true or not, only experiment can do that. A simulation gives you a prediction against which you can compare an experiment.

    Yes, but my simulation is based on a real experiment, Bell's experiment. So the experiments already complete.
  19. This can't possibly be true! I'm sure I'll look like a fool soon enough lol. A computer simulation I wrote (source code below) correctly predicts Bell's experiment results using hidden variables. Basically I wrote it as I felt the photons would behave. Both of the entangled photons polarities are predetermined before they arrive at the polarizers. Unless I've made an error, this shows that Einstein was correct.

     

    My simulation is based on a Bell's experiment in the following video:

     

     

    She clearly states the experiment result is 1/2, which is what my simulation gets. Further on in the video she goes over an example that uses hidden variables. She states that the hidden variable version gives incorrect results.

     

    My simulation doesn't rely upon any complex math. It uses simple math, and relies upon on the simulation to show the results. It uses the probability of a photon traveling through a polarizer, which is Intensity*cos(angle)^2.

     

    Below is the source code written in c language. The variable total_polarizer_incs is how many angles the simulation uses in the test. It's set to 3 because that's how many are used in the Bell's experiment outlined in the video.

     

    So the simulation has two source code loops to calculate the results. One inside the other. The outermost loop scans through different polarizer angles, which is variable polarizer_angle2. Within that loop is photon_polarization, which scans through a range of photon polarizations. The step size is set by variable total_photon_incs, which is 10000, but you can make it has high as you like. This is how many times an entangled set of photons are shot out at the polarizers. Photon polarizations in real life are random. The software could also use random numbers. It will give the same results, except the random number version will be slightly less accurate because there's no way of guaranteeing an exact equal random number set. But this is overcome by shooting more photons to get a better average. Next, the simulation calculates the probability of photon #1 going through the polarizer. In c language we square a long double number using powl(number, 2.0L). In this case it's taking the cosines of the photon angel relative to polarizer #1, which is always at zero since both polarizers angles are relative to each other, then it squares it; cos(angle)^2. Next it calculates the probability of photon #2 going through polarizer #2 (can be one of three angles). Next the simulation calculates the probability of photon #2 being the same as photon #1 if/when photon #1 went through the polarizer, which is probability1 * probability2. Initially I had the simulator looping through to calculate this, but it was simple and straightforward math. So it's now simplified. Next the simulator calculates the probability of photon #2 being the same as photon #1 if/when photon #1 did not go through the polarizer, which is (1 - probability1) * (1 - probability2). By the way the simulator also adds the two aforementioned probabilities to the variable probability_same. The simulator then loops back and repeats until it's done going through all of the photon angle possibilities. It will then add the total probability to the grand total variable, probability_same_total. Next the simulator loops back to the outermost loop to change the polarization angle. That's about it.

     

    I would greatly appreciate any feedback. I've gone over the code dozens of times, but you know how it goes when you've been looking at something too long. Maybe someone can see an obvious error. Absolutely no disrespect to anyone or QM, but I honestly believe Albert Einstein was correct that there are "hidden" variables. I've tried my best to simulate this the way I think things happen. Perhaps this simulator isn't the evidence since it seems slim and none it's correct, but we'll see.

     

    Please note that I never fudged anything to arrive at this source code or results. The way it operates is what was in mind from the start. Please feel free to run this simulation on your computer or forward this post to someone.

     

     

    If you use MFC, then don't forget to include the math library:

     

    #include "math.h"

     

     

    // Bell's experiment using hidden variables

     

    long i;

    long double PI = 3.1415926535897932384626433832795L;

    long double TWO_PI = 3.1415926535897932384626433832795L * 2.0L;

    long double HALF_PI = PI / 2.0L;

    long double photon_polarization, probability1, probability2, probability_same, probability_same_total=0;

    long double polarizer_angle2; // polarizer_angle1 is always 0 deg.

    long double total_polarizer_incs = 3.0L;

    long double polarizer_angle2_inc = TWO_PI / total_polarizer_incs;

    long double total_photon_incs = 10000.0L;

    long double photon_polarization_inc = TWO_PI / total_photon_incs;

     

    // draw bottom line, 0%

    for(i=10;i<10+TWO_PI*100.0L;i+=3) {

    pDC->SetPixel(i,500,0xff0000);

    }

    // draw top line, 100%

    for(i=10;i<10+TWO_PI*100.0L;i+=3) {

    pDC->SetPixel(i,200,0xff0000);

    }

    // draw center line, 50%

    for(i=10;i<10+TWO_PI*100.0L;i+=3) {

    pDC->SetPixel(i,350,0xff0000);

    }

     

     

    // code that does the simulation starts here

     

    for(polarizer_angle2=0; polarizer_angle2 < TWO_PI; polarizer_angle2 += polarizer_angle2_inc) {

    for(photon_polarization=probability_same=0; photon_polarization < TWO_PI; photon_polarization += photon_polarization_inc) {

    probability1 = powl(cosl(photon_polarization), 2.0L); // photon #1

    probability2 = powl(cosl(photon_polarization - polarizer_angle2), 2.0L); // photon #2

    // calc probility of photon #1 & #2 both being a 1

    probability_same += probability1*probability2;

    // calc probility of photon #1 & #2 both being a 0

    probability_same += (1.0L - probability1)*(1.0L - probability2);

    }

    probability_same_total += probability_same/total_photon_incs;

     

    // draw result for this polarizer angle

    pDC->MoveTo(10+polarizer_angle2*100.0L, 500);

    pDC->LineTo(10+polarizer_angle2*100.0L, 500-probability_same/total_polarizer_incs*300);

    }

    probability_same_total /= total_polarizer_incs; // Result: 0.5

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.