Introduction to Quantum Computing
Writing my first quantum score
In this lesson, you will create an account on the IBM Q Experience site. Beginners guide; using Composer to copy recipe programs/scores and validate output using the measurement tool.
1) Create an account
IBM is a computer company that has made a quantum computer available to the public. To run any programs on this quantum computer, you need to create an account. Use the link on the right to point your browser to the IBM Q Experience web page and click Sign in > Sign Up > .
Once you have an account, you can begin to use the quantum computer simulator. Make sure you write down your username (e-mail address) and password, or put these into your password manager application. [Keepass is a suitable app for your mobile phone to manage all your passwords, or others are reviewed here].
If you now go to this web-page, you will see the composer. https://quantumexperience.ng.bluemix.net/qx/editor
This is where you can create your quantum programs. Let’s start with a simple one. Click on ‘New’ and provide a name for this experiment – let’s call it ‘Beginner’. Choose the ibmqz4 (5 qubit transmon bowtie chip 3) to run it on. You’ll see a display rather like this:
On the left you can see the five lines for each of the five qubits (q(0) to q(4)). On the right you can see some of the gates which correspond to the instructions for the quantum computer.
So, what state are the qubits in right now?
Let’s find out.
Drag the measuring tool from the gates area onto the line for q(0). Your score should look like this:
Now click on the ‘Simulate’ button in the top right corner. After a short time, you should see the output of your program, something like this:
This is a probability diagram. It shows you the probability that your measurement has found the value at the bottom. We can see that the value is ‘00000’ or zero. And the probability of q(0) being in this zero state is given by the height of the blue bar. This is level with ‘1’, which means it is CERTAIN.
You might be wondering why there is a probability associated with the output of your first program. Well, this is a quantum computer, and it obeys quantum rules. When a ball drops down, it contains many millions of atoms. Collectively, their behaviour is very predictable. The ball does not stop falling unless you catch it. It does not rise up again unless you throw it.
But individually, atoms obey probabilistic quantum rules. Electrons tend to stay near to the nucleus of their atom, but their position cannot be determined precisely. Looking at an electron would require us to hit it with a photon of light, and see the reflection. But in hitting the electron with the photon, we would have disturbed it!
Complicated mathematics called ‘wave-mechanics’ can plot the expected positions of an electron. We can say where it can probably be found using these equations. You won’t need to work them out, but need to understand this quantum behaviour is reflected in the quantum computer you are programming.
Find out about the Schrödinger Equation by watching this video: