← Quantum Store · Guides · Lessons · Glossary · About · Türkçe
Beginner course · Lesson 1 / 6 · 8 min
Bits and qubits: the smallest piece of information
Why do computers work with 0 and 1, how does a qubit differ from a bit, and what are real qubits made of? A first lesson that needs no physics at all.
Everything is made of bits
The photos on your phone, the text on this page, the videos you watch: inside a computer they are all long strings of 0s and 1s. The smallest piece of information, which can be 0 or 1, is called a bit.
Think of a bit as a lamp that is switched off or on: off is 0, on is 1. There is nothing in between. A computer calculates by switching billions of tiny switches billions of times per second.
The qubit: a quantum bit
The basic building block of a quantum computer is the qubit (quantum bit). Measured, a qubit always gives 0 or 1. In that respect it is no different from a bit.
The difference is in its state before measurement. A qubit can wait in a “mixture” of 0 and 1, and we can shape that mixture with gates. In the next lesson you will see this mixture (superposition) for yourself.
Books write qubit states as |0⟩ and |1⟩. Don’t be put off by the notation; it is just a short way of saying “the zero state” and “the one state”, nothing more than labels.
Gates: telling qubits what to do
In a classical computer bits pass through logic gates such as AND, OR and NOT. In a quantum computer quantum gates are applied to qubits. A quantum program is a circuit of gates applied one after another.
The most familiar is the X gate. It does exactly what classical NOT does: it turns 0 into 1 and 1 into 0. Every qubit starts at 0; one X gate makes it 1.
What are real qubits made of?
A qubit can be any small physical system with two states. IBM and Google use tiny superconducting circuits cooled to just above absolute zero. Quantinuum and IonQ use single atoms (ions) held in a vacuum by electric fields, Pasqal neutral atoms arranged with lasers, and Quandela and Xanadu particles of light (photons).
These lessons don’t go into hardware details. All of these are programmed with the same logic, and the playground’s simulator computes exactly the results an ideal quantum computer would give.
Try it yourself
See that the X gate always gives 1. Then add a second X with the + button: the result goes back to 0, because taking “not” twice brings you back to the start.
Open the circuit in your browserThe circuit playground is in Turkish. Button guide: “1000 kez ölç” = measure 1000 times, “Durum vektörünü göster” = show the state vector, “Bu devrenin Qiskit kodu” = this circuit’s Qiskit code, “Geri al” = undo, “Temizle” = clear. Click a gate in the circuit to remove it.
Key points
- A bit is the smallest piece of information and can be 0 or 1.
- A measured qubit also gives 0 or 1; the difference lies in its state before measurement.
- A quantum program is a circuit of gates applied to qubits in order.
- The X gate is the classical NOT: it turns 0 into 1 and 1 into 0.
Test yourself
What do you see when you measure a qubit?
- A number between 0 and 1, such as 0.5
- Either 0 or 1
- Nothing; qubits cannot be measured
Show the answer
Either 0 or 1. A measurement always gives a single classical result: 0 or 1. The qubit’s “mixed” state determines how likely each result is.