MathGod.org / Quantum Foundations / Qubits: From Mystery to Mastery (v2)
Slide 01 / 09 — The Mystery
Quantum Computers Can Break Bitcoin. Why?
The power that makes quantum computing dangerous — and beautiful
šŸ” The Threat: Every Bitcoin wallet, every HTTPS connection, every encrypted message relies on one assumption: that factoring large numbers is impossibly slow. A quantum computer can do it fast. This deck explains why.

šŸ–„ļø Classical Bit

A classical bit is strictly 0 or 1. It's a switch. On or off. Nothing in between.
\( b \in \{0, 1\} \)
A coin lying on the table: definitely heads or definitely tails.

āš›ļø Quantum Bit (Qubit)

A qubit can be a blend of 0 and 1 simultaneously — a superposition. When you measure it, the blend collapses to a definite answer.
\( |\psi\rangle = \alpha|0\rangle + \beta|1\rangle \)
A coin spinning in the air: a weighted blend of heads and tails until it lands.
šŸ”¬ Physical Example: A photon's polarization is a qubit. Horizontal polarization = \(|0\rangle\). Vertical = \(|1\rangle\). Diagonal (45°) = \(|+\rangle = \frac{1}{\sqrt{2}}|0\rangle + \frac{1}{\sqrt{2}}|1\rangle\). The photon is genuinely in both states until a polarizing filter forces it to choose.
The Key Insight: Because qubits exist in superpositions, a quantum computer with \(n\) qubits can explore \(2^n\) possibilities in parallel. With just 300 qubits, that's more possibilities than atoms in the observable universe.
Slide 02 / 09 — The Sphere
Every Qubit State is a Point on a Sphere
The Bloch Sphere: the most intuitive picture of a qubit
Forget the algebra for now. Every possible qubit state corresponds to a unique point on the surface of a ball called the Bloch Sphere. Drag the point around. That's all a qubit is.
|0⟩ (North) |1⟩ (South) |+⟩ (X) |-⟩ (-X) θ

šŸ“ Spherical Coordinates \((\theta, \phi)\)

\(\theta\) (polar angle, 0° to 180°): How far from the North Pole. Determines measurement probabilities.
  • \(\theta = 0°\) → definitely \(|0\rangle\) (North Pole)
  • \(\theta = 180°\) → definitely \(|1\rangle\) (South Pole)
  • \(\theta = 90°\) → equal 50/50 superposition (equator)
\(\phi\) (azimuthal angle, 0° to 360°): The rotation around the equator. Captures the quantum phase — invisible to a single measurement, but crucial when combining operations.
Why a sphere? The state is normalized (\(|\alpha|^2 + |\beta|^2 = 1\)), and a global phase factor \(e^{i\gamma}\) is physically undetectable. These two constraints reduce 4 real parameters to 2 — exactly the latitude and longitude of a sphere.
Slide 03 / 09 — The Algebra
From Sphere to Numbers: \(\alpha\) and \(\beta\)
Two complex numbers describe the point on the Bloch Sphere
Why do we need algebra? The sphere gives intuition, but to compute — to build quantum circuits, simulate quantum mechanics, break encryption — we need numbers. Two complex numbers \(\alpha\) and \(\beta\) precisely encode the point.

šŸŽÆ Interactive 2D Qubit Parameterization

\(\alpha = a_1 + a_2 i\) (Draggable)
α
\(\beta = b_1 + b_2 i\) (Constrained)
β
\(\beta\) Phase: 0°

State Expansion \((a_1 + a_2 i)|0\rangle + (b_1 + b_2 i)|1\rangle\)

ACTIVE STATE

The Computational Basis Kets in \(\mathbb{C}^2\)

\( |0\rangle = \begin{pmatrix} 1 \\ 0 \end{pmatrix} \quad |1\rangle = \begin{pmatrix} 0 \\ 1 \end{pmatrix} \)
These are just the standard unit vectors in \(\mathbb{C}^2\). The qubit state \(|\psi\rangle = \alpha|0\rangle + \beta|1\rangle\) is the column vector \(\begin{pmatrix} \alpha \\ \beta \end{pmatrix}\).
Slide 04 / 09 — Measurement
Measurement Collapses Superposition
The Born Rule: probabilities from amplitudes
The Paradox: If a qubit is in a blend of \(|0\rangle\) and \(|1\rangle\), what happens when you look at it? It picks one. The superposition collapses, and you get a definite answer. The probabilities of each outcome are determined by the Born Rule.

