Quantum Computing in AI : Is it just another buzzword?

AshNeurotech
The Quantastic Journal
7 min readJul 23, 2024

I know I’m not the only one who’s been hearing the words “Quantum Computing” thrown around as a panacea to all the world’s most difficult problems. I recently watched a video claiming Quantum Computing could manipulate time, create digital afterlives, and cure all diseases. So, how do we separate fact from fiction?

Why Quantum Computing?

The field of Quantum Computing was born out of the general annoyance of Richard Feynman, one of the most brilliant theoretical physicists of the century. When attempting to design a simulation of quantum events on his computer, he noticed that with each particle he added to the model, the cost of computation rose exponentially. He quickly realized classical computers couldn’t scale fast enough to keep pace with quantum computations. This conclusion drove him to present the idea of a “Quantum Computer”, which would operate according to the laws of Quantum Physics.

Richard Feynman in Cornell University, 1948
Richard Feynman, at Cornell University, 1948. Image from SCIENCE PHOTO LIBRARY

Quantum Physics Behind Computing

Quantum computers use qubits, which are typically subatomic particles such as electrons or photons. In quantum mechanics, the state of a quantum system, such as a subatomic particle, is described by a wave function, which encodes the probability amplitude of finding the particle in various states.

Simple Wave Function.
Simple Wave Function. Image from Reading Feynman Blog

The qubit vector contains amplitudes rather than measurement probabilities. An amplitude is closely related to a probability, but while probability is always a number from 0 to 1, amplitudes are complex numbers and obey different rules. The way you describe a physical system is by a list of amplitudes, and the way a system changes over time is a linear transformation of these amplitudes. In order to know the total amplitude for something to happen, you must add up the amplitudes for all the different ways it could have happened. When a particle can reach a particular outcome through multiple paths, the total amplitude for that outcome is the sum of the amplitudes for each path. So, a particle may reach a certain place one way with a positive amplitude and another way with a negative amplitude, causing the two amplitudes to cancel out. This means the event never even happened.

The wave function ψ(x,t) gives the amplitude of finding a particle at position x and time t. The probability density of finding the particle at a specific location is given by the square of the wave function’s corresponding amplitude:

Measurement Probability Formula.
Measurement Probability Formula. Image created with Google Docs Equation.

The Basics of Quantum Computing

A Classical Computer utilizes bits, which are like switches that can either be 0 or 1, to store information. A quantum computer employs Qubits which can be 0, 1, or any linear combination of the two. This spectrum of states is called a superposition. Qubits allow the computer to process and store much larger and complex data extremely quickly. The pivotal aspect of Qubits is its property of measurement. When a Qubit is measured, it loses its superposition and collapses into a 0 or 1. The probability of collapsing to any particular state(0 or 1) is determined by the amplitude of that state in the superposition. An arrow pointing between 0 and 1 doesn’t measure 0.5, but rather the qubit has a 50% chance of measuring a 0 and a 50% chance of measuring a 1.

Classical Bit (left) versus Qubit (right.)
Classical Bit (left) versus Qubit (right.) Image from Hafiz Attaullah

The state of Qubits can be altered through the use of Quantum gates. For example, we can have a Qubit in position 0, and use an H gate to put it in a superposition between 0 and 1. Quantum logic gates are complex matrices compared to the simple AND/OR gates used in classical computers.

Transformation of Qubits through H-Gate.
Transformation of Qubits through H-Gate. Image from Samuel Bosch Youtube

To put simply, a quantum state is the linear combination of the 0 state and 1 state. Through a process called interference, operations can be applied to the 0 state and 1 state simultaneously, performing 2 calculations at once (since the qubit will collapse into either 1 or 0 at varying probabilities when measured). This parallel computation is what makes Quantum Computing so powerful. When the operation is performed, the qubit is considered “measured”, so we can get only a single answer from the parallel computation instead of all the answers.

Three types of computing: Serial Computing, Parallel Computing, and Quantum Computing.
Three types of computing: Serial Computing, Parallel Computing, and Quantum Computing. Image from Semantic Scholar

And, to make sure the single answer is the correct one, quantum gates need to be arranged so it amplifies the correct answer and cancels the incorrect ones in a process known as interference. Quantum Algorithms manipulate the superposition of states in a way that the amplitudes of the correct solutions are increased (constructive interference), while the amplitudes of the incorrect solutions are decreased (destructive interference).

