Few know that you already can do quantum computing with the Japanese programming language Ruby.

If you have a Ruby interpreter installed on your computer, you can follow the following experiment, which is inspired by Erwin Schrödinger. (See also my article from 1997)

In the quantum world, states are interlaced. In Ruby this is also possible. We produce an interlaced quantum hash like this:

q = Hash.new Hash.new

In this hash we store a box with a cat

q

Join the Conversation

4 Comments

  1. Nothing is strange here. The truth is that in the beginning you’re creating hash having default value set as new hash. So once you write q[:some] = ‘asd’ then q[:other] will also be ‘asd’. In fact be calling q[:some][:thing] = “other” you’re just setting default value to the first Hash.new being {:thing => “other”}. Then the first hash is always empty, but if you call q[:whatever_you_want] then the answer will be the default value {:thing => “other”}.

  2. You will not necessarily need it, but quantum computing will use concepts from higher mathematics, so it will be easier to learn for people with good mathematical background.

Leave a comment