Show HN: Quantum suicide in Python
github.com
github.com
[0] BTW, it's annoying to read a book by a Swedish author, in Swedish, that has translation issues. The author is Swedish-American, so the book was written in English and translated by someone else.
https://mitpress.mit.edu/sicp/full-text/book/book-Z-H-28.htm...
This library is significantly less useful than amb for non-deterministic computing, but that doesn't seem to be the goal...
The quantum example is interesting because it gives us a sneak peek into the future for where it will be possible to write similar code in O(1) time!!
For quantum suicide (as in https://en.wikipedia.org/wiki/Quantum_suicide_and_immortalit...) - it still makes me think. Maybe it makes sense to gamble with others (using photons in superposition), putting my life at stake. And e.g. in the only 1/1024 universes I live I have x1024 money (and other universes do not matter to me).
For the reasons it seems that it is good to be brave in danger - for all brave succeed. Except for ones that did not and won't tell their stories.
The lower the probability of winning a bet (and so, the higher the potential gain), the more reliable you need your suicide system to be. For relevant gains, this becomes a non-trivial engineering problem. (e.g. suppose you need a gun that only jams for one in every billion shots, or a computer that can run for billions of seconds without crashing or malfunctioning).
So why there may be problems (like: photon was not detected due to finite sensitivity) in this setting the wounded-but-not-dead outcome is negligible. In general, it is easy to amplify quantum effect with such avalanche reactions.
When it comes to MWI - it is the hard part. I am not sure if I believe it; or what is it's interpretations (maybe it's still unethical to having mourning families and friends in 1-\epsilon worlds). Also: even if I gamble many times, and I find myself alive - does it mean is it correct? And even if - there is no way of announcing it.
And also, on a funnier note - Everettian dating: https://www.youtube.com/watch?v=vBkBS4O3yvY
1. Something in the world depends on a choice you make. If you choose correctly, you win. Ideally, there are a large number of choices, e.g. lottery, stock, bitcoin private keys, whatever. 2. You use quantum randomness to make the choice 3. The machine you constructed checks whether you won 4. If you did not win, it kills you
So you need to have a machine that reliably checks for a win, and kills you if it doesn't find one. How does having two detectors for the proton help?
For practical things: I won't. But I bet some people would.
(BTW: Did you actually learn QM?)
Changing the experiment to require 1. illegal acts i.e. betting on someone's death, 2. knowledge by others, introducing an interference factor, etc changes the thought experiment. Of course, it may be valid as a thought experiment if it adds an interesting new complication, or removes a complication that wasn't essential to the paradox.
But remember, the objection you proposed your scenario to avoid was the possibility of something going wrong with the suicide attempt. Changing the entire scenario to be less plausible seems a bit too much for a staightforward objection like that.
I will check out later the code
HOWEVER simple and easy solutions often are better, so based on the same simple idea the same experiment could be reimplemented with green threads and separate/cloned python environments in order to ensure that there is no shared memory.
In my opinion it is still a genius work, just missing compiler support for such construct.
A really simple example would be something like logpy [1]. You give it a set of variables, and a set of constraints, and it will try to efficiently solve for values that meet all the constraints.
A more professional-grade logic solver might be Clojure's core.logic [2], which has been used in many real-world applications. Compare the core.logic Sudoku solver [3] with the quantum version. They are similar, in that they each set the constraints for a solved board, but core.logic is vastly, vastly more efficient.
[1] https://github.com/logpy/logpy [2] https://github.com/swannodette/logic-tutorial [3] https://gist.github.com/swannodette/3217582
r = qrandom()
print(r)
wait(10 minutes)
if(EUR/USD != r) then fail()
will predict, what exchange rate of EUR/USD would be after 10 minutes. And if instead of r = qrandom() we put r = 1.5, than we force EUR/USD to be 1.5. Another nice thing I'd like to try is webcam that looks to the future using the same principle :)
Didn't get what does the exit code 55 mean though.
Incidentally, that sounds like a great idea for a novel!
Immediate edit: So on a lark I looked up "tilde ath" and found someone actually implemented some of it [0]. It's more focused on bifurcation than threading, and I think it might be improved by something like OP's `quantum`. At least we could simulate the plot a bit.
Regardless, I was sad about that as well. You just can't appreciate the MRDV properly without it. [1] Or without the ensuing War & Peace-sized volumes of comic/chatlog either, I guess.
[1] http://vignette4.wikia.nocookie.net/mspaintadventures/images...
[2] Only Duff's Device comes to mind here, but I think we're looking at something more pathological with the MRDV