MathGod.org / Quantum Foundations / Dirac Bra-Ket Notation & Qubits
Slide 01 / 08 — Foundations
Bits vs. Qubits: Points on the Unit Circle & State Kets
Connecting Complex Mappings in MathGod Flora to Quantum Superposition

MathGod Learn: Bits are strictly 0 or 1, discrete. Qubits are vectors in \(\mathbb{C}^2\), continuous. \(\mathbb{C} \cong \mathbb{R}^2\), hence \(\mathbb{C}^2 \cong \mathbb{R}^4\). Expanding \(\alpha = a_1 + a_2i\) and \(\beta = b_1 + b_2i\), qubits live on a unit hypersphere in \(\mathbb{R}^4\). State: \(|\psi\rangle = \alpha|\mathit{0}\rangle + \beta|\mathit{1}\rangle\) with \(|\alpha|^2 + |\beta|^2 = 1 = a_1^2 + a_2^2 + b_1^2 + b_2^2\), e.g. \( |+\rangle = \frac{1}{\sqrt{2}}|\mathit{0}\rangle + \frac{1}{\sqrt{2}}|\mathit{1}\rangle \).

🌺 Interactive 2D Qubit Parameterization, \(\quad \alpha, \beta \in\) \(\mathbb{C} \cong \mathbb{R}^2\)
\(\alpha = a_1 + a_2 i\) (Draggable)
α
\(\beta = b_1 + b_2 i\) (Constrained)
β

State Expansion \((a_1 + a_2 i)|\mathit{0}\rangle + (b_1 + b_2 i)|\mathit{1}\rangle\):

Active State |+⟩
Alpha (\(\alpha\))
\(\alpha = 0.71 + 0.00i\)
Beta (\(\beta\))
\(\beta = 0.71 + 0.00i\)
Dirac Bra-Ket (\(|\psi\rangle\))
\(|\psi\rangle = (0.71 + 0.00i)|\mathit{0}\rangle + (0.71 + 0.00i)|\mathit{1}\rangle\)
\(\beta\) Phase/Angle:
Dragging \(\alpha\) sets the magnitudes (probabilities), while this slider sets the complex phase (angle) of \(\beta\).
P(|0⟩) = 50.0% P(|1⟩) = 50.0%

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

\(|\mathit{0}\rangle = \begin{pmatrix} 1 \\ 0 \end{pmatrix} = \begin{pmatrix} 1+0i \\ 0+0i \end{pmatrix} \cong (1,0,0,0) \in \mathbb{R}^4 \quad (\text{Ground})\)
\(|\mathit{1}\rangle = \begin{pmatrix} 0 \\ 1 \end{pmatrix} = \begin{pmatrix} 0+0i \\ 1+0i \end{pmatrix} \cong (0,0,1,0) \in \mathbb{R}^4 \quad (\text{Excited})\)
Slide 02 / 08 — Foundations
4D to 3D Projection
A Naive Visual Mapping: \( S^3 \to \mathbb{R}^3 \)
🌺 Parameterize the State
\(\alpha = a_1 + a_2 i\) (XY Plane)
α
\(\beta = b_1 + b_2 i\) (Constrained)
β
\(\beta\) Phase:

3D Isometric Projection of the 4D State

\(X = a_1, \quad Y = a_2 + b_1, \quad Z = b_2\)

X Y Z |ψ⟩

Why does \(|\psi\rangle\) extend beyond the 3D sphere?

The original 4D quantum state is normalized (\(|\alpha|^2 + |\beta|^2 = 1\)), but dropping down to 3D dimensions causes components to compress and mix. Since the \(Y\) axis merges the imaginary part of \(\alpha\) and the real part of \(\beta\), the resulting 3D squared length is:

\(|\vec{v}_{3D}|^2 = X^2 + Y^2 + Z^2 = a_1^2 + (a_2 + b_1)^2 + b_2^2 = 1 + 2a_2b_1\)
Slide 03 / 08 — Foundations
Another 3D projection: The Bloch Sphere
Mapping via Pauli Operator Expectation Values
Instead of a raw variable projection, we can define our 3D coordinates using the expectation values of the Pauli matrices!
\( X = \langle \psi | \sigma_x | \psi \rangle = 2\text{Re}(\alpha^*\beta) \) \( Y = \langle \psi | \sigma_y | \psi \rangle = 2\text{Im}(\alpha^*\beta) \) \( Z = \langle \psi | \sigma_z | \psi \rangle = |\alpha|^2 - |\beta|^2 \)
\(\alpha = a_1 + a_2 i\) (XY Plane)
α
\(\beta = b_1 + b_2 i\) (Constrained)
β
\(\beta\) Phase:
|0⟩ (Z) |1⟩ (-Z) |+⟩ (X)
Slide 04 / 08 — Dual Space & Geometry
The "Bra" \(\langle \psi|\) & The Hermitian Conjugate
Mapping Kets to Bras via Complex Conjugation (Involution)

The Hermitian Conjugate \((\dagger)\)

\(\langle \psi| = (|\psi\rangle)^\dagger = \begin{pmatrix} \alpha^* & \beta^* \end{pmatrix}\)
Re Im α α*

Drag \(\alpha\) to see its conjugate \(\alpha^*\).

Dynamic Inner Product (The Bracket)

\(|\psi\rangle = \alpha|\mathit{0}\rangle + \beta|\mathit{1}\rangle, \qquad |\phi\rangle = c|\mathit{0}\rangle + d|\mathit{1}\rangle\)
\(\langle \psi |\) = Row \(\begin{pmatrix} \alpha^* & \beta^* \end{pmatrix}\)
\(| \phi \rangle\) = Column \(\begin{pmatrix} c \\ d \end{pmatrix}\)
\(\langle \psi | \phi \rangle = \alpha^* c + \beta^* d\)
Let \(|\phi\rangle = |\mathit{0}\rangle\) (so \(c=1, d=0\)).
\(\langle \psi | \mathit{0} \rangle = (\alpha^*)(1) + (\beta^*)(0) = \alpha^*\)
Slide 05 / 08 — Dual Space & Geometry
Inner Products & Superposition Bases
Orthonormality, and the Hadamard Basis in Hilbert Space

Core Axioms

  • Computational Basis is Orthonormal:
    \(\langle \mathit{0} | \mathit{0} \rangle = \langle \mathit{1} | \mathit{1} \rangle = 1\), and \(\langle \mathit{0} | \mathit{1} \rangle = \langle \mathit{1} | \mathit{0} \rangle = 0\)
  • States must be Normalized:
    \(\langle \psi | \psi \rangle = |\alpha|^2 + |\beta|^2 = 1\)
  • Hadamard Superposition Bases:
    \(|+\rangle = \frac{|\mathit{0}\rangle + |\mathit{1}\rangle}{\sqrt{2}} = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 \\ 0 \end{pmatrix} + \frac{1}{\sqrt{2}}\begin{pmatrix} 0 \\ 1 \end{pmatrix} = \begin{pmatrix} \frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} \end{pmatrix}_{\mathbb{C}^2} \cong \begin{pmatrix} \frac{1}{\sqrt{2}} \\ 0 \\ \frac{1}{\sqrt{2}} \\ 0 \end{pmatrix}_{\mathbb{R}^4} \)

    \(|-\rangle = \frac{|\mathit{0}\rangle - |\mathit{1}\rangle}{\sqrt{2}} = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 \\ 0 \end{pmatrix} - \frac{1}{\sqrt{2}}\begin{pmatrix} 0 \\ 1 \end{pmatrix} = \begin{pmatrix} \frac{1}{\sqrt{2}} \\ -\frac{1}{\sqrt{2}} \end{pmatrix}_{\mathbb{C}^2} \cong \begin{pmatrix} \frac{1}{\sqrt{2}} \\ 0 \\ -\frac{1}{\sqrt{2}} \\ 0 \end{pmatrix}_{\mathbb{R}^4} \)
    Notation Note: Because a ket represents a state vector in Hilbert space and not a scalar number, \(|\mathit{0}\rangle + |\psi\rangle \neq |\psi\rangle\) in most situations. The state \(|\mathit{0}\rangle\) is a basis vector, not an additive zero!

Inner Product Summary