Quantum Circuit Diagram: A visual representation of a quantum algorithm implemented using a series of quantum gates (H, Ry, U2, U3.)
Quantum Circuit Diagram: A visual representation of a quantum algorithm implemented using a series of quantum gates (H, Ry, U2, U3.) Image from Quanta Magazine Youtube

The “correct answer” refers to the overall quantum state of qubits in the system that represents the correct solution to the problem. If we consider Shor’s algorithm, the correct answer would be the overall quantum state, acquired through quantum operations, that gives the set of factors p and q such that N = p x q. If you’re thinking it sounds borderline impossible to concentrate the amplitude on the correct answer when you have no idea what the correct answer is, you’re absolutely right. This is what makes Quantum Algorithms so difficult to develop.

Another critical property of Quantum Computing is entanglement. When Qubits are entangled, their states become strongly correlated. Changing the state of one qubit will change the state of another. We can entangle two qubits, so their states have a 50% chance of measuring 0,0 and a 50% chance of measuring 1,1. Entanglement allows quantum computers to manipulate many qubits in a single operation, unlike classical computers.

Schema of superposition and entanglement.
Schema of Superposition and Entanglement. Image from Quantam Image Gallery

The Future Of Quantum Computing with AI

Quantum Computing with AI has the potential to revolutionize drug discovery, cryptography, personalized medicine, AGI, and so many fields. The ability for Quantum computers to process and represent many states simultaneously allows them to solve very difficult problems that were previously thought impossible with classical computing. However, the field of Quantum computing requires significant advancements in hardware, reliability, and programmability before this becomes a reality. Peter Shor (creator of the Shor quantum algorithm) made an interesting point that even with classical computing, we don’t know what’s happening behind the black box of Neural Networks. If we start writing AI algorithms for Quantum computers, it’s a big question mark if they will even be viable. While only time will tell if it will live up to its potential, companies like Google and Nvidia are working on paving the path for Quantum Computing with AI.

Google Quantum AI’s Roadmap.
Google Quantum AI’s Roadmap. Image from quantamai.google

Google’s Quantum AI is currently in the early stages of what may be a decade long project to bridge Quantum Computing and AI. Google is currently working on Quantum error correction, which is critical for meaningful Quantum computation. Qubits are extremely sensitive to their external environment; even particles of light can disrupt the system. In 2023, google developed the first error-correcting “logical Qubit” which reduced Qubit error by increasing the number of qubits in a scheme. The next step for Google is the development of a “long-lived logical qubit”, which is capable of performing one million computational steps with less than one error. This involves a huge leap in scalable error correction, and increasing architecture and infrastructure capabilities. Google’s final goal with Quantum AI is to develop a “Large Error-Corrected Quantum Computer” which can reliably control 1 million qubits. To put this in perspective, a 500 Qubit system would need more classical bits than there are atoms in the known universe.

Qubits computational power compared to Classical Bits.
Qubits computational power compared to Classical Bits. Image from Quanta Magazine Youtube

For Nvidia, building a useful Quantum Computer requires improvement of Quantum processors(QPUs): fine-tuned systems for protecting and manipulating qubits. As mentioned earlier, Qubits are sensitive to noise, so optimal control is required to ensure operations performed on qubits minimize noise. Artificial Intelligence is used to develop optimal control sequences that produce the best result from QPUs. Artificial Intelligence can also be used in circuit reduction, which aims to make quantum algorithms as efficient and resource-light as possible. This issue becomes increasingly complex when considering the constraints of qubit topology and the level of the optimization problem. However, researchers from Google DeepMind, Quantinuum, and the University of Amsterdam recently developed an AI method for reducing the number of resource-intensive T gates in a quantum circuit. The paper introduced “Alpha-Tensor Quantum”, a method based on deep reinforcement learning that exploits the relationship between optimizing T-count and tensor decomposition. AI is also being used to enhance state preparation in quantum systems. In order to solve quantum problems, the original problem must be represented in a quantum state, which is a mathematical description of the condition of a quantum system. Many quantum algorithms require the system to start in a specific state. For example, in Grover’s search algorithm, the system must start in an equal superposition of all possible states.

All in All

Quantum Computing may not fix your marriage or allow you to relive your college glory days, but I’m excited about the prospect of efficient Quantum computing with AI, and the future surely looks bright!

Google’s CEO Sundar Pichai with Quantum Computer
Google’s CEO Sundar Pichai with Quantum Computer. Image from WIRED

--

--