Pick a depth. Each prompt opens in your AI pre-loaded with the lesson. Click a row to preview the prompt.
Every conversation about post-quantum cryptography eventually bottoms out at the question 'what can a quantum computer actually compute, and on what?' The answer starts with the qubit. A qubit is not a probabilistic bit — it is a unit vector in a two-dimensional complex Hilbert space, and that single change in the state space is what makes Shor's algorithm possible and RSA fragile. If you treat as 'a coin that's 70% heads' you will arrive at every wrong intuition about quantum speedups. Get the linear-algebraic picture concrete now and the rest of this course — superposition, entanglement, Shor, lattice schemes that survive — will land cleanly. Choosing which cryptographic primitives survive quantum computing is fundamentally a question of which mathematical problems remain hard for this model of computation, and you cannot judge hardness against a model you do not understand.
A qubit is a unit vector in . The two computational basis states are and . Any pure qubit state is a complex linear combination with the normalisation constraint . The numbers are called probability amplitudes, not probabilities — they can be negative, complex, and interfere.
// main.go
// go run main.go
package main
import (
"fmt"
"math"
"math/cmplx"
)
func main() {
ket0 := [2]complex128{1, 0}
ket1 := [2]complex128{0, 1}
// A normalised superposition: |psi> = (|0> + i|1>) / sqrt(2)
alpha := complex(1/math.Sqrt(2), 0)
beta := complex(0, 1/math.Sqrt(2))
psi := [2]complex128{
alpha*ket0[0] + beta*ket1[0],
alpha*ket0[1] + beta*ket1[1],
}
fmt.Printf("|psi> = [%v %v]\n", psi[0], psi[1])
fmt.Printf("|alpha|^2 + |beta|^2 = %g\n", cmplx.Abs(alpha)*cmplx.Abs(alpha)+cmplx.Abs(beta)*cmplx.Abs(beta))
inner := psi[0]*cmplx.Conj(psi[0]) + psi[1]*cmplx.Conj(psi[1])
fmt.Printf("inner product <psi|psi> = %g\n", real(inner))
}go run main.go