Information-Theoretic Security via Qiskit
Demonstrating unconditional cryptographic security through quantum mechanics
Classical cryptography faces an existential threat from quantum computers. Shor's algorithm can efficiently break RSA and ECC encryption schemes that protect today's internet. BB84 offers a solution: a key distribution method whose security is physically impossible to compromise, regardless of adversarial computational power.
Security guaranteed by the laws of quantum mechanics, not computational hardness. No future technology can break information-theoretic security.
Any measurement attempt disturbs quantum states due to the no-cloning theorem, making eavesdropping statistically detectable through elevated QBER.
Demonstrated over 100+ km fiber optic cables. Commercial QKD systems already secure government and financial communications worldwide.
Six critical phases of the BB84 quantum key distribution protocol
Alice encodes random bits into quantum states using random bases (Z or X)
Qubits transmitted through quantum channel with optional noise/eavesdropper
Bob measures qubits using independently chosen random bases
Bases compared publicly; only matching bases retained (~50% efficiency)
QBER calculated; if >11%, protocol aborts (eavesdropper detected)
Privacy amplification produces secure shared key
Z-basis (Computational): bit=0 → |0⟩, bit=1 → |1⟩
X-basis (Hadamard): bit=0 → |+⟩ = (|0⟩+|1⟩)/√2, bit=1 → |−⟩ = (|0⟩−|1⟩)/√2
class BB84Protocol:
def encode_qubit(self, bit: int, basis: int) -> QuantumCircuit:
"""Encodes classical bit into quantum state"""
qc = QuantumCircuit(1, 1)
if bit == 1:
qc.x(0) # Apply X gate to get |1⟩
if basis == 1: # X-basis
qc.h(0) # Hadamard transforms Z-basis to X-basis
return qc
def measure_qubit(self, qc: QuantumCircuit, basis: int) -> QuantumCircuit:
"""Measures qubit in specified basis"""
if basis == 1:
qc.h(0) # Transform back to Z-basis
qc.measure(0, 0)
return qc
Critical Requirements:
Comprehensive analysis across multiple scenarios and noise conditions
Visualization of the complete BB84 protocol stages showing efficiency degradation from preparation (100%) through final key generation (22%). The sifting phase reduces bits by 50% due to basis matching, while error checking and privacy amplification further compress the key.
Analysis of BB84 performance under varying depolarizing noise levels from 0% to 15%. The protocol maintains security below the 11% QBER threshold (green region), with key generation rate degrading gracefully as noise increases. Above the threshold (red region), the protocol correctly aborts to prevent compromised key usage.
Shannon mutual information curves demonstrating the security foundation of BB84. The green shaded region represents extractable secret information where I(Alice:Bob) exceeds I(Alice:Eve). At QBER = 11%, mutual information converges to zero, defining the theoretical security threshold. Secret key rate calculation accounts for sifting efficiency and privacy amplification overhead.
Representative quantum circuits for BB84 encoding schemes and E91 entanglement generation. Left: Z-basis encoding with X gate for bit=1. Center: X-basis encoding with double Hadamard transformation. Right: Maximally entangled Bell state |Φ+⟩ = (|00⟩ + |11⟩)/√2 for E91 protocol with barrier separating preparation from measurement.
| Scenario | QBER | Key Rate (bits/sent) | Final Key Length | Secure? |
|---|---|---|---|---|
| Clean Channel | 0.000 | 0.251 | 53 bits (from 200 sent) | ✓ Yes |
| With Eavesdropper (I-R) | 0.230 | 0.000 | 0 bits (protocol aborted) | ✗ No |
| Low Noise (2%) | 0.035 | 0.254 | ~50 bits (from 200 sent) | ✓ Yes |
| High Noise (8%) | 0.116 | 0.114 | ~23 bits (from 200 sent) | ✓ Yes |