Show HN: Play with real quantum physics in your browser (quantum.orgsoft.org)
I wanted to make the simplest app to introduce myself and others to quantum computing.
Introducing, Schrödinger's Coin. Powered by a simple Hadamard gate[0] on IBM quantum, with this app you can directly interact with a quantum system to experience true randomness.
Thoughts? Could you see any use cases for yourself of this? Or, does it inspire any other ideas of yours? Curious what others on HN think!
[0] https://en.wikipedia.org/wiki/Quantum_logic_gate#Hadamard_ga...
77 comments
[ 3.1 ms ] story [ 147 ms ] threadMaybe I am so disconnected from the rest of reality, I count as absolute, non destructive observer?
This isn't quite that but I guess it's a first step.
Why does it work? Because even if p(0) ≠ p(1), p(01) = p(10).
Wikipedia: https://en.wikipedia.org/wiki/Fair_coin#Fair_results_from_a_...
Original paper: https://mcnp.lanl.gov/pdf_files/InBook_Computing_1961_Neuman...
(this one has less wow, i guess)
1. You take a string of fair samples 0101011101010 2. you split it into chunks of 3 (8 possibilities, so each one is 0.125 chance) 3. 000, 001, 010 -> 1, and all the rest is 0, which will get 0.275 chance
Any better approaches?
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.
I picked "block of 64 with only a single tails" since it was simple, and I'm sure a mathematician could figure out how to optimize it much more, but my general point is to agree that there's definitely ways to get closer to the theoretical upper bound you mentioned.
"An ideal unbiased coin might not correctly model a real coin, which could be biased slightly one way or another. After all, real life is rarely fair."
https://www.eecs.harvard.edu/~michaelm/coinflipext.pdf
> Failed to get quantum result from server
cloudflare connection timed out
I was surprised to see this on the frontpage this morning and the scale is pushing the limits of our quantum randomness generator
It should be working again now as I'm pushing fixes. Thanks for your patience.
Edit: I think figure 3 in this study is what I'm looking for. They define the inconsistency I described as "spectral pivoting".
> This discrepancy is because the Mermin-Wagner-Hohenberg theorem holds in the thermodynamic limit, while these simulations are for finite lattices
I think thermodynamic limit here means, it needs to be way too hot?
https://arxiv.org/html/2403.09078v1
As a small remark, classical and quantum coins are equally susceptible to bias. So the initial intro is a bit misleading.
That said... as a demo of a stack using quantum cloud compute, it's all in good fun and I shouldn't be a stick in the mud.
The explanation says the visualization shows the coin in all possible states. I'm trying to count quickly and it seems like about 8. Does all possible states mean there's an infinite number and 8 are shown for visualization purposes, or is there a finite predictable number of possible states.
In this example the coin is put into the state where an and b equal 1/sqrt(2) to give an equal probability of each outcome. So there is exactly one state associated with the coin. Now this state does lead to two possible outcomes but the underlying state (that can not be directly observed) is exactly one thing.
From https://news.ycombinator.com/item?id=37379123 :
> [ Rx, Ry, Rz, P, CCNOT, CNOT, H, S, T ]
From https://news.ycombinator.com/item?id=39341752 :
>> How many ways are there to roll a {2, 8, or 6}-sided die with qubits and quantum embedding?
From https://news.ycombinator.com/item?id=42092621 :
> Exercise: Implement a QuantumQ circuit puzzle level with Cirq or QISkit in a Jupyter notebook
ray-pH/quantumQ > [Godot] "Web WASM build" issue #5: https://github.com/ray-pH/quantumQ/issues/5
> [Quantum Flytrap] Virtual Lab is a virtual optical table. With a drag and drop interface, you can show phenomena, recreate existing experiments, and prototype new ones.
> Within this environment it is possible to recreate interference, quantum cryptography protocols, to show entanglement, Bell test, quantum teleportation, and the many-worlds interpretation.
[0] https://cheapuniverses.com/
Earlier discussion: https://news.ycombinator.com/item?id=30499169
$ curl https://quantum.orgsoft.org/info
{"status":"ok","message":"Connected to IBM Eagle r3 (127 qubits)","display_name":"Eagle r3 (127 qubits)","alias":"ibm_kyiv","version":"1.20.22","num_qubits":127,"processor":"Eagle r3","url":"https://quantum.ibm.com/services/resources?system=ibm_kyiv"}
$ curl https://quantum.orgsoft.org/flip
1
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.
[1] https://spectrum.ieee.org/behind-intels-new-randomnumber-gen...