šŸ“ The Born Rule

For the state \(|\psi\rangle = \alpha|0\rangle + \beta|1\rangle\):
\( P(0) = |\alpha|^2 \qquad P(1) = |\beta|^2 \)
The squared magnitudes of \(\alpha\) and \(\beta\) give probabilities. This is why the state must be normalized:
\( |\alpha|^2 + |\beta|^2 = 1 \quad \Longleftrightarrow \quad P(0) + P(1) = 100\% \)
Probabilities must sum to 1 — that's the normalization constraint.

šŸŒ On the Bloch Sphere

The polar angle \(\theta\) directly controls measurement probability:
\( P(0) = \cos^2\!\left(\frac{\theta}{2}\right) \qquad P(1) = \sin^2\!\left(\frac{\theta}{2}\right) \)
• North Pole (\(\theta = 0°\)): \(P(0) = 100\%\) — certain \(|0\rangle\).
• Equator (\(\theta = 90°\)): \(P(0) = P(1) = 50\%\) — maximum uncertainty.
• South Pole (\(\theta = 180°\)): \(P(1) = 100\%\) — certain \(|1\rangle\).
What about the phase \(\phi\)? It's invisible to a single Z-measurement! But it determines what happens if you apply a gate before measuring — it's the "hidden information" that makes quantum interference possible.

Example: The \(|+\rangle\) State

\( |+\rangle = \frac{1}{\sqrt{2}}|0\rangle + \frac{1}{\sqrt{2}}|1\rangle \implies P(0) = \left|\frac{1}{\sqrt{2}}\right|^2 = \frac{1}{2} = 50\% \)
Slide 05 / 09 — Gates
Quantum Gates: Rotating the State Vector
Unitary matrices that move the point on the Bloch Sphere
Quantum computation works by applying gates — unitary matrices that rotate the state vector on the Bloch Sphere. Unlike measurement (which destroys superposition), gates are reversible.

⚔ Interactive Quantum Gate Sandbox

|0⟩ |1⟩ |+⟩ |-⟩
Current: \(|\psi\rangle = |0\rangle\)

Gate Reference Cards

\( X = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} \)
Pauli-X (NOT): Swaps \(|0\rangle \leftrightarrow |1\rangle\). On the sphere: 180° rotation about the X-axis.
\( Z = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix} \)
Pauli-Z (Phase Flip): Flips the sign of \(|1\rangle\). On the sphere: 180° rotation about the Z-axis. Invisible at the poles!
\( H = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix} \)
Hadamard: Creates superposition from a basis state. Maps \(|0\rangle \to |+\rangle\) and \(|1\rangle \to |-\rangle\).
Select a gate to see the matrix multiplication.
Slide 06 / 09 — Dual Space
The "Bra" \(\langle\psi|\) & The Inner Product
How to compute overlaps, probabilities, and distinguish quantum states
Why do we need bras? To compute the probability of a measurement outcome, we need to "compare" two quantum states. The inner product \(\langle\phi|\psi\rangle\) measures their overlap. To build it, we need the bra — the conjugate transpose of the ket.

The Hermitian Conjugate (†)

\( \langle\psi| = (|\psi\rangle)^\dagger = \begin{pmatrix} \alpha \\ \beta \end{pmatrix}^\dagger = \begin{pmatrix} \alpha^* & \beta^* \end{pmatrix} \)
The bra is the row vector formed by complex-conjugating each entry. Visually: reflect across the real axis in the complex plane, then tip the column on its side.
If \(\alpha = 0.71 + 0.71i\), then \(\alpha^* = 0.71 - 0.71i\)

The Inner Product (The "Bracket")

\( \langle\psi|\phi\rangle = \alpha^* c + \beta^* d \)
Row Ɨ Column = scalar. This number tells you how "aligned" two quantum states are.

šŸ”‘ Orthogonality = Distinguishability

If \(\langle\psi|\phi\rangle = 0\), the states are orthogonal — they are perfectly distinguishable by measurement. This is the quantum version of "these two things are completely different."
\( \langle 0|1\rangle = \begin{pmatrix} 1 & 0 \end{pmatrix}\begin{pmatrix} 0 \\ 1 \end{pmatrix} = (1)(0) + (0)(1) = 0 \quad \checkmark \)
If you prepare \(|0\rangle\) and measure in the computational basis, you will never get outcome 1. That's what orthogonality means physically.

Self-Overlap = Normalization

