SPECIAL QUANTUM EDITION 2023
ISSN
LIBRARY OF CONGRESS
2833-0455
CHRISTOPHE PERE, PhD
EDITOR | PUBLISHER
Get ready to upgrade your tech knowledge to a whole new level! Quantum technology is breaking the barriers of traditional computing, replacing the boring old 0s and 1s with an endless array of possibilities. In this article, by Quantum Expert Christophe Pere, PhD, we'll take you on a journey through the fascinating world of quantum computing, where the impossible becomes possible. So sit back, relax, and get ready to witness the future.
Linda Restrepo Editor | Publisher
VERSUS
THE QUANTUM
REVOLUTION
It’s interesting to compare both computing technologies to demystify the quantum world.
The architecture of a classical computer
Here you are close to the rabbit hole. The time has come to jump out of your reality.
Alice discovered a new world down the rabbit hole, just like you in the following pages. We will look at a basic level inside a classical computer to avoid shock and compare the architecture with the quantum computer.
Components of a classical computer
First of all, let’s discuss classical computers. Most of us use a laptop daily, whether for work, surfing the Internet, checking emails, or writing with text editors. How? What are the main components of a classical computer?
The figure above shows the basic architecture for a classical computer, yours and mine.
• The input can be keyboard keys, mouse movements, and actions like copy and paste. It could be an interaction between you and the computer or an internal process.
• The central processor unit (CPU) will receive the input and compute the action. The CPU is only meant to calculate.
• If information is needed, the primary memory called random access memory (RAM) helps to store data with high-speed access. If you shut down the computer, the information in the RAM is destroyed.
• The second memory (disk storage) is when you want to keep the information or when computations involve so much data that you write iteratively on the disk.
A computer is just a way to manipulate and transform information. But the data needs to be in the language of the CPU. What is this language? The computer or CPU only speaks in bits or binary numbers, 0’s and 1’s. 0 means “off” and 1 “on.” Bits correspond to the two states of a transistor. Transistors are electrical switch devices.
If the transistor is “on,” the current passes through (value 1 for a bit). If the transistor is “off,” the current is stopped (value 0).
When Bits create Bytes to store more information
Before diving into the quantum world, it’s crucial to have a good survey on how the information is stored in a classical computer. If we just take one bit of information, we are very limited in the
amount of information we can store. 0 or 1 is called a bit, the minimal information unit a classical computer needs. If you group bits in a sequence, for example, eight bits, you form a byte. Then the magic happens. You will have access to 256 possible values, and every quantum of information, document, computation, picture or movie is based on bytes. Imagine long sequences of 0’s and 1’s like in The Matrix.
With eight bits, you can store 2⁷ bits of information.
Imagine that a hard drive has one terabyte, it’s 10¹² bytes, and in each byte, you store 2⁷ bits of information. It’s a lot.
Example: consider a byte like a letter (ASCII convention); a novel contains around 300,000 words. We could use an average of 4 letters per word, leading to 1,200,000 bytes equivalent to 1,2 megabytes or Mb. Your hard drive can contain approximately 833,333 books. Take a coffee and start reading.
The deterministic aspect of classical computation
The beauty of classical computation lives in the deterministic world. Deterministic means that there is no randomness in the evolution of the system. The output will always be the same if you redo the same operation repeatedly.
A processor obeys Boolean algebra’s rules because it uses binary variables and logical operations (logical gates). All of this is deterministic by nature.
It’s why we see thematics like explainability or interpretability in computer science. Explainability is used as the knowledge we have of a model. We could extract the way the model use information and how. Explainability teaches us the mechanics inside the model and answers to the “how.”
Interpretability is the other way to understand the decision of an algorithm. Interpretability means that the cause and the effect in the decision-making are known.
Classical operations are made in sequential order
The CPU has the power of operations.
When you buy a laptop, the packaging says “3.4GHz,” you may know that the processor can do 3.4 billion operations per second. These instructions are executed
sequentially by the processor. It passes to the next instruction only if the previous one is done, like this:
You can visualize it as reading a text or a book. You don’t read all pages in a block. You follow one line after another to follow the story thread.
Classical operators: the logic gates
Congrats, you reach the point
where you know how to store information on a computer.
You understand that a computer uses sequential operations, but how do you use or process the bits? You will need operators to manipulate and transform the bits.
Sequential operations in a classical computer Draw by the author.
These operators are at the level of the hardware. They are called logic gates and allow the processor to execute the instruction with fidelity.
Operation through the gate Draw by the author.
A logic gate is usually a simple operation acting on two bits in input and output one bit. Seven basic logic gates exist OR, XOR, NOR, XNOR, AND, NAND, and NOT. I will not go through all of the logic gates but look, take the NOT and the AND gates. We will generate what we call a truth table:
As you see in the picture (Operation through the gate) the logic gate NOT will flip the value of the bit, and the AND gate will output “1” only if the two inputs are 1. You can see it as a multiplication 0x1, and 0x0 will output 0, but 1x1 will equal 1.
Operation through the gate Draw by the author.
One interesting thing is that logic gates could perform non-reversible operations, corresponding to loss of information. In the case of the AND gate, we can’t reverse the computation when we have the output because we don’t have the information about each separable bit or state of the bit. The maturity of classical technology will enable you to think in terms of logic gates. The current abstraction of all languages passes above this layer and helps developers to have a better and less complicated life.
The architecture of a quantum computer
A quantum computer is more complicated than a classical one because you need more layers to process the information. The figure below provides you with an overview of the building blocks of a quantum computer. You could see four layers behind the application (compiled quantum algorithm).
The architecture of a quantum computer Draw by the author.
The process can be cut into ten steps dispatched in five layers. It’s a control loop where the information will pass two times in each layer. I will use terms like quantum circuit, quantum bits (qubits) and quantum gates to explain the concept of a quantum computer, but I will teach you what they are later in the chapter. So don’t be afraid; the quantum architecture is just here to see the differences from the classical approach.
1 - When we code the quantum algorithm, the application layer is the first and closer to us. This layer compiles the quantum circuit into the language of the computer (like binary assembly in a classical computer).
2 - The logical layer is an interesting part of the quantum computer. This step will deconstruct your quantum circuit into fundamental gates.
You can create high-level quantum gates in your circuit, but the logical controller will deconstruct your gate into fundamental gates to replace your highlevel gate. This is due to the operations done on qubits; inside the quantum computer, just a few quantum gates are implemented.
3 - Quantum error correction: a big name for this step. The actual quantum computers are noisy, meaning that they have lots of destructive decoherence where the qubit loses the information. This loss changes the result of the algorithm. The typical architecture introduces a layer that modifies the quantum circuit and makes it robust to error, called faulttolerant. Controllers introduce a specific waveform to correct the error.
4 - The virtual layer is a controller between the virtual and physical environments (steps 5, 6, 7). It keeps the structure of the quantum gates and quantum bits.
5 - We enter the quantum region (steps 6 and 7) on a physical device. The qubits are not virtual. They are physical components of the machine. The goal here is to encode the data into qubits. This layer is the storage of quantum information.
6 - Step 6 is where the magic happens. The computer will run the computation with physical components; it’s the processing of quantum information. Your quantum circuit will be executed, and the value of the qubits will change according to the operations you want to generate a result.
which changes the computation. This last step in the physical region observes to measure the result of the calculation. The observation will lead to a collapse of the quantum state of each qubit. They become classical information.
8 - We must pass again by the virtual environment to translate the hardware readout signals into a virtual qubit measurement.
9 - Quantum error correction filters the results and clears statistical errors. This step is called syndrome measurement; the objective is to diagnose which qubit admits an error. Most of the time, they are Pauli errors meaning that the quantum logic gates operate on another operation. Pauli gates will be explained in the following subsections.
7 - No intermediate result of quantum mechanics can be viewed without measurement,
10 - This last step provides the result in a readable format.
Now we know the basics of classical computers, enough to compare them with the quantum computer. Technology evolves so quickly that it is essential to mention the time we reach them.
Quantum computers are based on quantum mechanics. They are fast compared to classical ones, but they also have cons. They are not magical, keep this in mind; it’s not because they are different or based on another physics that makes them magical. Unfortunately, quantum technology is not as mature as classical computing. A QC doesn’t yet possess a quantum computer’s primary memory (QRAM) equivalent to the RAM in classical computing. Much research is done on QRAM; creating this component will allow researchers and industries to access faster and more complex quantum algorithms.
QUANTUM BITS
Previously we have discussed bits, the fundamental information unit for a classical computer. A QC also needs its essential component called quantum bits or qubits. They are more powerful than their classical counterpart. They can take the values 0’s or 1’s and the infinite possibilities between them. Wait, what?
And the quantum journey begins. The figure above shows the difference between a classical bit, two values, 0 and 1, represented in two dimensions (2D) and their quantum twins. A qubit can be visualized in 3D as a sphere; as we will see later, it is called the Bloch Sphere. 0 and 1 are the values at the poles, north and south, respectively.
But the qubit could also take every other position on the sphere. So, we could store lots more information into a qubit rather than a bit.
The significant difference is that bits are discrete values and qubits are infinite and continuous (called states). When a state isn’t 0 or 1, it is in superposition because it is somewhere between.
Classical versus quantum bits Draw by the author.
Probabilities lead the world of quantum mechanics. It is due to the nature of the microscopic scale of matter. Unfortunately, computations will follow the same way. The output has a probability of appearance. That means there are multiple possible outputs for the same input. The computation result will be a probability distribution because you must run your algorithm numerous times.
Parallel instances
One of the advantages of quantum computing is that you don’t need sequential operations or loops. Quantum logic allows the machine to process the computations at the same time. A quantum computer will evaluate every possibility at the same time. A QC can theoretically do 2^n operations at a time.
they lie in linear algebra and always have. Classical computing is about Boolean algebra, but the strength of QC lies in vectors, matrices, and tensors operations. Figure 4 shows what those mathematical objects are. When you create a quantum circuit, you will use gates, also called operators. These gates are matrices applied on single qubits or multiple qubits. A quantum circuit can be seen as a series of matrix multiplications. I will teach you how and why all along with this article. The figure below shows you the different structures we can and will use in quantum algorithms. You have the column vector. Basically, a qubit is represented by a column with two values. Matrix and tensor are the representation of the operators and complex operators.
Linear algebra is enough
The rules of quantum computing are simple;
Quantum Gates
In quantum computing, you also need operators to process the information. These are the quantum gates, and the differences with classical logical gates are insignificant. Quantum gates also take binary inputs and outputs. Unlike classical gates, quantum gates must be reversible.
Reversibility is retrieving the inputs using the output and inversing the operation. If A is the input and I multiply by the matrix X to obtain B, I can invert the process starting with B, multiply by X^-1 (the inverse matrix of X) and get the input A. The theory of quantum mechanics teaches us that we can’t lose information.
Representation of the different forms of an operator Draw by the author.
Quantum gates are unitary matrices; their conjugate transpose is also their inverse. The notation for this operator is represented with a dagger like this:
Don’t run now. The conjugate transpose operates as follows:
• Transpose the vector or the matrix
• Compute the conjugate
The conjugate of a scalar is itself; the conjugate of a complex number is the opposite of the imaginary part.
Quantum gates leverage superposition and entanglement, two significant components of quantum mechanics. If two qubits are entangled, they are still in the quantum gates process. They don’t collapse. Quantum gates are mainly used on single qubits or two qubits, so they are 2x2 or 4x4 with orthonormal rows.
Quantum speed-up
Companies look for different things when a new technology appears on the market. Quantum computing isn’t an exception. What can quantum computing bring to the market? How can quantum algorithms be of any interest to a company? We could look at several advantages when we want to test or use another technology. We can look at the ease of use of the technology or algorithms. In the case of quantum algorithms, it will depend on the problem.
We can look at the complexity. Are quantum algorithms less complex than their counterparts? We can look at the energy consumption; this is a point where quantum computers could win with a stable consumption in energy compared to a classical architecture where the power scale exponentially with the power of computation.
Or we can look at the speedup with the decreasing complexity (Big O notation). You gain a quantum advantage when the quantum algorithm is faster than the best classical implementation.
Acceleration
The speed-up is the most used metric to determine if a quantum algorithm is better than the best classical implementation. You can see speed-up as the grail researchers and industries are looking for.
There is a bias here because you can only measure two algorithms (classical and quantum) that will do the exact computation. We can’t use speed-up when we try to create quantum algorithms to solve intractable problems for classical computing. We can’t compare.
For example, two protagonists in quantum information science, Alice and Bob, are in a game. Bob places a ball in one of the six drawers of a cabinet. Alice has no idea which drawer contains the ball.
Classical Alice:
• Best case: Alice opens the first drawer, and the ball is in it. End of the game.
• Worst case: Alice opens five drawers to know where the ball is. She doesn’t need to open the sixth drawer to know where the ball is. Either it was in the fifth drawer, or it wasn’t. It must be in the sixth if it wasn’t in the fifth drawer.
Quantum Alice: The function evaluation in quantum computing tells Alice where the ball is. She only needs one try to find the ball.
How is it possible? Think of Alice when she opens one drawer after another. She does it in sequential operation. “I open the first drawer and look inside to see if the ball is in it. If not, I open the second….” A quantum computer and a quantum algorithm taking advantage of this property will evaluate all the probabilities in one of the presence of the ball in the drawers. The quantum algorithm will output the drawer number with the best probability. Alice will just open the corresponding drawer to find the ball.
There is a quantum speed-up comparing the worst classical Alice case and the quantum Alice because the quantum case is faster than the classical one.
We can define the quantum speed-up when the computation time is less for the quantum algorithm than its classical counterpart. But do we need just that? A slight difference in computation time? Exponential speed-ups are required to prove that there is a quantum advantage. That implies the necessary use of a quantum computer. There are different types of quantum speed-up, like linear quantum speed-up. A quantum algorithm will be linearly faster than its classical implementation. There are also exponential speed-up and polynomial ones. We will see examples through this article of their advantages.
There will be a real quantum advantage when quantum algorithms run exponentially or in polynomial time on the noisy intermediate-scale quantum (NISQ).
The current quantum computers are not perfect; they have noise and decoherence, so it’s hard to obtain a real advantage with our few qubits at our disposal.
Big O analysis
In the literature, you will find another way of evaluating the quantum speedup of a quantum algorithm. Researchers use the Big O notation to determine an algorithm’s space and time complexity. Big O is a notation of the measure of the upper bound performance of an algorithm (worst runtime). One of the ways to see it is to determine the number of steps or the number of iterations of an algorithm. Comparing the complexity of both classical and quantum versions of an algorithm shows the speed-up of the quantum version theoretically if the complexity is reduced.
Where linear time is O(n), quadratic time is O(n2), logarithmic time O(n log n), exponential time 2polyn, polynomial-time 2O(log n) and factorial time O(n!). O(1) is excellent, O(log n) is good, O(n) is fair, O(n log n) is bad, but O(n2), O(2n) and O(n!) are horrible in terms of complexity.
Quantum advantage
Quantum supremacy is an older term for the next step after the quantum speed-up. “Supremacy” was judged inappropriate, so researchers replaced “supremacy” with “advantage.” A quantum advantage is a programmable quantum computer that could run a quantum algorithm that a classical one can’t in a feasible amount of time.
For example, in 2019, Google claimed that they realized a computation in 200 seconds compared to 10,000 years in a classical computer.
Even if this claim was rebuked by IBM, which shows that the calculation can be done in days on a classical machine with the corresponding optimization, this announcement shed light on quantum computing. More recently, in 2021, China claimed a quantum advantage, running one algorithm 10 million times faster on a superconducting quantum computer.
Another achievement was to run another algorithm one septillion times faster.
Quantum advantages can be expected shortly by some communities and industries. These milestones are expected to validate all the efforts and investments in the quantum computing field. It’s why you need to learn how to use a quantum computer and what quantum algorithms exist now to be ready when the hardware is fault-tolerant (robust to the noise).
Take away
• Classical and quantum computing are different in many ways, but each has pros and cons.
• Classical computers use bits and bytes to store information in a binary format.
• Both classical and quantum computing are governed by what we call gates. They are similar but also different because their physics is different.
• Quantum computing is not mature enough to be used like classical computing.
Quantum algorithms need to be coded at a more fundamental level. It’s why quantum gates are significant.
• The classical world is deterministic; measures of the quantum world are probabilistic.
• Deterministic computation implies you can rerun the exact calculation to obtain the same result.
• On the opposite, probabilistic computation is led by probabilities. The result of a calculation can only be approximate (the result will be different with a variation) because of the probabilistic behaviour.
• Information can’t be lost in the quantum world, so every operation must be reversible. This principle has important implications in the computation process.
• Quantum computing is governed by a different sort of mathematics called linear algebra. Those familiar with the machine learning domain will find similarities with quantum computing.
• A quantum algorithm uses the properties of quantum mechanics, such as superposition and entanglement.
• Some classical algorithms can be run on a quantum computer, but they are not quantum algorithms.
• A quantum algorithm will estimate the operations in parallel rather than sequentially for a classical algorithm.
• Quantum advantage is the speed-up gained from quantum computing over the speed of classical computers’ same types of operations.
CHRISTOPHE PERE PhD
Senior data scientist and also a researcher in the field of Artificial Intelligence. Google Scholar. An atypical background in Science and a Ph.D. in astrophysics based on the atmosphere of Venus in the case of an exoplanet to help characterize the atmospheres of exoplanets. Utilization of data processing and data mining methods a data scientist and machine and deep learning methods expert.
ADJUNCT PROFESSOR at University Laval and Chief Scientist at PINQ2
Leading research AI mostly in NLP and Reinforcement Learning
MEMBER PARTNER / RESEARCH
SCIENTIST INTRIQ - Montréal, QC, Canada
Leading research on VQA, data encoding, input/output problem, QML
SENIOR DATA SCIENTIST / RESEARCH SCIENTIST
LA CAPITALE (BENEVA) - Montréal, QC, Canada
- Research in the field of NLP (machine learning, deep learning) for document classification, information and knowledge extraction.
- Using GPUs for deep learning models
- Methods for industrializing data science models in a business context.
In charge of the partnership with Laval University (Quebec) in order to develop three research axes: data mining in order to understand customer behavior, ethics and bias around data and models in order to minimize discrimination and, cybersecurity with the exploration of connection logs in order to detect malicious behavior.
POC in QML - The goal is to see if quantum machine learning can be effective with insurance data.
Linda Restrepo | Publisher - Editor INNER SANCTUM VECTOR N360 ™ © TECHNOLOGY IN THE MAKING
TECHNOLOGY IN THE MAKING
DISCLAIMER: This Magazine is designed to provide information, entertainment and motivation to our readers. It does not render any type of political, cybersecurity, computer programming, defense strategy, ethical, legal or any other type of professional advice. It is not intended to, neither should it be construed as a comprehensive evaluation of any topic. The content of this Presentation is the sole expression and opinion of the authors. No warranties or guarantees are expressed or implied by the authors or the Editor. Neither the authors nor the Editor are liable for any physical, psychological, emotional, financial, or commercial damages, including, but not limited to, special, incidental, consequential or other damages. You are responsible for your own choices, actions, and results
Linda Restrepo | Publisher - Editor