Vectors & Vector Spaces 101, for Quantum Computing

If your a classical developer you will have a basis in maths of some form in any case. To become a quantum developer you have to either refresh your knowledge or get back to learning some linear algebra. We start with some vectors and vector spaces.

To Vectors We Go

The vector is one of the most important mathematical quantities in quantum computing. It has both direction and magnitude. Consider below we have a vector V with x and y components,

\begin{equation*} V = \begin{pmatrix} 3 \\ 5 \end{pmatrix} \end{equation*}

Visually this is 3 units along the x-axis and 5 units along the y-axis pointing in a direction no matter where its tail starts.

In Quantum Computing , vectors are used to show a particular quantum state. These are called state vectors and are visualised using a Bloch Sphere.


The Bloch Sphere ( a.k.a The Unity Sphere )

The Block Sphere contains all the possible points, the state space, that represent a quantum state to which our state vectors can point. The red vector below for example |y> corresponds to a superposition between |0> and \1> . Imagine the red vector below being able to move and point to any point inside the sphere, representing a different quantum state essentially.

https://en.wikipedia.org/wiki/Bloch_sphere

Quantum States And The Bloch Sphere | Quantum Untangled

A 3 minute video on the Block Sphere …

The Vector Space

A vector is an element of a vector space. A vector space is a set of objects where 2 conditions hold.

The first condition is that a Vector addition of 2 vectors with real numbers in the vector space V produces a 3rd vector with real numbers in the vector space V

\begin{equation*} \begin{pmatrix} x_1 \\ y_1 \end{pmatrix} + \begin{pmatrix} x_2 \\ y_2 \end{pmatrix} = \begin{pmatrix} x_1 + x_2 \\ y_1 + y_2 \end{pmatrix} \end{equation*}

The second condition says that the scalar multiplication of a real number vector and some real number value n, is also in the vector space, for all n contained in the real number set.

\begin{equation*} \left\lvert \begin{matrix} n|v \\ \end{matrix} \right\rangle = \begin{pmatrix} nx \\ ny \end{pmatrix} \in V \\ \forall n \in \mathbb{R} \end{equation*}

If you have come this far, your doing well. That’s all for now. Next up, Matrices and Matrix Operations !

Entanglement – Quantums “spooky action at a distance” ? Well .. no.

The topic of quantum entanglement is an important thing to understand in quantum physics and important to know for quantum computing. In classical computing we work with definite values that are observed the same for however long they exist. In a quantum system the values are not in a defined state.

But what does that really mean ?

Albert Einstein used his colourful commentary when he called quantum entanglement “spooky action at a distance”. When I first started looking at quantum my brain almost broke because I was under the impression that 2 entangled particles were actually connected to each other in some way that when one changes the other changes instantaneously. Surely, this is how we will communicate over massive distances as this evolves. It’s like magic! It is spooky or uncanny but thats not quite how it works.

I know …. hold … keep going … your almost there !

So, whats happening?

When two particles are in an entangled state, there is no action that occurs, that is when one changes state it does not exert a change on the other, which would for example allow a message to be sent instantaneously.

What happens is that after changes occur in state to the 2 entangled particles, say one on earth and one on a satellite in orbit, if you then bring the data from both together, after the fact, there is an uncannily perfect correlation between them. They don’t have the same “value”, but their “values” is correlated. The act of observation causing a quantum wave collapse …. another topic I will cover later.

In my previous post we talked about superposition, well entanglement is a special form of that. It is in this ability of quantum systems to have these multiple states, that with certain types of problems we will ( it is thought ) have extra ability to solve them either at all or quicker, over using classical computing.

This 8 minute video from the Scientific American gives a good overview of the inner workings of a quantum computer.

Quantum Computing is good for certain types of problems, for example when your trying to find a needle in a haystack, this is where quantum computers shine…

Scientific American

If you have some more time you can listen to Neil DeGrasse Tyson and friends on the topic of quantum entanglement. It starts with an analogy to the wishing bone experiment, and is a nicely relaxed explanation and fun discussion. Just about 10 minutes in, Mr. DeGrasse Tyson has a classic penny drop moment, or does a great impression of someone having one… it’s probably the latter. Enjoy!

My Quantum challenge ?

It’s time to become a quantum developer. And yes I will update my linkedin profile to say that! 😉 I will endeavour to learn everything I can in the area of quantum development using IBM’s resources and its software libraries. Where possible I will share all the links out and you can follow along. My “beginners mind” is set and ready to go ( Shoshin) .

Shoshin : It’s the open-minded attitude of being ready to learn; without preconceived notions, judgement or bias.

To follow along then keep an eye out on my blog or follow me on linkedin https://www.linkedin.com/in/andrewpenrose/ where I will share the blog post links and updates.

The Basics of Quantum Computing .. Quantum Superposition

I am the first to admit that a deep understanding of quantum physics is not something I have, and my goal ( or your goal ) of becoming a quantum developer does not necessarily need it. No more do you need to know the inner workings of transistors or microchips in order to be a classical developer using java, the same applies for quantum. However, let us delve into some basics, that will help us with the nomenclature of the software libraries we will use.

Quantum States Poster Wall Decor - Buttered Kat in 2021 | Physics poster,  State posters, Chemistry education

The Nobel prize-winning physicist Richard Feynman is attributed to the quote “If you think you understand quantum mechanics, then you don’t understand quantum mechanics”, and he was the leading physicist in the area, so let’s not get too caught up if we don’t fully understand everything. Try and develop a sense of meaning, as if you were going to try and explain it to someone else.

(Quantum) Superposition