\(\begin{array}{c|cccc} \langle \cdot | \cdot \rangle & |\mathit{0}\rangle & |\mathit{1}\rangle & |+\rangle & |-\rangle \\ \hline \langle \mathit{0}| & 1 & 0 & \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\ \langle \mathit{1}| & 0 & 1 & \frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}} \\ \langle +| & \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} & 1 & 0 \\ \langle -| & \frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}} & 0 & 1 \end{array}\)

Interactive Proof of Orthogonality

\(\langle\) \(|\) \(\rangle\)
Slide 06 / 08 — Operators & Logic
Quantum Gates: Visualizing Unitary Matrix Transformations
How X, Z, and H Operators Geometrically Rotate the State Vector

⚡ Interactive Quantum Gate Sandbox

|0⟩ -|0⟩ |1⟩ -|1⟩
Current State:
\(|\psi\rangle = |\mathit{0}\rangle\)
Apply Unitary Gate:
Select a gate to see the matrix multiplication.

Pauli-X (NOT Gate)

\(X = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}\)

Swaps \(|\mathit{0}\rangle \leftrightarrow |\mathit{1}\rangle\). Geometrically: reflects across the diagonal \(y=x\).

Pauli-Z (Phase Flip)

\(Z = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}\)

Flips sign of \(|\mathit{1}\rangle\). Geometrically: reflects across the \(|\mathit{0}\rangle\) axis.

Hadamard (H Gate)

\(H = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}\)

Creates superposition. Geometrically: reflects across \(22.5^\circ\).

Slide 07 / 08 — Advanced & Cryptography
Measurement, Entanglement & Hacking Baby Bitcoin
Born Rule Probabilities, Tensor Products, and Shor's Quantum Period Extraction

Born's Measurement Rule

\(P(m) = |\langle m | \psi \rangle|^2 = \langle \psi | m \rangle \langle m | \psi \rangle\)

For \(|\psi\rangle = \alpha|\mathit{0}\rangle + \beta|\mathit{1}\rangle\): \(P(0) = |\alpha|^2\) and \(P(1) = |\beta|^2\).

Multi-Qubit Registers

\(|\mathit{0}\rangle \otimes |\mathit{1}\rangle = |01\rangle = \begin{pmatrix} 0 \\ 1 \\ 0 \\ 0 \end{pmatrix}\)

Entangled Bell State: \(|\Phi^+\rangle = \frac{|00\rangle + |11\rangle}{\sqrt{2}}\)

🔗 The Quantum Threat to Baby Bitcoin (Shor's Algorithm)

Baby Bitcoin relies on discrete logarithms and factoring \(N = pq\). Quantum computers evaluate modular exponentiation in parallel across an entire register in superposition:

\(|\psi\rangle = \frac{1}{\sqrt{Q}} \sum_{x=0}^{Q-1} |x\rangle \otimes |a^x \pmod N\rangle\)
\(\xrightarrow{\text{QFT}} \text{Period } r \implies \gcd(a^{r/2} \pm 1, N) = p, q\)

Quantum Fourier Transform extracts the period in \(O((\log N)^3)\) time, forging private key signatures and bypassing classical SHA-256 geometric mining waste!

Slide 08 / 08 — Knowledge Check
Interactive Dirac Bra-Ket Mastery Quiz
Test your Quantum Mechanics & Dirac Algebra Intuition with Instant Feedback

Q1: What is \(\langle \mathit{0} | + \rangle\)?

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

Q2: Result of \((|\mathit{0}\rangle \langle \mathit{1}|) |\mathit{1}\rangle\)?

A) \(|\mathit{0}\rangle\)
B) \(|\mathit{1}\rangle\)
C) 0

Q3: If \(|\psi\rangle = \frac{\sqrt{3}}{2}|\mathit{0}\rangle + \frac{1}{2}|\mathit{1}\rangle\), \(P(0)\)?

A) 25% (\(\frac{1}{4}\))
B) 50% (\(\frac{1}{2}\))
C) 75% (\(\frac{3}{4}\))

🎉 Ready for Quantum Simulation?

You have mastered Dirac Bra-Ket notation. Launch MathGod's Google Quantum AI / Cirq Simulator to experiment with multi-qubit Hadamard, CNOT, and QFT circuits!

⚡ Launch Quantum AI Simulator