Quantum Computing and Quantum Algorithms in AI

Delve into the world of quantum computing and quantum algorithms!

About Quantum Mechanics

Before we can understand quantum computing, we need to have a little background about quantum mechanics. Quantum mechanics deals with the properties and behavior of matter and energy at atomic and subatomic levels. If you have taken an introductory course in physics, then this may remind you of Classical Mechanics.

The main difference between these two is that in CM (classical mechanics), objects exist at specific places at a specific time, whereas in QM (quantum mechanics), objects exist in a probabilistic manner. This probabilistic nature is inherent to subatomic particles due to their “wave” like nature. A wave function describes the probability of finding a particle at a particular point, and it depends on many factors including the energy level and mass of the particle.

Quantum computing and quantum mechanics are different things. You can be good at one without knowing anything about the other. For quantum computing, we can abstract all of the hardware and properties of the particles and just represent them as a qubit.

Resources for Learning Quantum Computing

WHAT IS A QUBIT?

You may have heard of a bit before, which is a short version for binary digit.

A bit has two values or equivalently two different states it can be in, 0 or 1. This is the basis for all modern computing devices.

Using multiple bits, you can assign combinations of bits to numbers or symbols. Using math you can do operations on those numbers and eventually create a program. A qubit represents the state of a quantum particle, and instead of being in one state it can be in a superposition of 0 and 1. The formula for a general qubit state is a|0> + b|1>

For example, with two bits in a classical computer, each bit can store 1 or 0, so together you can store four possible values – 00, 01, 10, and 11 – but only one of those at a time. With two qubits in superposition, however, each qubit can be 1 or 0 or both, so you can represent the same four values simultaneously. With three qubits, you can represent eight values, with four qubits, you can represent 16 values, and so on.

We cannot store an arbitrary number inside the amplitude of our qubit. For example, we cannot set a = 1234 and then record that. This is because when we measure the qubit, it collapses to one of the stats 0 or 1. This poses another problem. If the state of the qubit it collapses when we measure, we are unable to make use of it.

LEVERAGING QUBITS TO OUR ADVANTAGE

In order to understand some ways we can leverage qubits to our advantage, there are some important properties we need to understand.

The first is gates. We can pass our qubits through gates that apply certain transformations to the qubits. For example the X or not gate lets us flip the state of the qubit from a|0> + b|1> to b|0> + a|1>. Using these gates, we can pretty much do any normal operation that could be done on a classical computer. However we can still do more. By using the properties of interference, we can make different states cancel by adding them up. Finally, with entanglement we can make two qubits go to exactly the opposite states when measured.

Using the properties of qubits, we can create quantum algorithms. An algorithm is a set of instructions that can be executed in some order to derive a solution to a problem. For example we can quickly find the password of an unknown computer by using Grover's algorithm. This algorithm creates a superposition of all possible states of a bit string.

In order to do this, we use the Hadamard gate which can convert the |0> state into an equal superposition between |0> and |1>. Then, we can use this to check all possible passwords at once. However, we cannot selectively find the one that works because that would collapse the qubits to some arbitrary value.

Despite this issue, we can use quantum interference so that the correct state has a higher probability than the wrong ones. In doing so, we can be reasonably sure that when we measure the state, we will get the state we want.

How can you participate in quantum computing?

There are plenty of resources for quantum computing, including the two popular quantum programming languages: Q sharp (Microsoft) and Qiskit (IBM). IBM even has a way to let you run your programs on a real quantum computer for free.

Since quantum computing is a new field, there are plenty of opportunities for you to help!

Previous
Previous

AP CS Exam: Tips for Success on Exam Day

Next
Next

Emerging Role of AI in ASD From a High School StudentWritten