Live data from Hacker News

Show HN: Play with real quantum physics in your browser

quantum.orgsoft.org

41–50 of 78 posts

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

#41
Quantum logic gate > Universal logic gates: https://en.wikipedia.org/wiki/Quantum_logic_gate#Universal_q...

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

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

#42
post #40

Question from someone who's not going to even pretend to understand quantum physics.. 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.

Quantum mechanics tells us that the qubit (coin) can exist in any linear superposition of heads and tails. To express this you write a|heads> + b|tails> the only constraint is that a^2 + b^2 must equal 1. Now why would that be the constraint? It is because a^2 and b^2 are the probabilities of measuring heads and tails respectively. In this example the coin is put into the state where an and b equal 1/sqrt(2) to give…

Oh and to be clear the visualization is nonsense it doesn’t relate to anything.

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

#43

It's not true that computer randomness is predictable, all recent computers have entropy sources which are essentially quantum in nature - thermal noise.

Thermal noise entropy is probably good enough for most practical uses, but it's still fundamentally producing a seed value that can be captured, misused, or bruteforced, right? Also curious if there are monte-carlo models looking at this to see "how uniformly random" they look.

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

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

#44
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).

how do you get biased samples from a fair coin? (say, 0.3)

(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?

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

#45
post #43

It's not true that computer randomness is predictable, all recent computers have entropy sources which are essentially quantum in nature - thermal noise.

Thermal noise entropy is probably good enough for most practical uses, but it's still fundamentally producing a seed value that can be captured, misused, or bruteforced, right? Also curious if there are monte-carlo models looking at this to see "how uniformly random" they look. Edit: I think figure 3 in this study is what I'm looking for. They define the inconsistency I described as "spectral pivoting". > This discre…

In practice it would be very difficult to predict RDRAND outputs. Even so I believe the truly paranoid can use RDSEED to skip the PRNG step. Not qualified at all to talk about how they de-bias the measurements.

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

#46
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).

However, that stops working as soon as you have a biased coin with memory. ;)

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

#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 receiving any new results.

$ 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

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

#50

I've wondered for a long time what the user experience for quantum computing will look like. I had imagined some library with a type for "qbit" and an dsl for making them interact in certain ways and then some kind of async thing where your classical code could run locally while periodically shuttling data to and from wherever the quantum computer is. This isn't quite that but I guess it's a first step.

They already exist import numpy as np from qiskit import QuantumCircuit # 1. A quantum circuit for preparing the quantum state |000> + i |111> / √2 qc = QuantumCircuit(3) # generate superposition qc.h(0) # add quantum phase qc.p(np.pi / 2, 0) # 0th-qubit-Controlled-NOT gate on 1st qubit qc.cx(0, 1) # 0th-qubit-Controlled-NOT gate on 2nd qubit qc.cx(0, 2)

Thanks for the pointer to qiskit, I'm gonna go learn...
Post reply on HN