Live data from Hacker News

Show HN: Play with real quantum physics in your browser

quantum.orgsoft.org

51–60 of 78 posts

Re: Show HN: Play with real quantum physics in your browser

#52
post #15

Tangent, but interesting: how do you get fair samples from a biased coin? 1. You take a string of biased samples like 001011100101 2. you split it in pairs 00 10 11 10 01 01 3. you keep only pairs with a zero and a one in them 10 10 01 01 4. You assign 0 and 1 to them, e.g. 1 1 0 0, this is a fair sampling from an unbiased coin Why does it work? Because even if p(0) ≠ p(1), p(01) = p(10).

Instead of discounting some of the results, can we alternate the value of the coin each toss? So on the first flip, heads is 0 and tails is 1, then on the next flip, heads is 1 and tails is 0.

Re: Show HN: Play with real quantum physics in your browser

#53
post #48

I watched how it works, but it seems the rotation is just an animation and a fake. There are two requests: /flip and /info. When you click mouse button, the /flip request is GET immediately and it returns a result of 1(eagle) or 0. After that the coin animation begins with requests to /info which always returns the same response for no clear reason. After several /info requests the coin eventually stops without recei…

Well yeah, the result from ibm quantum is either a 1 or 0 i suppose. Did you expect the quantum computer to draw you the coins through your phone too?

Re: Show HN: Play with real quantum physics in your browser

#54
post #37

Nice idea, but watching the spinning coins made me a bit nauseous. I had to go away from the page.

Sorry about that. I toned down the animation and fixed the infinite spin issue – curious if it's more comfortable now.

Better. Thanks.

Re: Show HN: Play with real quantum physics in your browser

#56
post #52
post #15

Tangent, but interesting: how do you get fair samples from a biased coin? 1. You take a string of biased samples like 001011100101 2. you split it in pairs 00 10 11 10 01 01 3. you keep only pairs with a zero and a one in them 10 10 01 01 4. You assign 0 and 1 to them, e.g. 1 1 0 0, this is a fair sampling from an unbiased coin Why does it work? Because even if p(0) ≠ p(1), p(01) = p(10).

Instead of discounting some of the results, can we alternate the value of the coin each toss? So on the first flip, heads is 0 and tails is 1, then on the next flip, heads is 1 and tails is 0.

That'll obtain the right average but won't have the same pairwise relations as an independent, unbiased coin.

That's probably easiest to see if you imagine approaching an infinitely biased coin (100% heads, 0% tails). Your strategy alternates between 0 and 1 almost always. The listed strategy throws away most flips but gives actualy unbiased results when a pair does pass.

Another way to look at it is from an entropy perspective. An unbiased, independent coin flip has 1 bit of entropy. A biased coin with, e.g., 99% heads has 0.0807 bits of entropy. On average, you need at least 12.377 such flips to emulate an unbiased, independent flip. Any strategy without some sort of rejection/continuation/... (like your proposal) is doomed to fail.

I haven't checked if their proposal is actually optimal. Empirically, it's suggestive of having room for improvement. I'm seeing something like 101 flips on average instead of 12.377 for that 99% bias example.

Re: Show HN: Play with real quantum physics in your browser

#58
In the many worlds interpretation, if one connected this computer to a machine that would instantly kill you if the result was heads, you as the observer should find that you never die, but rather that the machine always seems to come up tails. Is that correct? Might be cool for some kind of euthanasia patient to experience.

Re: Show HN: Play with real quantum physics in your browser

#59
A few years ago I heard a story on NPR about someone who built a site that also used the IBM quantum backend. They had you input a question about what you should do with your life (I think the example was "Should I grow a beard?"). Then the quantum backend would give you a yes or no answer.

The idea here is that if you believe the many worlds interpretation then that quantum decision splits the universe in two, and in one universe you grow a beard, and in the other you don't.

I thought it was a fun idea.

Re: Show HN: Play with real quantum physics in your browser

#60
post #15

Tangent, but interesting: how do you get fair samples from a biased coin? 1. You take a string of biased samples like 001011100101 2. you split it in pairs 00 10 11 10 01 01 3. you keep only pairs with a zero and a one in them 10 10 01 01 4. You assign 0 and 1 to them, e.g. 1 1 0 0, this is a fair sampling from an unbiased coin Why does it work? Because even if p(0) ≠ p(1), p(01) = p(10).

[deleted]
Post reply on HN