Quantum Mechanics is a fundamental theory in physics that explains phenomena at a microscopic scale (like atoms and subatomic particles). This “new” (1900) field differs from Classical Physics, which describes nature at a macroscopic scale (like bodies and machines) and doesn’t apply at the quantum level.
Quantum Computing is the exploitation of properties of Quantum Mechanics to perform computations and solve problems that a classical computer can’t and never will.
Normal computers speak the binary code language: they assign a pattern of binary digits (1s and 0s) to each character and instruction, and store and process that information in bits. Even your Python code is translated into binary digits when it runs on your laptop. For example:
The word “Hi” → “h”: 01001000 and “i”: 01101001 → 01001000 01101001
On the other end, quantum computers process information with qubits (quantum bits), which can be both 0 and 1 at the same time. That makes quantum machines dramatically faster than normal ones for specific problems (i.e. probabilistic computation).
Quantum Computers
Quantum computers use atoms and electrons, instead of classical silicon-based chips. As a result, they can leverage Quantum Mechanics to perform calculations much faster than normal machines. For instance, 8-bits is enough for a classical computer to represent any number between 0 and 255, but 8-qubits is enough for a quantum computer to represent every number between 0 and 255 at the same time. A few hundred qubits would be enough to represent more numbers than there are atoms in the universe.
The brain of a quantum computer is a tiny qubit chip made of metals or sapphire.

