As its name suggests, quantum computing utilizes the properties of quantum physics to tackle certain complex problems faster than any classical computer or algorithm can do. These properties are discussed in the “Quantum Physics” subsection, but what we want to highlight here is the key differences of classical and quantum computing. Namely the following:
Classical bits vs quantum bits
Classical gates vs quantum gates
The goal of this subsection is not to go deep about these concepts, but rather to help readers familiarize themselves with these terminologies before attending our workshop.
There are many ways to encode information into states, and essentially bits are something with the least possible states (2 states) and as such they carry the least amount of information possible. To quote from Thomas Wong: “A bit is the smallest unit of classical information”.
A bit is something that can be an on state or off state, or more commonly a 1 or a 0.
A qubit on the other hand is quite different. Many say that it can be anything "between" 0 or 1 but it is better to say that:
A qubit is "something" that has a certain probability of being a 1 or a 0.
This is what we called “superposition”. A qubit might be at a 100% chance of becoming a 1 (in which case it is no different than an ordinary bit), or maybe a 50-50 chance of becoming a 1 or a 0, or maybe some arbitrary probability like 19.25% of being a 1 and 80.75% of becoming a 0.
Let us take a look at how engineers physically make bits and qubits. A common example of a bit would be a coin where it can either be heads or tails. Another example is a light switch, where it can be on or off. Physical systems with more than two states can also be treated as a two-state system if we simply ignore the rest of the possible states. For example, a 6-sided dice could be treated as 2 states if we say our first state is rolling any number less than or equal 3 and our second state is rolling any number more than or equal 3. In computing, it is more convenient for us to designate our states as binary digits 0 or 1. So, we could say a head on a 2-sided coin represents a digit 0 while a tail on the same coin represents a 1.
More commonly in computers is to use voltage to determine a 1 or a 0. They use something called a transistor to act as a switch, effectively turning on for a 1 and off for a 0. Specifically we have:
0 volts : 0
5 volts : 1
Qubits on the other hand are a lot harder to engineer. Some examples of qubits are as follows:
Photons. Essentially what light is made of, they possess a property called polarization, which can be vertical or horizontal or a superposition of both.
Trapped ions. An ion is a particle with a charge. Two energy levels of an ion can be used as a qubit.
Cold atoms. Neutral atoms can be trapped at low temperatures and two energy levels of it can be used as a qubit.
Nuclear magnetic resonance (NMR). The quantum property called spin of the nuclei of atoms can be used as a qubit.
Quantum dots. It is essentially an electron and we measure its spin so that it can be used as a qubit.
Superconductors. Charge flows with zero resistance in a superconducting circuit, the flow of charge creates a magnetic flux across an inductor and the charge on a capacitor which causes a harmonic potential energy with equally spaced, discrete energy levels. A Josephson junction is a thin insulating layer that is added, and it changes the potential energy so that the energy levels become unequally spaced. Then, the energy levels can be distinguished, and two of them can be used as a qubit.
Importantly, these systems contain the same amount of information: Two distinct quantum states.
We use Bloch sphere as the geometrical interpretation of a qubit. A Bloch sphere has its north and south poles represented as |0⟩ and |1⟩ respectively. We now use this notation called the Dirac notation instead of 0 and 1, in which you can read up more about in the quantum physics section.
Figure 1: Bloch sphere with |0⟩ and |1⟩ state at the top and bottom of the z-axis respectively
Here is an example of a state that has a 50-50 chance to be |0⟩ or |1⟩.
Since the square of the coefficients represents the probability, after squaring we will have ½ probability or a 50-50 chance to get |0⟩ or |1⟩. This particular state can be represented on the Bloch sphere like this:
Figure 2: Bloch sphere of qubit 1/√2(|0⟩+|1⟩)
Note that this qubit lies directly in the middle of the |0⟩ and |1⟩ state. This indicates a 50-50 probability to be either of the two. Now if say the qubit is instead 1/√2(|0⟩-|1⟩), changing the + sign to a -. Then on the bloch sphere it will look like:
Figure 3: Bloch sphere of qubit 1/√2(|0⟩-|1⟩)
It is good to know that these two states actually can be represented as |+⟩ and |-⟩respectively. So:
The last two states we’ll cover is where the qubit lies on the y-axis, again due to its relative phases, we get:
Figure 4: Bloch sphere of qubit 1/√2(|0⟩+i|1⟩)
And the on the other side:
Figure 5: Bloch sphere of qubit 1/√2(|0⟩-i|1⟩)
Now these two states also have a name which are |i⟩ and |-i⟩respectively. So in summary:
The Bloch sphere is a physical representation of the states of the qubit, and the understanding of each of them is useful before proceeding with gates and algorithms.
Aspects
Bit
Qubit
What they represent:
Distinctly 1 or 0
Could be either 1 or 0 with a certain probability respectively
Real-world examples
Transistors, Microscopic Dents
Photons, Trapped ions, Cold atoms, NMR, Quantum dots, Superconductors
Geometrical interpretation
A straight line between 0 and 1
Can be represented on a Bloch sphere
Gates are transformations from one state into another state consistently. Here are some of the examples of classical gates.
Classical Gate:
Identity gate is a gate that does nothing to the bit. A 0 remains 0 and 1 remains 1. The symbol for this gate and its truth table* is:
Figure 6: Classical Identity Gate Symbol and Truth Table.
Not gate is a gate that “flips” a bit from 0 to 1, or 1 to 0. The symbol a triangle with a small circle.
Figure 7: Classical Not Gate Symbol and Truth Table.
Always 0 gate is a gate that always outputs 0. No symbol for this one.
Figure 8: Classical Always 0 Gate Symbol and Truth Table.
Always 1 gate is a gate that always outputs 1. No symbol for this one.
Figure 9: Classical Always 1 Gate Symbol and Truth Table.
A gate is reversible when we pass the outputs back into the gate, it will return the inputs again. A clearer picture of the concept of reversibility is that each input produces unique output. So from the examples above, the identity and not gate are reversible, while the always 0 gate and always 1 gate are not reversible.
Quantum Gate:
A quantum gate is similar to classical gates in the sense that they transform some state into another state consistently, however there is a key requirement that a quantum gate must have, i.e. the probability to get either state must be equal to 1 after the transformation.
Knowing this, we can prove that any classical gates that are reversible are valid quantum gates.
Identity gate turns a |0⟩ into a |0⟩ and a |1⟩into |1⟩. We denote this gate as I. This also applies to the other states |+⟩, |-⟩, |i⟩ and |-i⟩
Not gate, or more formally Pauli X gate, turns |0⟩ into |1⟩, and |1⟩ into |0⟩. We denote this gate as X.
Now let's look at the changes to the other states, |i⟩ and |-i⟩ interchange as well, while |+⟩ and |-⟩ remain unchanged. (Note applying X|-⟩= -|-⟩≡ |-⟩because of global phase). Knowing this, this gate on the Bloch sphere can be geometrically visualised as the rotation of the qubit about the x-axis by 180°.
Figure 10: Pauli X Gate can be represented as a 180° rotation about the x-axis
So these two gates are classical reversible gates that are also quantum gates.
Pauli Y gate turns |0⟩ into i|1⟩, and |1⟩ into -i|0⟩. It is denoted as Y and it can be shown that this gate is a rotation about the y-axis by 180°.
Figure 11: Pauli Y Gate can be represented as a 180° rotation about the y-axis
Pauli Z gate keeps |0⟩ as |0⟩ and turns |1⟩ into -|1⟩. This is denoted as Z and can be represented as a rotation about the z-axis by 180° on the Bloch sphere.
Figure 12: Pauli Z Gate can be represented as a 180° rotation about the z-axis
Hadamard gate turns |0⟩ into |+⟩ and |1⟩ into |-⟩, and vice versa. It also turns |i⟩ into |-i⟩ and vice versa. It is denoted as H and can be represented as a rotation about the x+z-axis by 180°.
Figure 14: H Gate can be represented as a 180° rotation about the x+z-axis
These are all the single qubit gates that we would like to highlight. It is important to note that:
One-qubit quantum gates are rotations on the Bloch sphere.
Aspects
Classical Gates
Quantum Gates
What they represent
Changes one state to another
Requirements
No specific requirements
Must keep the total probability equal to 1
Geometrical interpretation
No geometrical interpretation
Single qubit gates can be represented as rotations on the Bloch sphere
Examples
Identity, Not, Always 0, Always 1 gate
Identity, Pauli X(Not), Pauli Y, Pauli Z, Hadamard gate
References (Content and Images from):
Wong, T. G. (2022). Introduction to classical and quantum computing. Rooted Grove.