The noun superposition is defined as “the action of placing one thing on or above another, especially so that they coincide.” Quantum superposition means that any two quantum states can be added together (superposed) and a valid quantum state will result. Or, that any quantum state can be defined by one of more quantum states.

Now … using this idea of superposition , let us take the example of sets of coins. We write out their states ( H – heads, T – tails) first…

2 coins – HH, TT, HT , TD – 4 results

3 coins – HHH, HHT, HTH, HTT, THH, THT, TTH, TTT – 8 results

4 coins – … – 16 results

5 coins – … – 32 results

So, as we add a coin each time the number of results that we can have are 2^n .

Whereas the n (classical) coins are in only one of the 2^n possible results, n qubits can be in a superposition of all 2^n possible results. ( we will dig into qubits later )

The Probability Difference

In the case of a set of coins, the state that they can be in is a 2^n space. And they can only hold that one particular state, even if we don’t know what that is. As we explained above on superposition , quantum computers can hold superpositions of 2^n distinct logical states, which means they can solve problems potentially exponentially faster. These values can be positive, negative or complex numbers unlike probabilities which are positive or zero.

Quantum Circuits

Where does superposition come into developing quantum algorithms. If you take sound waves for example, one is noise and the other is a cancellation tone to remove noise like in noise cancelling headphones, then the principle of superposition and interference is used to result in cancelled noise.

_images/noise_cancel.png

In the quantum circuit below, which we will develop, the same principles apply. We start with a superposition and then we apply an algorithm by creating a quantum circuit to apply interference on the superposition to result in our solution.

_images/quantum_interference.png

When we are talking about quantum development using qiskit.org for example we are talking about developing these quantum circuits. Next up, entanglement.

My Quantum challenge ?

It’s time to become a quantum developer. And yes I will update my linkedin profile to say that! 😉 I will endeavour to learn everything I can in the area of quantum development using IBM’s resources and its software libraries. Where possible I will share all the links out and you can follow along. My “beginners mind” is set and ready to go ( Shoshin) .

Shoshin : It’s the open-minded attitude of being ready to learn; without preconceived notions, judgement or bias.

To follow along then keep an eye out on my blog or follow me on linkedin https://www.linkedin.com/in/andrewpenrose/ where I will share the blog post links and updates.

Quantum Computing vs Classical Developer – Fight.

Hi, I’m Andrew. Im a Classical Developer.

IBM Q Experience Strives To Bring Quantum Computing To Masses - Quantum:  Machine Learning & Analytics

In the embryonic world of Quantum Computing I am a Classical Developer. No violins, no greek legends, just a keyboard, a mouse, a laptop, and a bunch of screens.

It seems that pre-quantum computing has taken on the common term of Classical Computing ( just like in classical/quantum physics). It had to happen, the same way pre-color film photography was renamed “black and white photography” , after the advent of color film. I can imagine the job adverts of the future on linkedin or irishjobs.ie or where ever, looking for Senior Quantum Engineer’s with a smattering of classical skills. Or classical engineers looking to bootstrap their quantum career in the next quantum startup. So what’s the big deal?

The Superpower of Quantum Computing

The limitations of classical computing is entirely determined by the state of all its bits. We know this. Two states. So 2 to the power of N bits, and we are done. The Summit supercomputer in Oak Ridge National Laboratory developed by IBM , is incredibly powerful but is still limited in that it could not model the immediate state of a caffeine molecule for example. Quantum Computing has a much broader range of states that is defined through the idea of superposition. A quantum computer can take advantage of an exponential number of states and this is its superpower over classical computing. There is a-lot more, but let’s keep it simple for now. The video below will level you up a bit.

One of the perks of working in IBM is you get to see emerging technologies and to use them, and if look back over the past 100 years IBM actually defined them. We have spent decades transforming our software industry enabling us to leverage the infrastructure improvements over time. Mobile app development was not something that was even in our mindsets before we had the devices to develop on. The same applies for quantum computing in my opinion. We are only just trying to understand how we create the assembly languages and frameworks where we can create algorithms to solve problems in the quantum space.

My Quantum challenge ?

It’s time to become a quantum developer. And yes I will update my linkedin profile to say that! 😉 I will endeavour to learn everything I can in the area of quantum development using IBM’s resources and its software libraries. Where possible I will share all the links out and you can follow along. My “beginners mind” is set and ready to go ( Shoshin) .

Shoshin : It’s the open-minded attitude of being ready to learn; without preconceived notions, judgement or bias.

To follow along then keep an eye out on my blog or follow me on linkedin https://www.linkedin.com/in/andrewpenrose/ where I will share the blog post links and updates.

This is IBM Q.

IBM’s Quantum Computer, the IBM Q, jokingly called the Chandelier, has pure gold on the outside, and is kept at very cold temperatures. The bottom, where the quantum chip resides is 15 milliKelvin ( that’s -459.633 Fahrenheit or -273.135 Celcius ).

Quantum mechanics is a branch of physics that studies things that are really small, are really well isolated and really code. IBM Q is built based on what on this branch of science.

Superposition is a key part of how it works. If you take a penny, its either head or tails. If you spin the penny, and while it’s spinning … what is it? It’s in a state of both. Superposition is the idea that it is in both states.

Entanglement in the quantum world, means qubits are connected. If you look at one qubit and it has one value, then the other qubit it is entangled with would also have that same value!

Interference is another concept that is used to amplify the right answers just like you would in wave theory for destructive or constructive interference.

Meet the scientists behind the IBM Q quantum computing systems as they answer 50 questions, one for each qubit in IBM Q. Learn about qubits, dilution refrigerators, even the secret handshake to get into the lab. And get their answer to “what is quantum?”