\( \langle\psi|\psi\rangle = |\alpha|^2 + |\beta|^2 = 1 \)
The inner product of a state with itself is always 1. This is the normalization condition — total probability = 100%.
Slide 07 / 09 — Multi-Qubit
Multiple Qubits & Entanglement
Tensor products, Bell states, and the source of quantum power
One qubit is a point on a 2-dimensional sphere. Two qubits live in a 4-dimensional space. Three qubits: 8 dimensions. \(n\) qubits: \(2^n\) dimensions. This exponential growth is the source of quantum computational power.

āŠ— Tensor Products: Combining Qubits

To describe two qubits together, we use the tensor product \(\otimes\):
\( |0\rangle \otimes |1\rangle = |01\rangle = \begin{pmatrix} 0 \\ 1 \\ 0 \\ 0 \end{pmatrix} \)
The 2-qubit system has 4 basis states: \(|00\rangle, |01\rangle, |10\rangle, |11\rangle\). A general 2-qubit state is a superposition of all four.

šŸ”— Entanglement: The Weird Part

Some 2-qubit states cannot be written as a product of individual qubit states. These are entangled.
\( |\Phi^+\rangle = \frac{|00\rangle + |11\rangle}{\sqrt{2}} \)
This Bell State says: "the two qubits are in a superposition of both being 0 and both being 1." Measure one and you instantly know the other, no matter how far apart they are. Einstein called this "spooky action at a distance."
Why this matters for computing: Entanglement lets qubits coordinate in ways that classical bits cannot. This coordination is what gives quantum algorithms their speed advantage over classical ones.
Slide 08 / 09 — The Payoff
Shor's Algorithm: Breaking RSA & Bitcoin
How quantum parallelism and the QFT crack factoring
Connecting back to Slide 1: RSA encryption relies on the difficulty of factoring \(N = p \times q\). Shor's algorithm finds the period of modular exponentiation — and period-finding is equivalent to factoring. Here's the quantum trick.

🧮 Step 1: Quantum Parallelism

Prepare a register of qubits in a superposition of all possible inputs simultaneously:
\( |\psi\rangle = \frac{1}{\sqrt{Q}} \sum_{x=0}^{Q-1} |x\rangle \otimes |a^x \pmod{N}\rangle \)
A classical computer would evaluate \(a^x \bmod N\) for each \(x\) one at a time. The quantum computer evaluates all \(Q\) values in a single step via superposition.

šŸ” Step 2: Quantum Fourier Transform

The QFT extracts the hidden period \(r\) from the superposition. It converts position-space amplitudes into frequency-space peaks:
\( \text{QFT}: |x\rangle \to \frac{1}{\sqrt{Q}} \sum_{k=0}^{Q-1} e^{2\pi i x k / Q} |k\rangle \)
The measurement after the QFT gives a value near a multiple of \(Q/r\), revealing the period \(r\).

šŸ”“ Step 3: Period → Factors

Once we know the period \(r\) of \(a^x \bmod N\):
\( \gcd(a^{r/2} \pm 1, \; N) \to p \text{ or } q \)
This classical post-processing step uses the period to extract the prime factors. The quantum part (finding \(r\)) is exponentially faster than any known classical algorithm.
Timeline: Current quantum computers have ~1,000 qubits. Breaking RSA-2048 requires ~4,000 logical (error-corrected) qubits. We're not there yet — but we're getting closer every year.
Slide 09 / 09 — Knowledge Check
Mastery Quiz: Test Your Quantum Intuition
Can you think like a quantum computer?

Q1: A qubit is at the North Pole of the Bloch Sphere. What do you measure?

A) Always \(|0\rangle\)
B) Always \(|1\rangle\)
C) 50/50

Q2: What is \(\langle 0|+\rangle\)?

A) \(0\)
B) \(\frac{1}{\sqrt{2}}\)
C) \(1\)

Q3: You apply Hadamard to \(|0\rangle\), then measure. What's \(P(0)\)?

A) \(100\%\)
B) \(50\%\)
C) \(0\%\)

Q4: Why can't \(|\Phi^+\rangle = \frac{|00\rangle + |11\rangle}{\sqrt{2}}\) be written as \(|\psi_A\rangle \otimes |\psi_B\rangle\)?

A) It's not normalized
B) It's entangled
C) It uses 3 qubits

šŸŽ‰ Ready for Quantum Simulation?

You've traveled from the mystery to the math to the threat. Now build your own quantum circuits.
⚔ Launch Quantum AI Simulator