Quantum Computing Pt. II: classical vs quantum

What is a bit?

A bit, or a classical bit, is a unit of information. We can think of bits as a yes/no answer to some question. We can combine these simple answers to answer more complex questions or infer answers to simpler questions from the answers to more complex ones. This will be boolean logic, which is a subfield of discrete math.

Boolean gates are little devices that perform boolean operations. Arranging boolean gates together results in all kinds of boolean circuits and enables classical computing.

Let’s get physical

How do we turn this abstraction into something real? What is happening inside computers?Which part of the abstraction do we implement?

We implement boolean gates - they are the building blocks of the circuits.

Boolean gates are made of transistors connected to each other in a specific way. There are multiple kinds of transistors but they all work similarly. A transistor is a piece of silicon that is split into layers. Different layers are infused with different atoms, kinda like vanilla and chocolate ice cream layered next to each other. Layering silicon infused with different kinds of atoms enables the physical functions of a transistor. Here is how it works: it is connected to a power source and also has an input and output, three “legs” in total (think of a three-legged silicon spider). If the signal on the input is high enough, the power is flowing through the output 1.

Connecting transistors in different ways implements different boolean logics and different gates. Bits themselves here are represented by the signal on the wires, high or low voltage level.

(N)AND gate formed by connecting two transistors

Abstraction Physical
bit voltage level
no or yes low voltage or high voltage
boolean gates transistors connected in a specific way
boolean circuit gates connected in a specific way

Note that this representation applies to computation. For storage, bits are represented differently.

What is a qubit?

A qubit - a quantum bit - is also a unit of information. Measuring a bit can only give one or zero, measuring a qubit can only result in excited or ground state.

A system of bits is modeled as a boolean space with boolean logic rules. A system of qubits is mathematically modeled as a Hilbert space with linear algebra rules.

Instead of boolean gates we have quantum gates, instead of classical circuits we have quantum circuits, and instead of classical computing we have quantum computing.

Instead of classical physics rules, physical qubits follow the rules of quantum mechanics.

Let’s get physical, but make it quantum

Classical gates are implemented with transistors. For quantum gates, there are multiple options: trapped ions, superconducting circuits, photons, etc. There are so many options for a quantum computer because a proper quantum computer doesn’t really exist yet and there is no clear winner. Before we started using transistors for classical computers, other technologies for implementing classical gates were used too.

Classical bit Quantum bit
0 or 1 ground or excited
boolean logic linear algebra
boolean gates quantum gates
classical computing quantum computing
classical physics quantum mechanics
transistors superconductors/ions/photons/etc

The difference

So far, we see a clear analogy, but if it was just that, there would be no need in quantum computers. What is the difference?

Superposition

Let’s look into a quantum system and follow what is happening to a qubit’s state. We can split the state lifecycle into parts each of which has two phases:

  1. pre-measurement
  2. measurement

Measurement in a quantum system doesn’t just show the existing value we didn’t see before, it creates a value. It has to create a value, because there simply was no value before. The qubit was in a superposition state.

Superposition state is not a classical state. It can never be a measurement outcome, it only exists in pre-measurement world.

People often say that superposition state is when the qubit is in both states at once - superposition. I find this interpretation confusing. I like to think of the superposition state as a space of opportunities for the future measured state outcome.

Qubit before and after measurement

Mathematically, a measurement outcome is a basis state (eigenvector of the measurement operator) - either ground or excited. The superposition state is described as a sum of the two basis states and coefficients standing before them. The coefficients are also not constant, they form a wave function that has different values at different times (angels and demons fighting, remember?). They also can be used to compute the probabilities of getting basis states if we were to measure the qubit in that moment.

Anyway, this property of a qubit - being in a superposition state - is something that makes quantum computing interesting for us.

Entanglement

Entanglement is another property of a quantum system that we are interested in. It is pretty easy to explain: two qubits are related in a way that when we measure one, we learn the value of the other automatically, no matter how far they are physically.

Mathematically it means that we cannot describe the state of one qubit without involving the state of the other qubit. It is like there is a term of the form xy in the equation (where x is a part of the state of one qubit and y is a part of the state of the other qubit).

Conclusion

Quantum computers are modelled after classical computers. We use binary values as the units of information and gates as building blocks. The differences between classical and quantum phenomenons - superposition and entanglement among them - is what makes quantum computers offer unique properties.

  1. or the other way around ↩

← Back to blog