HACKER Q&A
📣 parpfish

Can you use a quantum RNG to create all possible programs?


Woke up this morning with a strange thought that I'm hoping the geniuses here at HN can poke some holes in.

let's say that I take a quantum random number generator and use it to create a random-length sequence of random bits.

it'll probably be a meaningless random sequence, but by pure dumb luck you might just end up with something that could be compiled and run as a program.

if you looked across all the universes in the multiverse, would it be true that all possible programs now exist (within their universes)?

in one universe, i'd get a playable version of tetris. in some other universe, i'd have a program for efficiently cracking passwords. and if AGI were possible, in some universe i'd end up creating AGI.


  👤 gogurt2000 Accepted Answer ✓
Every sequence of bits can have meaning depending on how it's interpreted. If there are infinite universes, then in one them there's a hardware platform that will interpret 'xiHkv9m1twpb0alV5Vn85A95KGdvSsciA4x3V0bzocZeJ3mpbzsKppUnFmySjABp86dUvlgodUyRz8texwaZwbat9odWNJY5yO8S' as a Tetris program. And in another universe that same sequence will be interpreted as a still frame from the movie The Matrix. When you ponder the infinite, meaning kind of dissolves.

It sounds like your "quantum random number generator" would produce a different sequence of bits in every universe? I actually think this breaks things. If every universe gets a different sequence, then there's no promise that any given sequence will align with a universe where it can be interpreted. I also think this means most universes end up with a sequence so long they can't interpret it.

Another way to look at it: if every universe gets a different sequence, then only 1 universe will get any given sequence. As an example, let's take the byte code to print 'Hello world.' in an x86 linux binary. If that sequence is produced in this universe, okay. But if it's produced in a universe where the x86 instruction set is different, or doesn't exist or where the linux binary format is different or doesn't exist, or where English is different or doesn't exist... There's lots of reasons the string might be seen as random garbage. There's just as many reasons the string could be interpreted as a song or a poem or any number of things.

I think to get the outcome of "every possible program is generated," you need to generate the same sequence in every universe, or every sequence in one universe.


👤 codingdave
Sure, this sounds like a modernized version of: https://en.wikipedia.org/wiki/Infinite_monkey_theorem

👤 JohnFen
> by pure dumb luck you might just end up with something that could be compiled and run as a program.

Why hope for that? With an equal amount of pure dumb luck you could get the finished binary executable.