Quantum Computing Pt. I: quantum cheat sheet

In order to effectively discuss quantum computers, here is a quantum cheat sheet that explains most main concepts.

A quantum system

Imagine we received a package with a quantum system inside. We unpack it. We don’t yet understand what it is, but we got it in our hands. We can study it. What we, curious minds, want to do, is to describe it.

First, we notice that it consists of individual units called qudits (yes, quDits). Qudits have states that we can measure. After playing with a bunch of qudits for some time we infer that:

After measuring qudits many times, we get some data that contains:

For any given moment in time, we can compute the probability of getting a certain measurement outcome.

We keep playing with qudits, keep deriving some rules. Eventually we notice that qudits described like that behave following the rules of vector algebra in an n-dimensional Hilbert space. We are very good with math, apparently.

We also notice that the math itself doesn’t change for different n, only the numbers. If n = 2, we call qudits qubits. That is what we use to build quantum computers.

Qubits

A qubit is a quantum bit. When measured, it can be found in one of two possible states: ground (zero) or excited (one).

When we prepare the system, we put the qubits in the init state. Usually it is the ground state. Then we perform some computations using qubits and then we measure and then determine what it means. Until we measure, we don’t exactly know the qubit’s state, it is like tasting food we are cooking: you never know if it is gonna be too much or too little salt. In classical systems, you can measure anything at all times. The soup stays too salty no matter how many times you try it, damn it. In a quantum system, measuring gives you the value of the measured qubit and also messes everything up. So we got to be careful.

How do measurement outcomes relate to the state before measurement?

The way it works is that at any given time, if we measure a qubit, we will get either ground or excited state. But the act of measurement kinda creates this state. And before we measure, something very non-classical is happening.

Wave function

Imagine that on the shoulders of the qubit, there is an angel and a demon. The angel thinks that the ground, relaxed state is better. The demon thinks that agitated, excited state is better. And they are actually fighting to prove a point. At any moment, one of them is winning. If one of them wins, then all measurements will always give us the state the winner was fighting for. But if we measure before the fight is over, the measurement outcome is unknown, but we know that the closer to winning a fighter is, the more likely we measure their preferred state.

Now, the fight is actually..staged. The angel and demon just move following the script they wrote together. The script is called a wave function.

Wave function fight

Decoherence

Anyway, qubits are not actually qubits at all times. When we put a qubit in the init state, it is quantum and everything is good. But from that moment on, a classical timer starts ticking. Interaction with the environment makes qubits slowly turn into a non-quantum pumpkin that has no quantum properties.

After that, we need to make it quantum again until it once again turns into a pumpkin. The amount of time it takes a fresh qubit to turn into a pumpkin is called decoherence time.

We care about decoherence time because it breaks everything. Imagine running some program. You have some internal state, but this state slowly changes into something random?? This is not a way to perform reliable computations. So we need to make sure that whatever operations we perform on qubits, they are much faster than decoherence time. That will allow us to run a chunk of computation and get the results before it is pumpkin time.

Quantum computing

The operations we perform on qubits we do with the help of quantum gates. It is the same idea as in classical computers: we have a fixed set of tiny circuits that we use as building blocks for big diverse circuits.

To summarize, quantum computers allow us performing computations. We represent the desired computations as quantum circuits, which consist of quantum gates. We init the qubits and perform operations on qubits using quantum gates before decoherence causes decay of the state, and measure the state of some qubits at the end to get the result.

← Back to blog