However, the most iconic part is the big cooling hardware made of gold that looks like a chandelier hanging inside a steel cylinder: the dilution refrigerator. It cools the chip to a temperature colder than outer space as heat destroys quantum states (basically the colder it is, the more accurate it gets).
That is the leading type of architecture, and it’s called superconducting-qubits: artificial atoms created from circuits using superconductors (like aluminum) that exhibit zero electrical resistance at ultra-low temperatures. An alternative architecture is ion-traps (charged atoms trapped in electromagnetic fields in ultra‑high vacuum), which is more accurate but slower than the former.
There is no exact public count of how many quantum computers are out there, but estimates are around 200 worldwide. As of today, the most advanced ones are:
- IBM’s Condor, the largest qubit count built so far (1000 qubits), even if that alone doesn’t equal useful computation as error rates still matter.
- Google’s Willow (105 qubits), with good error rate but still far from fault‑tolerant large‑scale computing.
- IonQ’s Tempo (100 qubits), ion-traps quantum computer with good capabilities but still slower than superconducting machines.
- Quantinuum’s Helios (98 qubits), uses ion-traps architecture with some of the highest accuracy reported today.
- Rigetti Computing’s Ankaa (80 qubits).
- Intel’s Tunnel Falls (12 qubits).
- Canada Xanadu’s Aurora (12 qubits), the first photonic quantum computer, using light instead of electrons to process information.
- Microsoft’s Majorana, the first computer designed to scale to a million qubits on a single chip (but it has 8 qubits at the moment).
- Chinese SpinQ’s Mini, the first portable small-scale quantum computer (2 qubits).
- NVIDIA’s QPU (Quantum Processing Unit), the first GPU-accelerated quantum system.
At the moment, it’s impossible for a normal person to own a large-scale quantum computer, but you can access them through the cloud.
Setup
In Python, there are several libraries to work with quantum computers around the world:
- Qiskit by IBM is the most complete high-level ecosystem for running quantum programs on IBM quantum computers, perfect for beginners.
- Cirq by Google, dedicated to low-level control on their hardware, more suited for research.
- PennyLane by Xanadu specializes in Quantum Machine Learning, it runs on their proprietary photonic computers but it can connect to other providers too.
- ProjectQ by ETH Zurich University, an open-source project that is trying to become the main general-purpose package for quantum computing.
For this tutorial, I shall use IBM’s Qiskit as it’s the industry leader (pip install qiskit).
The most basic code we can write is to create a quantum circuit (environment for quantum computation) with only one qubit and initialize it as 0. In order to measure the state of the qubit, we need a statevector, which basically tells you the current quantum reality of your circuit.
from qiskit import QuantumCircuit
from qiskit.quantum_info import Statevector
q = QuantumCircuit(1,0) #circuit with 1 quantum bit and 0 classic bit
state = Statevector.from_instruction(q) #measure state
state.probabilities() #print prob%
It means: the probability that the qubit is 0 (first element) is 100%, while the probability that the qubit is 1 (second element) is 0%. You can print it like this:
print(f"[q=0 {round(state.probabilities()[0]*100)}%,
q=1 {round(state.probabilities()[1]*100)}%]")
Let’s visualize the state:
from qiskit.visualization import plot_bloch_multivector
plot_bloch_multivector(state, figsize=(3,3))
As you can see from the 3D representation of the quantum state, the qubit is 100% at 0. That was the quantum equivalent of “hello world“, and now we can move on to the quantum equivalent of “1+1=2“.
Qubits
Qubits have two fundamental properties of Quantum Mechanics: Superposition and Entanglement.
Superposition — classical bits can be either 1 or 0, but never both. On the contrary, a qubit can be both (technically it’s a linear combination of an infinite number of states between 1 and 0), and only when measured, the superposition collapses to 1 or 0 and stays like that forever. This is because the act of observing a quantum particle forces it to take on a classical binary state of either 1 or 0 (basically the story of Schrödinger’s cat that we all know and love). Therefore, a qubit has a certain probability of collapsing to 1 or 0.
q = QuantumCircuit(1,0)
q.h(0) #add Superposition
state = Statevector.from_instruction(q)
print(f"[q=0 {round(state.probabilities()[0]*100)}%,
q=1 {round(state.probabilities()[1]*100)}%]")
plot_bloch_multivector(state, figsize=(3,3))
With the superposition, we introduced “randomness”, so the vector state is between 0 and 1. Instead of a vector representation, we can use a q-sphere where the size of the points is proportional to the probability of the corresponding term in the state.
from qiskit.visualization import plot_state_qsphere
plot_state_qsphere(state, figsize=(4,4))
The qubit is both 0 and 1, with 50% of probability respectively. But what happens if we measure it? Sometimes it will be a fixed 1, and sometimes a fixed 0.
result, collapsed = state.measure() #Superposition disappears
print("measured:", result)
plot_state_qsphere(collapsed, figsize=(4,4)) #plot collapsed state
Entanglement — classical bits are independent of one another, while qubits can be entangled with each other. When that happens, qubits are forever correlated, no matter the distance (often used as a mathematical metaphor for love).
q = QuantumCircuit(2,0) #circuit with 2 quantum bits and 0 classic bit
q.h([0]) #add Superposition on the 1st qubit
state = Statevector.from_circuit(q)
plot_bloch_multivector(state, figsize=(3,3))
We have the first qubit in Superposition between 0-1, the second at 0, and now I’m going to Entangle them. Consequently, if the first particle is measured and collapses to 1 or 0, the second particle will change as well (not necessarily to the same result, one can be 0 while the other is 1).
q.cx(control_qubit=0, target_qubit=1) #Entanglement
state = Statevector.from_circuit(q)
result, collapsed = state.measure([0]) #measure the 1st qubit
plot_bloch_multivector(collapsed, figsize=(3,3))
As you can see, the first qubit that was on Superposition was measured and collapsed to 1. At the same time, the second quibit is Entangled with the first one, therefore has changed as well.
Conclusion
This article has been a tutorial to introduce Quantum Computing basics with Python and Qiskit. We learned how to work with qubits and their 2 fundamental properties: Superposition and Entanglement. In the next tutorial, we will use qubits to build quantum models.
Full code for this article: GitHub
I hope you enjoyed it! Feel free to contact me for questions and feedback or just to share your interesting projects.
👉 Let’s Connect 👈

(All images are by the author unless otherwise noted)


