Quantum Computing for Absolute Beginners: No Physics Degree Required
Table of Contents
- Classical Bits: What You Already Know
- Qubits: Bits with Superpowers
- Superposition: Being 0 and 1 at the Same Time
- Measurement: The Quantum Coin Toss
- Entanglement: Spooky but Useful
- Quantum Gates: Programming Qubits
- Quantum Circuits: Putting It All Together
- What Quantum Computers Are Good At
- What Quantum Computers Are NOT Good At
- Current State of Quantum Hardware
- How to Get Started Today (Free)
1. Classical Bits: What You Already Know
Your laptop runs on bits. Each bit is either 0 or 1. Everything your computer does — loading this webpage, playing music, running code — is ultimately billions of 0s and 1s being shuffled around very fast.
A byte is 8 bits. It can represent 256 different values (2^8). Your 64-bit processor handles 64 bits at a time. Simple, deterministic, predictable. When you set a variable to 42, it stays 42 until you change it.
This is important context because quantum computing throws out several of these assumptions.
2. Qubits: Bits with Superpowers
A qubit (quantum bit) is the quantum version of a classical bit. Like a classical bit, when you look at it (measure it), you get either 0 or 1. But before you look at it, a qubit can be in a state that's neither purely 0 nor purely 1.
Think of it this way:
- Classical bit: A coin lying on a table. It's heads or tails. You can see which.
- Qubit: A coin spinning in the air. It's not heads. It's not tails. It's in some spinning state that will become heads or tails when it lands.
The spinning coin has a certain tendency — maybe it's slightly tilted toward heads. That tendency is what physicists call the qubit's state. You can manipulate that tendency (with quantum gates) before the coin lands (before measurement).
Key insight for programmers: A qubit is not a random number generator. It's more like a variable that holds a probability distribution instead of a fixed value. You can transform that distribution with operations before "reading" it.
3. Superposition: Being 0 and 1 at the Same Time
This is the concept everyone has heard of but few explain well. Let's skip the Schrodinger's cat analogy (it's confusing and inaccurate) and use a programming analogy instead.
Imagine a variable that doesn't hold a single value but holds a weighted list of possible values:
# Classical (Python)
x = 0 # x is definitely 0
# Quantum (conceptual)
x = {0: 70.7%, 1: 70.7%} # x is 0 with ~50% probability
# AND 1 with ~50% probability
# (The percentages are amplitudes, not
# simple probabilities — more on this later)
When a qubit is in superposition, it exists in a combination of 0 and 1 simultaneously. Not "it's secretly 0 or 1 and we don't know which" — it genuinely has no definite value until measured.
Why does this matter? Because quantum operations act on ALL possible values at once. If you have 3 qubits in superposition, they represent all 8 possible combinations (000, 001, 010, ..., 111) simultaneously. With 10 qubits, that's 1,024 combinations. With 100 qubits, that's more combinations than atoms in the observable universe.
This is not the same as "trying all possibilities at once" (that's a common misconception). But it does allow certain clever algorithms to find answers faster than classical computers by exploiting interference between these possibilities.
How do you create superposition?
With a Hadamard gate (H gate). Every qubit starts as |0⟩ (definitely 0). Apply H, and it becomes an equal superposition of 0 and 1:
from qiskit import QuantumCircuit
qc = QuantumCircuit(1)
qc.h(0) # Hadamard gate: |0⟩ → (|0⟩ + |1⟩)/√2
qc.measure_all()
# Run this 1000 times:
# ~500 times you get 0
# ~500 times you get 1
# The exact split is random — genuinely random
4. Measurement: The Quantum Coin Toss
Here's where quantum computing gets weird (and useful). When you measure a qubit, the superposition collapses into a definite value — either 0 or 1. Which one you get is probabilistic.
If the qubit was in equal superposition (50/50), it's a fair coin flip. If it was tilted toward |1⟩ (say, 90/10), you'll get 1 about 90% of the time.
Three crucial facts about measurement:
- It's irreversible. Once you measure, the superposition is gone. You can't "un-measure" a qubit.
- It's truly random. Not pseudo-random like
Math.random(). There is no hidden variable determining the outcome. This is proven by quantum mechanics and tested experimentally (Bell's theorem). The randomness is fundamental. - It affects entangled qubits. If two qubits are entangled, measuring one instantly determines the other's outcome.
This is what we used for Quantum Genesis. Each NFT's visual parameters come from measuring qubits on real quantum hardware. The measurements are fundamentally random — no algorithm, no seed, no way to predict or reproduce the exact results. Each NFT is physically one-of-a-kind.
Why run circuits multiple times?
Since measurement is probabilistic, running a circuit once gives you one random sample. Running it 4,096 times (a common default called "shots") gives you a distribution. From that distribution, you can extract meaningful data — like the probability of each outcome, which reflects the quantum state before measurement.
# Running 4096 shots on IBM Quantum:
# Results might be:
# {'00': 2040, '01': 12, '10': 8, '11': 2036}
#
# This tells us: states 00 and 11 are highly probable (~50% each)
# States 01 and 10 are extremely rare (~0.3% each)
# This pattern means the qubits are ENTANGLED
5. Entanglement: Spooky but Useful
Entanglement is the second quantum phenomenon that makes quantum computing powerful. Einstein famously called it "spooky action at a distance" — and it is genuinely strange.
Here's the simplest way to understand it:
Take two qubits. Apply specific gates (H + CNOT) to entangle them. Now these two qubits are correlated in a way that has no classical equivalent:
- If you measure qubit A and get 0, qubit B is guaranteed to be 0
- If you measure qubit A and get 1, qubit B is guaranteed to be 1
- The result of A is random (50/50), but B always matches
This holds even if you separate the qubits by miles. Measuring A doesn't "send a signal" to B — the correlation was established when they were entangled.
A programming analogy
Entanglement is like creating two linked variables that share a random outcome:
# Classical (impossible to truly replicate):
import random
outcome = random.choice([0, 1]) # Decided at creation
a = outcome # a and b are just copies
b = outcome
# Quantum entanglement:
# The outcome ISN'T decided until you look at a (or b)
# But when you do look, the other one MUST match
# This is NOT pre-determined — it's decided at measurement
# Bell's theorem proves no "hidden variable" can explain this
Why entanglement matters for computing
Entanglement allows quantum algorithms to create correlations between qubits that encode information about the problem being solved. When you measure entangled qubits, the correlations bias the results toward useful answers. This is the secret sauce of algorithms like Shor's (for factoring) and Grover's (for searching).
6. Quantum Gates: Programming Qubits
Just as classical computers use logic gates (AND, OR, NOT) to transform bits, quantum computers use quantum gates to transform qubits. The key gates every beginner should know:
X Gate (NOT gate)
Flips a qubit: |0⟩ becomes |1⟩, and |1⟩ becomes |0⟩. The simplest gate — identical to classical NOT.
H Gate (Hadamard)
Puts a qubit into superposition. This is the "make it quantum" button. Without H gates, your quantum computer is just an expensive classical computer.
CNOT Gate (Controlled-NOT)
A two-qubit gate. If the first qubit (control) is |1⟩, flip the second qubit (target). If control is |0⟩, do nothing. Combined with H, this creates entanglement.
The Universal Combo: H + CNOT
These two gates together let you create superposition (H) and entanglement (CNOT) — the two fundamental quantum resources. Technically, H + CNOT + a rotation gate form a universal gate set: any quantum computation can be built from just these.
from qiskit import QuantumCircuit
# The fundamental quantum circuit:
qc = QuantumCircuit(2)
qc.h(0) # Superposition
qc.cx(0, 1) # Entanglement (CNOT)
qc.measure_all()
# This creates a "Bell state" — the simplest entangled state
# Results: ~50% "00", ~50% "11", ~0% "01", ~0% "10"
7. Quantum Circuits: Putting It All Together
A quantum circuit is a program for a quantum computer. It specifies:
- How many qubits to use
- What gates to apply, in what order
- Which qubits to measure at the end
The circuit runs left to right. Each horizontal line represents one qubit. Gates are boxes or symbols on these lines. Measurement is a meter symbol at the end.
# A circuit that uses 4 qubits:
qc = QuantumCircuit(4, 4)
# Put all 4 in superposition
for i in range(4):
qc.h(i)
# Entangle them in a chain
for i in range(3):
qc.cx(i, i + 1)
# Measure all 4
qc.measure(range(4), range(4))
print(qc.draw())
# ┌───┐ ┌─┐
# q_0: ┤ H ├──■─────────────┤M├───
# ├───┤┌─┴─┐ └╥┘┌─┐
# q_1: ┤ H ├┤ X ├──■─────────╫─┤M├
# ├───┤└───┘┌─┴─┐ ║ └╥┘┌─┐
# q_2: ┤ H ├────┤ X ├──■─────╫──╫─┤M├
# ├───┤ └───┘┌─┴─┐ ║ ║ └╥┘┌─┐
# q_3: ┤ H ├────────┤ X ├───╫──╫──╫─┤M├
# └───┘ └───┘ ║ ║ ║ └╥┘
This circuit can produce any of the 16 possible 4-bit strings (0000 through 1111), but the entanglement creates correlations — certain combinations are more likely than others. The specific distribution depends on the circuit design and the noise characteristics of the real hardware.
Circuits as programs
Think of circuits like functions:
- Input: Qubits initialized to |0⟩ (always — you don't set initial values)
- Processing: Gates transform the qubits (your algorithm)
- Output: Measurement results (classical bits — 0s and 1s)
The output is probabilistic. You run the circuit many times ("shots") and analyze the distribution of results.
8. What Quantum Computers Are Good At
Quantum computers are not faster at everything. They excel at specific problem types where superposition and entanglement provide a structural advantage:
Cryptography (Shor's Algorithm)
Factoring large numbers into primes. Classical computers need exponential time; quantum computers need polynomial time. This would break RSA encryption — but requires thousands of stable qubits (we have hundreds of noisy ones).
Search (Grover's Algorithm)
Searching an unsorted database of N items. Classical: N steps. Quantum: sqrt(N) steps. For a billion items, that's 1 billion vs ~31,623 steps. Significant, but not exponential speedup.
Simulation
Simulating quantum systems (molecules, materials, chemical reactions). Classical computers struggle because simulating N quantum particles requires tracking 2^N states. A quantum computer with N qubits can simulate N quantum particles directly. This is what Feynman originally proposed quantum computers for.
Optimization
Finding optimal solutions in large search spaces (logistics, financial portfolios, machine learning). Quantum algorithms like QAOA (Quantum Approximate Optimization Algorithm) show promise but are still being developed.
True Randomness
Generating genuinely random numbers from quantum measurements. This is practical TODAY — no massive qubit count needed. It's what we use for Quantum Genesis.
9. What Quantum Computers Are NOT Good At
Common misconceptions about quantum computing:
"Quantum computers are faster at everything"
False. For most everyday tasks — web servers, databases, word processing, video games — classical computers are and will remain superior. Quantum computers solve specific mathematical structures faster, not general computation.
"Quantum computers try all possibilities at once"
Misleading. Superposition lets qubits represent multiple states simultaneously, but you can only extract one outcome per measurement. The art of quantum algorithms is using interference to amplify correct answers and cancel wrong ones.
"Quantum computers will replace classical computers"
False. They'll complement them. Most real-world quantum applications involve a classical computer orchestrating quantum circuits for specific sub-problems. Your laptop isn't going away.
"Quantum computing is ready for production"
Not yet for most applications. Current quantum hardware is "noisy" — errors accumulate quickly. Today's quantum computers with 100-1000 qubits are in the "NISQ era" (Noisy Intermediate-Scale Quantum). Useful for research, randomness, and small optimization problems. Not yet for breaking encryption or simulating complex molecules.
10. Current State of Quantum Hardware (2026)
The quantum computing landscape is evolving rapidly. Here's where things stand:
| Company | Qubits | Access | Notes |
|---|---|---|---|
| IBM Quantum | 156 (ibm_fez) | Free (limited) + paid | Best ecosystem, Qiskit SDK |
| IBM Quantum | 133 (ibm_torino) | Free (limited) + paid | Eagle processor |
| Origin Quantum | 180 (WK_C180) | Cloud API | Chinese hardware, pyqpanda3 SDK |
| 72 (Sycamore) | Research only | Quantum supremacy claim (2019) | |
| IonQ | 32 (trapped ion) | AWS/Azure/GCP | Different qubit technology |
| Quantinuum | 56 (H2) | Azure | Highest fidelity gates |
We used two of these for Quantum Genesis:
- Origin Quantum WK_C180 (180 qubits) for NFTs #1-18 — via pyqpanda3 SDK
- IBM Quantum ibm_fez and ibm_torino (156 and 133 qubits) for NFTs #19-100 — via Qiskit
Both are accessible to anyone with an internet connection. IBM even offers free access with usage limits.
11. How to Get Started Today (Free)
You can run code on real quantum hardware today, for free. Here's the fastest path:
Step 1: Get an IBM Quantum Account
Go to quantum.ibm.com and sign up. Free tier includes access to real quantum processors with a monthly usage limit.
Step 2: Install Qiskit
pip install qiskit qiskit-ibm-runtime
Step 3: Write Your First Circuit
from qiskit import QuantumCircuit
from qiskit_ibm_runtime import QiskitRuntimeService, SamplerV2
# Connect to IBM Quantum
service = QiskitRuntimeService(
channel="ibm_quantum_platform",
token="YOUR_API_TOKEN"
)
# Choose a real quantum computer
backend = service.least_busy(operational=True, simulator=False)
print(f"Running on: {backend.name}")
# Build a circuit
qc = QuantumCircuit(2)
qc.h(0) # Superposition
qc.cx(0, 1) # Entanglement
qc.measure_all()
# Transpile for the specific hardware
from qiskit.transpiler.preset_passmanagers import generate_preset_pass_manager
pm = generate_preset_pass_manager(backend=backend, optimization_level=1)
circuit = pm.run(qc)
# Run on real quantum hardware
sampler = SamplerV2(backend)
job = sampler.run([circuit], shots=4096)
result = job.result()
# Get the counts
counts = result[0].data.c.get_counts()
print(counts)
# Example output: {'00': 2048, '11': 2048}
# Entangled! Always 00 or 11, never 01 or 10
Step 4: Experiment
Modify the circuit. Add more qubits. Try different gates. Run on different backends. Compare simulator results to real hardware results (the noise is the interesting part).
Step 5: Build Something
We built generative art from quantum measurements. You could build a quantum random number generator, a simple quantum key distribution demo, or explore variational algorithms. The possibilities expand with each qubit you add.
Resources
- IBM Quantum Learning — Free courses from basics to advanced
- Qiskit Documentation — SDK reference and tutorials
- Quantum Country — Spaced-repetition essay format (excellent for retention)
- 3Blue1Brown — Visual math explanations that help with quantum concepts
You don't need a physics degree. If you can write Python, you can write quantum circuits. The math behind it is fascinating, but Qiskit abstracts enough of it that you can start building things immediately and learn the theory as you go.
Desenvolvo sistemas que usam hardware quântico real (IBM Quantum, Origin Quantum) para gerar arte e NFTs com proveniência verificável on-chain. Escrevo sobre computação quântica aplicada, criptografia, Web3 e arte generativa — tudo com código que roda em processadores quânticos de verdade.
Comentários
Postar um comentário