Problem definition. Given a black-box $f: \{0,1\}^n \to \{0,1\}$ with the promise that $f$ is constant ($f(x) = c$ for all $x$) or balanced ($|\{x : f(x) = 0\}| = |\{x : f(x) = 1\}| = 2^{n-1}$), determine which.
Fourth lecture of the Quantum Computing in Italian course: the Deutsch-Jozsa algorithm, the first historical example of exponential quantum speedup over the best classical deterministic algorithm. For graduate students and researchers in quantum complexity, this algorithm is the prototype of the class EQP and introduces the quantum parallelism and quantum interference techniques underpinning Shor and others. We cover Deutsch's original 1985 version for 1 qubit, the Deutsch-Jozsa 1992 extension to n qubits, the full circuit, correctness analysis, and comparison with randomised bounds (BPP). The full series traces the canonical arc: from the qubit in superposition, to unitary gates (Hadamard, Pauli, CNOT), entanglement (Bell, GHZ states), foundational algorithms (Deutsch-Jozsa, Grover, Shor), through VQE, QAOA and quantum machine learning on NISQ hardware (IBM Q, IonQ, Rigetti).
Historical context and foundational theorems
David Deutsch in 1985 (Proc. Royal Society A 400) proposes the first quantum algorithm: given an oracle f : {0,1} → {0,1}, decide whether f is constant or balanced. Classically 2 queries needed (both inputs); quantum 1. A constant speedup but conceptually significant. In 1992 Deutsch and Richard Jozsa ("Rapid solution of problems by quantum computation", Proc. Royal Society A 439) extend to f : {0,1}^n → {0,1} with the promise that f is constant or balanced. Classical deterministic needs 2^{n-1} + 1 queries worst case; quantum 1.
Bernstein-Vazirani 1993 generalises into a BQP/BPP separation result. Simon's algorithm 1994 ("On the power of quantum computation", FOCS) first demonstrates exponential speedup over the randomised BPP bound. Shor 1994 leaps to the final result with factoring. The modern framework (Aaronson-Ben-David-Kothari 2020) classifies quantum speedups into 5 classes: (1) algebraic-structural (Shor, HSP), (2) search/Grover, (3) simulation (Lloyd 1996), (4) variational (VQE/QAOA), (5) sampling (BosonSampling). Deutsch-Jozsa belongs to class 1 but as a "toy" prototype.
Article outline
- Problem: distinguish constant vs balanced f
- Oracle access model: query complexity
- Deutsch algorithm (1-qubit case)
- Deutsch-Jozsa: full n-qubit circuit
- Correctness analysis and quantum parallelism
- P / BPP / BQP / EQP comparison
Problem: distinguish constant vs balanced f
Input: oracle for function f : {0,1}^n → {0,1} with the promise that f is constant (same output on all inputs) or balanced (output 0 on exactly 2^{n-1} inputs, 1 on the others). Output: "constant" or "balanced".
Example: for n = 2, f(00) = f(01) = f(10) = f(11) = 0 is constant. f(00) = f(01) = 0, f(10) = f(11) = 1 is balanced. f(00) = 0, f(01) = f(10) = f(11) = 1 is neither, excluded by the promise.
Non-trivial promise: 2 constant functions and C(2^n, 2^{n-1}) balanced ones. This is a promise problem.
Oracle access model: query complexity
The oracle access is a black box: we can invoke f but cannot read its code. Query complexity = number of invocations of f. Classical deterministic worst case: 2^{n-1} + 1 queries. Randomised algorithms: very few queries in expectation to distinguish with high probability, but worst-case deterministically still 2^{n-1} + 1.
Quantum oracle: U_f |x⟩|y⟩ = |x⟩|y ⊕ f(x)⟩ for x ∈ {0,1}^n, y ∈ {0,1}. One query corresponds to applying U_f once. Deutsch-Jozsa solves with 1 quantum query only, regardless of n.
Deutsch algorithm (1-qubit case)
Case n = 1: 4 functions f : {0,1} → {0,1}. Constant: f_0(x) = 0, f_1(x) = 1. Balanced: f_id(x) = x, f_neg(x) = ¬x. Distinguishing constant vs balanced requires 2 classical queries, 1 quantum.
Deutsch circuit: (1) Input |01⟩. (2) Hadamard on both qubits: (|0⟩ + |1⟩)(|0⟩ - |1⟩)/2. (3) Apply U_f: yields Σ_x (−1)^{f(x)} |x⟩(|0⟩ - |1⟩)/√2. (4) Hadamard on first qubit. (5) Measure first qubit.
Outcome 0 ⇒ f constant. Outcome 1 ⇒ f balanced. Analysis: after step 3, first qubit is (−1)^{f(0)}|0⟩ + (−1)^{f(1)}|1⟩. If constant f(0) = f(1): state ±(|0⟩+|1⟩) = ±H|0⟩, after H returns to |0⟩. If balanced: ±(|0⟩-|1⟩) = ±H|1⟩, after H becomes |1⟩. Perfect determinism.
Deutsch-Jozsa: full n-qubit circuit
Generalisation to n qubits: (1) Input |0⟩^n ⊗ |1⟩. (2) Hadamard on all qubits: (1/√2^n) Σ_x |x⟩ ⊗ (|0⟩-|1⟩)/√2. (3) Apply U_f: (1/√2^n) Σ_x (-1)^{f(x)} |x⟩ ⊗ (|0⟩-|1⟩)/√2. (4) Hadamard H^⊗n on the first n qubits. (5) Measure first n qubits.
Result: outcome |0⟩^n with probability |2^{-n} Σ_x (-1)^{f(x)}|^2. If f constant: sum is ±2^n, prob = 1. If f balanced: sum is 0 (perfect cancellation of 2^{n-1} +1 terms and 2^{n-1} -1 terms), prob = 0.
Correctness analysis and quantum parallelism
The quantum parallelism is the apparent "evaluation of f on all inputs in parallel" after the Hadamard step. However we cannot "read" all 2^n outputs: one measurement collapses the state. The true power lies in quantum interference: in Deutsch-Jozsa, amplitudes corresponding to balanced functions interfere destructively on state |0⟩^n, while constants interfere constructively. The final Hadamard converts interference into measurable distinguishability.
This is the paradigmatic pattern of all quantum algorithms: (1) prepare superposition, (2) apply oracle, (3) transform to amplify "good" outcomes via interference, (4) measure. Shor, Grover, Simon, Phase Estimation all follow this structure with variants.
P / BPP / BQP / EQP comparison
Relevant complexity classes: P (deterministic poly), BPP (bounded-error probabilistic poly), BQP (bounded-error quantum poly), EQP (exact quantum poly, zero error). Deutsch-Jozsa separates EQP from P (in exact deterministic query model): P_query(DJ) = Θ(2^n), EQP_query(DJ) = O(1).
But BPP_query(DJ) = O(1): randomised needs only O(1) random inputs and declares "balanced" if it finds two different outputs, "constant" otherwise (exponentially small error probability). So Deutsch-Jozsa does NOT separate BPP from BQP. For exponential randomised separation we need Simon's problem.
Known inclusions: P ⊆ BPP ⊆ BQP ⊆ PSPACE. Open: BQP ⊆? NP. Aaronson 2010 shows an oracle separating BQP from PH (polynomial hierarchy).
# Deutsch-Jozsa in Qiskit for n=3 with balanced f
from qiskit import QuantumCircuit
from qiskit.quantum_info import Statevector
n = 3
qc = QuantumCircuit(n + 1, n)
# Step 1: prepare |0...01>
qc.x(n)
# Step 2: Hadamard everywhere
for q in range(n + 1):
qc.h(q)
# Step 3: balanced oracle: f(x) = x[0] XOR x[1]
qc.cx(0, n)
qc.cx(1, n)
# Step 4: Hadamard on first n
for q in range(n):
qc.h(q)
# Step 5: measure
for q in range(n):
qc.measure(q, q)
print(qc.draw())
# Expected: measured state != |000>, hence 'balanced'
Modern results and open problems
(a) Bernstein-Vazirani (1993): variant for learning bitstring s in function f(x) = s · x mod 2. 1 quantum query vs n classical. (b) Simon's problem (1994): find s with f(x) = f(x ⊕ s). Exponential speedup over randomised too. Paves the way for Shor. (c) Forrelation (Aaronson 2009): maximal BPP/BQP separation. (d) Quantum query complexity: general bounds via polynomial method (Beals-Buhrman-Cleve-Mosca-de Wolf 2001), adversary method (Ambainis 2002). (e) Hidden Subgroup Problem (HSP): framework generalising Shor, Simon, period finding. Open: efficient algorithm for non-abelian groups (e.g. Graph Isomorphism via HSP on symmetric group).
Formal subtleties and silent failures
- Promise problem ≠ standard decision: inputs outside promise have undefined output. Algorithms may give arbitrary answers.
- Modest BPP speedup: Deutsch-Jozsa speedup is only for deterministic query model. Vs BPP it's O(1) classical vs O(1) quantum.
- Uniform vs non-uniform oracle: the model assumes
U_fefficiently implementable. For arbitrary oracles, only lower bound holds. - Phase kickback trick: the
(|0⟩ - |1⟩)/√2ancilla introduces phase(-1)^{f(x)}on the main register. Universal technique in quantum algorithms. - Any qubit non-|0...0⟩: means "balanced". Even a single non-zero bit confirms.
- n=1 degenerate case: 4 total functions (2 constant + 2 balanced). For
n ≥ 2exponentially more balanced functions exclusively. - Deterministic algorithm, not probabilistic: exact probability 1 of correct outcome. Vs Grover (prob 1 - O(1/N)).
- Multi-valued f generalisation: limited. Most quantum algorithms assume
f : {0,1}^n → {0,1}.
Advanced exercises (graduate level)
- Implement balanced oracle: write Qiskit circuit for
f(x) = x_0 ⊕ x_1 ⊕ ... ⊕ x_{n-1}using CNOTs. - Determinism check: simulate Deutsch-Jozsa with statevector simulator for
n = 4, constant and balanced oracles. Verify measurement|0⟩^4with probability 1 (constant) and 0 (balanced). - Bernstein-Vazirani circuit: implement BV for
s = 1011. Verify 1 query recoverss. - Simon's algorithm: implement for
n = 3with oraclef(x) = f(x ⊕ s). Extractsvia linear systems overGF(2). - Lower bound via polynomial method: prove
P_query(DJ) ≥ 2^{n-1}. Hint: adversary argument. - Hidden Subgroup connection: show Deutsch-Jozsa is a special case of HSP for
G = ℤ_2^n,H = {0, x}.
Theoretical deep dives and advanced context
Noise resilience and fault tolerance
NISQ devices have characteristic per-gate error (typically 10^{-3} for IBM Eagle CNOT 2023, 10^{-4} for single-qubit). For a depth-D circuit, final fidelity decays as F ≈ (1-p)^D where p is average per-gate error. Example: for Deutsch-Jozsa circuit with D = 100 and p = 5·10⁻³, F ≈ 0.61. Fault-tolerant quantum computing (FTQC) requires error-correcting codes: surface code, color code, magic-state distillation. The threshold theorem (Aharonov-Ben-Or 1997) guarantees that below error rate p_th ≈ 10^{-2}, concatenated error correction enables arbitrarily long computations.
Strategy error mitigation (not correction): Zero-Noise Extrapolation (Temme et al. 2017), Probabilistic Error Cancellation, virtual distillation. These post-processing techniques improve NISQ results without ancilla overhead. Open problem: characterise circuit classes where mitigation works; barren-plateau analog for mitigation efficiency.
Computational complexity: BQP, QMA, quantum hierarchy
The class BQP (Bounded-error Quantum Polynomial) captures problems solvable in polynomial time by quantum TM with error probability ≤ 1/3. We have P ⊆ BPP ⊆ BQP ⊆ PSPACE. Open: P ⊊ BQP conjectured (e.g. integer factoring in BQP via Shor, presumably not in P), but independent of P = NP. QMA (Quantum Merlin-Arthur) is the quantum analogue of NP: L ∈ QMA iff a quantum poly verifier accepts proof |ψ⟩ with prob ≥ 2/3 when x ∈ L. Canonical example: Local Hamiltonian (Kitaev 1999) is QMA-complete. Aharonov-Gottesman-Irani-Kempe 2009 extend to 1D.
Polynomial Hierarchy collapse: Aaronson 2009 shows that under plausible conjectures, BosonSampling (variants of Deutsch-Jozsa circuit) classically intractable collapses PH to the third level, supporting plausibility of quantum advantage. Open: prove unconditional BQP-vs-P separation, equivalent to open circuit-complexity questions.
Hardware-aware implementation
from qiskit import QuantumCircuit, transpile
from qiskit_aer.noise import NoiseModel, depolarizing_error
from qiskit_aer import AerSimulator
import numpy as np
def build_noisy_simulator(p_1q=1e-3, p_2q=1e-2):
"""Build simulator with depolarising noise."""
noise = NoiseModel()
err_1q = depolarizing_error(p_1q, 1)
err_2q = depolarizing_error(p_2q, 2)
noise.add_all_qubit_quantum_error(err_1q, ['sx', 'x', 'rz', 'h'])
noise.add_all_qubit_quantum_error(err_2q, ['cx', 'ecr'])
return AerSimulator(noise_model=noise)
qc = QuantumCircuit(4, 4)
for i in range(4): qc.h(i)
for i in range(3): qc.cx(i, i+1)
qc.measure(range(4), range(4))
sim = build_noisy_simulator(p_2q=1e-2)
result = sim.run(transpile(qc, sim), shots=4096).result()
counts = result.get_counts()
sorted_outcomes = sorted(counts.items(), key=lambda x: -x[1])[:3]
print(f"Top-3 outcomes: {sorted_outcomes}")
sim_ideal = AerSimulator()
counts_ideal = sim_ideal.run(transpile(qc, sim_ideal), shots=4096).result().get_counts()
print(f"Ideal top-3: {sorted(counts_ideal.items(), key=lambda x: -x[1])[:3]}")
Open problems and research frontiers
(i) Commercial quantum advantage: no industrial task has shown decisive advantage. Candidates: VQE quantum chemistry (below 50 qubits still classically simulable), combinatorial optimisation QAOA, quantum machine learning. (ii) Hardware-algorithm co-design: algorithms tailored to actual hardware topology rather than abstract gate sets. (iii) Distributed quantum computing: protocols to connect chips via photons (entanglement distillation). (iv) Quantum networking: atomic-memory quantum repeaters for scaling distances >100 km (Quantum Internet roadmap, Wehner-Elkouss-Hanson 2018 Science). (v) Open: formal demonstration of quantum advantage in BPP vs BQP for natural problems; still a gap between empirical evidence (Sycamore, Jiuzhang) and rigorous proofs.
Advanced extensions and experimental context 2024-2026
Quantum supremacy experiments: state of the art
The term quantum supremacy (Preskill 2012) describes a computational task performed by a quantum device in practical time while classically requiring prohibitive resources. The first significant claim was Google Sycamore 53-qubit (Arute et al. 2019, Nature 574): random circuit sampling completed in 200 seconds, classically estimated at 10⁴ years. IBM contested arguing advanced tensor-network simulation could reduce the time to 2.5 days (Pednault et al. 2019, arxiv:1910.09534). Chinese USTC realised analogous claims on photonic technology (Zhong et al. 2020, Science 370: Jiuzhang; Wu et al. 2021 Phys. Rev. Lett. 127: Zuchongzhi 2.1). The plurality of tasks and architectures makes the operational definition delicate: each claim requires precise characterisation of task, classical benchmark, and noise model.
Strongest classical objections: (1) spoofing, classical approximate algorithms mimicking the output distribution. Boixo et al. 2018 introduce linear cross-entropy benchmarking (XEB) as fidelity metric; Aaronson-Gunn 2020 show XEB spoofing is classically hard under plausible cryptographic assumptions. (2) Better classical algorithms: Huang et al. 2020 simulate Sycamore in 5 days on the Sunway TaihuLight supercomputer; further GPU tensor-network improvements (Pan-Zhang 2022, Phys. Rev. Lett. 128:030501). (3) Noise reproducibility: random circuits are noise-sensitive; reverse-engineering is active research.
Quantum error correction: surface code and beyond
The surface code (Kitaev 2003, refined by Fowler-Mariantoni-Martinis-Cleland 2012) is the leading fault-tolerance candidate. Encodes one logical qubit on a d × d grid of physical qubits (code distance d), with stabiliser measurements detecting errors without destroying the logical state. Under per-gate error rate p < p_{th} ≈ 0.7%, logical error probability decays as (p/p_{th})^{d/2}. For d = 25, p = 10^{-3}: logical error ~10^{-15}, sufficient for Shor on RSA-2048 with ~5M physical qubits (Gidney-Ekerå 2021 Quantum 5:433).
Emerging alternatives: (a) Color code (Bombin 2007) - transversal Clifford+T gates, but lower threshold ~0.1%. (b) Floquet codes (Hastings-Haah 2021) - dynamic measurement-based, potentially more efficient. (c) Bicycle / LDPC quantum codes (Panteleev-Kalachev 2021) - constant asymptotic overhead (vs O(log² n) for surface), but complex decoding. (d) Topological qubits (Majorana, Microsoft Station Q): self-protected but still experimentally preliminary. (e) Bosonic codes (cat qubits AWS, GKP code) - continuous-mode redundancy, demos on single logical qubit (Sivak et al. 2023, Nature 616). Open: which code for which platform? Hardware-code co-design is an active 2024-2026 frontier.
Post-quantum cryptography
Shor's algorithm (1994) factors in poly time on an ideal quantum computer, threatening RSA, DSA, ECDSA. Grover's algorithm (1996) gives a quadratic speedup for search, halving effective robustness of AES (AES-128 → 64-bit quantum security, AES-256 → 128-bit). NIST launched Post-Quantum Cryptography Standardization 2016, concluded 2024 with four algorithms: Kyber (KEM, lattice-based), Dilithium (signature, lattice), Falcon (signature, compact lattice), SPHINCS+ (signature, hash-based). All secure under assumptions like Module-LWE, Module-SIS.
Global migration: CNSA 2.0 (NSA 2022) mandates PQC use by 2035 in US classified systems. NIST industry roadmap 2024-2030. Practical challenges: (1) larger keys (Kyber-1024 has 1568-byte pubkey vs 256 bytes RSA-2048); (2) slower signing (Dilithium ~10x); (3) hybrid mode: combining PQ + classical for defence-in-depth. Open: PQC for resource-limited embedded devices (IoT, smart cards); side-channel attacks on lattice implementations (Bhasin et al. 2022).
Quantum machine learning: realistic state
QML includes quantum kernel methods, parametric quantum circuits (PQC) as neural networks, quantum embeddings of classical data. Theoretical results exist (Liu-Arunachalam-Temme 2021 Nature Physics: advantage for discrete-log kernels), but practical advantage on real benchmarks remains elusive. Barren plateaus (McClean et al. 2018): gradient of random ansätze vanishes exponentially in qubit number, making training intractable. Solutions: structured ansätze (Hamiltonian Variational, gauge-equivariant), local cost functions (Cerezo-Sone-Volkoff-Cincio-Coles 2021).
Emerging use case: quantum drug discovery via VQE on simple molecules (H₂, LiH, BeH₂), chemical accuracy below 1 kcal/mol with ~10-20 qubits (Peruzzo et al. 2014, Kandala et al. 2017). Open challenge: scaling to >100-electron systems (proteins, catalysts) requires ~1000 fault-tolerant qubits - 2030+ horizon. Quantum reinforcement learning: Dunjko-Briegel 2018 show quadratic speedup for certain MDPs; experimental demos still preliminary (IonQ 2023 4-qubit demo).
Guided exercises with detailed solutions
Exercise 1 - Entanglement check. Given 2-qubit state |ψ⟩ = (|00⟩ + |01⟩ + |10⟩ + |11⟩)/2, determine if it is entangled. Solution: try decomposition as product (α|0⟩+β|1⟩) ⊗ (γ|0⟩+δ|1⟩) = αγ|00⟩+αδ|01⟩+βγ|10⟩+βδ|11⟩. Matching 1/2 each amplitude: αγ = αδ = βγ = βδ = 1/2. Then γ/δ = 1, β/α = 1, so α = β, γ = δ. From normalisation: |α|² = 1/2, similarly γ = δ = 1/√2. Verify: αγ = 1/2 ✓. Separable state = |+⟩|+⟩. NOT entangled.
Exercise 2 - CHSH inequality. Given Bell state |Φ⁺⟩, compute the expectation ⟨A_0 B_0⟩ + ⟨A_0 B_1⟩ + ⟨A_1 B_0⟩ − ⟨A_1 B_1⟩ with observables A_0 = Z, A_1 = X, B_0 = (X+Z)/√2, B_1 = (X-Z)/√2. Solution: for |Φ⁺⟩ the result is 2√2 ≈ 2.83 (Tsirelson bound), violating the classical bound 2 (Bell inequality). Experimental confirmation: Aspect 1982, Hensen 2015 loophole-free.
Exercise 3 - Quantum Fourier Transform. Compute QFT on |3⟩ for 3-qubit (N=8). Solution: QFT|3⟩ = (1/√8) Σ_{k=0}^{7} e^{2πi·3k/8}|k⟩. Coefficients: e^{0}, e^{i·3π/4}, e^{i·3π/2}, e^{i·9π/4}, .... On Qiskit: 3 Hadamards + 3 controlled-phases + 1 SWAP = 7 gates.
Implementation project
"""
Project: implement full Bell state tomography.
Procedure: prepare |Φ+⟩, measure in 9 different bases (XX, XY, ..., ZZ),
reconstruct density matrix via linear inversion and fidelity vs ideal.
"""
import numpy as np
from qiskit import QuantumCircuit, transpile
from qiskit_aer import AerSimulator
def prepare_bell(qc):
qc.h(0)
qc.cx(0, 1)
def measure_basis(qc, basis, q):
if basis == 'X': qc.h(q)
elif basis == 'Y':
qc.sdg(q); qc.h(q)
def tomography():
bases = ['X', 'Y', 'Z']
results = {}
for b0 in bases:
for b1 in bases:
qc = QuantumCircuit(2, 2)
prepare_bell(qc)
measure_basis(qc, b0, 0)
measure_basis(qc, b1, 1)
qc.measure([0, 1], [0, 1])
sim = AerSimulator()
counts = sim.run(transpile(qc, sim), shots=4096).result().get_counts()
ev = 0
for outcome, count in counts.items():
eigenvalue = ((-1)**int(outcome[0])) * ((-1)**int(outcome[1]))
ev += eigenvalue * count / 4096
results[b0 + b1] = ev
return results
results = tomography()
print(f"Tomography results: {results}")
F = (1 + results['XX'] - results['YY'] + results['ZZ']) / 4
print(f"Fidelity to |Φ+⟩: {F:.4f}")
Supplementary materials and operational depth
NISQ device history 2019-2026
The quantum hardware trajectory 2019-2026 shows exponential but uneven growth. 2019: Google Sycamore 53-qubit announces "quantum supremacy" via random circuit sampling. 2020: IBM Falcon 27q, IonQ Trinity 11q, Quantinuum H1 10q. 2021: IBM Eagle 127q (first crossing 100 logical qubits), Zuchongzhi 2.1 56q. 2022: IBM Osprey 433q, Quantinuum H2 56q with record QV 2^16. 2023: IBM Condor 1121q (announced), Atom Computing 1180 neutral atoms. 2024: IBM Heron 156q + Heron Beta, Quantinuum Helios (planned 96q). 2025-2026: IBM System Two roadmap 100k+ qubits, Google Willow target 1M.
Key metrics: gate fidelity superconducting CNOT from 99.0% (2019) to 99.7% (2024 Heron); ion trap MS gate 99.8% (2020) → 99.97% (2024 Quantinuum H2). Coherence time T₂: superconducting 80μs (2019) → 200-300μs (2024); ion traps seconds-minutes (intrinsically long). Connectivity: superconducting limited (heavy-hex IBM, square Google), ion trap native all-to-all. For fault-tolerant scaling: assuming p_th = 0.7%, 2-3 orders of magnitude of fidelity improvement still needed before surface code becomes commercially viable.
Quantum software packages
The quantum software ecosystem 2024-2026: (1) Qiskit (IBM, Python, ~50k GitHub stars): most mature, supports Aer simulator, real hardware via cloud, Pulse-level control, Runtime mode for iterative algorithms. (2) Cirq (Google, Python): designed for Google chips, excellent support for square and Sycamore topologies. (3) PennyLane (Xanadu, Python): focus on quantum machine learning, hybrid quantum-classical autograd. (4) Q# (Microsoft, .NET): integrated with Azure Quantum. (5) tket (Quantinuum, Python+C++): compiler with state-of-the-art passes for CNOT minimisation. (6) QuTiP (Python): dynamic simulation of open quantum systems, master equation, Monte Carlo wave function.
Comparison example. Bell state preparation: Qiskit QuantumCircuit(2).h(0).cx(0, 1); Cirq cirq.Circuit([cirq.H(q0), cirq.CNOT(q0, q1)]); PennyLane @qml.qnode(dev); def circuit(): qml.Hadamard(0); qml.CNOT([0, 1]). Similar patterns; trade-off is ecosystem and backend access. For advanced algorithms (VQE, QAOA), Qiskit Runtime and PennyLane offer optimised primitives; Q# + Azure Quantum chosen for .NET shops.
Industrial quantum cases 2024-2026
(i) Computational chemistry: Mitsubishi Chemical 2023 with IBM on N₂ → NH₃ catalysis via VQE (12-qubit ground state). BASF, Roche pilots on drug-target binding affinity prediction. Commercial ROI not yet confirmed. (ii) Combinatorial optimisation: Volkswagen 2019 with D-Wave Beijing traffic flow; Volvo Cars routing. BMW supply chain via QAOA on IBM. Limits: D-Wave annealing scales to millions of variables but advantage over classical solvers contested (2020+ controversy). (iii) Finance: JPMorgan, Goldman Sachs accelerated Monte Carlo; risk pricing via quantum amplitude estimation (Brassard et al. 2002). Goldman 2024 paper on CDO pricing theoretical 100x speedup. (iv) ML/AI: few commercial uses beyond research; advantage not demonstrated under 1000 fault-tolerant qubits.
Online resources for students
(a) Qiskit Textbook (qiskit.org/textbook): complete open-source course, from qubit to quantum chemistry, with executable notebooks. (b) Quantum Country (quantum.country, Matuschak-Nielsen): mnemonic medium for memorising key concepts. (c) Scott Aaronson blog (Shtetl-Optimized): top expert opinion on NISQ claims and theoretical foundations. (d) IBM Quantum Experience: free access to real chips via cloud (free tier ~5-7 qubit instant, larger backends queued). (e) AWS Braket: pay-per-shot access to IonQ, Rigetti, Quantinuum. (f) arxiv quant-ph: ~5000 papers/year; for beginners follow @SimonsInstQuant Twitter for weekly highlights. (g) Coursera/edX: Caltech CSx101 Quantum Computing for the Determined (Preskill), MITx 6.S089 Quantum Computation.
Technical glossary and summary formulas
Fundamental quantum computing formulas. Schrödinger equation: iℏ ∂|ψ⟩/∂t = H|ψ⟩; formal solution |ψ(t)⟩ = U(t)|ψ(0)⟩ with U(t) = e^{-iHt/ℏ}. Born rule: Prob(measurement outcome = a_i) = |⟨a_i|ψ⟩|². Post-measurement state: |ψ'⟩ = P_i|ψ⟩/||P_i|ψ⟩|| with P_i projector for outcome a_i. Decoherence: ρ(t) = e^{-Γt} ρ_off(0) + ρ_diag(0) for dephasing model.
Glossary. Qubit: quantum info unit, vector in ℂ². Hadamard: gate creating superposition, H = (X+Z)/√2. CNOT: fundamental 2-qubit gate for entanglement. Bell state: maximally entangled, |Φ⁺⟩ = (|00⟩+|11⟩)/√2. Quantum supremacy: quantum task > classical in practical time. NISQ: Noisy Intermediate-Scale Quantum, ~10²-10³ qubit devices without error correction. FTQC: Fault-Tolerant Quantum Computing. VQE: Variational Quantum Eigensolver. QAOA: Quantum Approximate Optimisation Algorithm. Barren plateau: exponentially small gradient, training fails.
Classical vs quantum algorithm comparison
Theoretical speedup table. Factoring: O((log N)^3) Shor quantum vs O(e^{(log N)^{1/3}}) classical (NFS). Exponential speedup. Discrete log: same. Unstructured search: Grover O(√N) vs O(N) classical, quadratic speedup. Linear system Ax = b: HHL quantum O(log N · κ · 1/ε) vs O(N · κ · log(1/ε)) classical (under condition number κ), exponential only for "amplitude estimation" outcomes. Hamiltonian simulation: O(poly(n)) qubits vs O(2^n) classical memory. Combinatorial optimisation (MaxCut): QAOA depth p achieves 0.6924 ratio for p=1, classical Goemans-Williamson 0.878. No decisive speedup proven for small p.
Reality 2026: exponential speedup requires FTQC with millions of qubits. NISQ era dominated by hybrid quantum-classical tasks (VQE, QAOA) but empirical advantage contested. Promising emerging use case: simulation of native quantum systems (chemistry, materials science) where classical cost scales exponentially with electrons.
Advanced research directions and commercial roadmap
The 2026 quantum hardware landscape spans five main technologies, each with own trade-offs. Superconducting transmon (IBM, Google, Rigetti): fast gates (~30-100 ns), limited connectivity (IBM heavy-hex, Google square), T₁/T₂ ~200μs. Advantage: wafer fabrication like CMOS chips, proven industrial scaling. Disadvantage: millikelvin cryogenic temperatures + complex microwave control. Trapped ions (IonQ, Quantinuum, Honeywell): slow gates (~10-100 μs) but fidelity 99.97% (2024 record), all-to-all connectivity via phonon bus, T₂ seconds. Disadvantage: scaling beyond 100 ions requires multi-zone chips with complex shuttling. Photonic (PsiQuantum, Xanadu): room-temperature operation, natural for networking, but 2-qubit gate requires adaptive measurements (KLM scheme). Neutral atoms (Atom Computing 1180-q 2024, Pasqal, QuEra): neutral atom arrays in laser tweezers, reconfigurable all-to-all, potential scaling to 10000+ qubits. Topological (Microsoft Majorana): intrinsic protection, still experimentally preliminary - promising for FTQC with reduced overhead.
Roadmap 2025-2035. IBM System Two (2025-2027): 100k+ physical qubits, target first utility-scale workload demonstration. Google Willow target: 1M logical qubits by 2030. Quantinuum Apollo: scale to 1000+ ion-trap qubits. PsiQuantum: target 1M photonic qubits by 2028 (ambitious). DARPA Quantum Benchmarking Initiative 2023-2026 funded various programmes for standardised metrics. Critical open question: which commercial workload actually requires ≥1000 fault-tolerant qubits for positive ROI? Candidates: drug discovery (Pharma pilots), materials science (green-chemistry catalysis), finance portfolio optimisation, non-classical ML embeddings.
For the IT professional, the 2026 pragmatic stance: (1) Quantum-computing concept familiarity useful for data scientists and ML engineers who may use quantum cloud APIs (AWS Braket, Azure Quantum, IBM Quantum) for benchmarking. (2) Full-time quantum software engineer specialisation requires solid CS background + quantum mechanics + Hamiltonian simulation - niche but growing (~10000 roles globally 2026, salaries 150-300k USD). (3) Migration to PQC is concrete action by 2030: every system must transition from RSA/ECDSA to Kyber/Dilithium for "harvest-now-decrypt-later" attack protection. (4) Quantum education: free Qiskit Textbook courses, Caltech Preskill notes, Nielsen-Chuang books (graduate-level) + Aaronson "Quantum Computing Since Democritus" (more philosophical).
Advanced research directions and commercial roadmap
The 2026 quantum hardware landscape spans five main technologies, each with own trade-offs. Superconducting transmon (IBM, Google, Rigetti): fast gates (~30-100 ns), limited connectivity (IBM heavy-hex, Google square), T₁/T₂ ~200μs. Advantage: wafer fabrication like CMOS chips, proven industrial scaling. Disadvantage: millikelvin cryogenic temperatures + complex microwave control. Trapped ions (IonQ, Quantinuum, Honeywell): slow gates (~10-100 μs) but fidelity 99.97% (2024 record), all-to-all connectivity via phonon bus, T₂ seconds. Disadvantage: scaling beyond 100 ions requires multi-zone chips with complex shuttling. Photonic (PsiQuantum, Xanadu): room-temperature operation, natural for networking, but 2-qubit gate requires adaptive measurements (KLM scheme). Neutral atoms (Atom Computing 1180-q 2024, Pasqal, QuEra): neutral atom arrays in laser tweezers, reconfigurable all-to-all, potential scaling to 10000+ qubits. Topological (Microsoft Majorana): intrinsic protection, still experimentally preliminary - promising for FTQC with reduced overhead.
Roadmap 2025-2035. IBM System Two (2025-2027): 100k+ physical qubits, target first utility-scale workload demonstration. Google Willow target: 1M logical qubits by 2030. Quantinuum Apollo: scale to 1000+ ion-trap qubits. PsiQuantum: target 1M photonic qubits by 2028 (ambitious). DARPA Quantum Benchmarking Initiative 2023-2026 funded various programmes for standardised metrics. Critical open question: which commercial workload actually requires ≥1000 fault-tolerant qubits for positive ROI? Candidates: drug discovery (Pharma pilots), materials science (green-chemistry catalysis), finance portfolio optimisation, non-classical ML embeddings.
For the IT professional, the 2026 pragmatic stance: (1) Quantum-computing concept familiarity useful for data scientists and ML engineers who may use quantum cloud APIs (AWS Braket, Azure Quantum, IBM Quantum) for benchmarking. (2) Full-time quantum software engineer specialisation requires solid CS background + quantum mechanics + Hamiltonian simulation - niche but growing (~10000 roles globally 2026, salaries 150-300k USD). (3) Migration to PQC is concrete action by 2030: every system must transition from RSA/ECDSA to Kyber/Dilithium for "harvest-now-decrypt-later" attack protection. (4) Quantum education: free Qiskit Textbook courses, Caltech Preskill notes, Nielsen-Chuang books (graduate-level) + Aaronson "Quantum Computing Since Democritus" (more philosophical).
Complexity table: Deutsch-Jozsa vs classical
| Computational model | Oracle queries | Error | Notes |
|---|---|---|---|
| Classical deterministic (worst-case) | $2^{n-1}+1$ | 0 | Need $2^{n-1}+1$ distinct inputs to be certain |
| Classical randomised (Monte Carlo) | $O(1)$ | $\le 1/3$ | 10 random queries already give error rate $2^{-10}$ |
| Quantum Deutsch-Jozsa | 1 | 0 | Exact, EQP-class prototype |
| Quantum Bernstein-Vazirani | 1 | 0 | Finds hidden string $a$ with $f(x) = a \cdot x$ |
| Quantum Simon | $O(n)$ | bounded | Exponential speedup vs BPP, Shor's predecessor |
| Quantum Shor (factoring) | $O(n^3)$ gates | bounded | Exponential speedup vs best known classical algorithm |
ASCII circuit diagram: Deutsch-Jozsa n=2
q_0 (input): ─|0⟩─H─┐ ┌─H─[M]
│ │
q_1 (input): ─|0⟩─H─┤ U_f ├─H─[M]
│ │
q_2 (ancilla):─|1⟩─H─┘ └─────
Readout: if both output bits are 0 → f constant
otherwise → f balanced
FAQ - Frequently asked questions about Deutsch-Jozsa
Why is Deutsch-Jozsa "disappointing" as a practical speedup?
Because the problem has an artificial structure (the "constant or balanced" promise) and classically resolves in $O(1)$ with randomisation at arbitrarily small error. The exponential speedup holds only in the exact model (zero error). For practically meaningful problems, rigorous exponential quantum speedups come from Shor (factoring), HHL (linear systems), and quantum simulation of natural quantum systems (Feynman 1982).
What is "phase kickback" technically?
When the ancilla qubit is prepared in $|-\rangle$ (an eigenstate of $X$ with eigenvalue $-1$), the action of $U_f$ becomes $U_f|x\rangle|-\rangle = |x\rangle \otimes X^{f(x)}|-\rangle = (-1)^{f(x)}|x\rangle|-\rangle$. The boolean value of $f$ is "transformed" into a complex phase on the input register, readable via Hadamard interference. Same trick is reused in the Grover oracle.
Can I run Deutsch-Jozsa on a real NISQ computer?
Yes, it is a classic demo. On IBM Quantum: QuantumCircuit(n+1, n), apply H to all qubits, encode the oracle as logic gates (for balanced $f$: series of CNOTs from input to ancilla; for constant: identity or X on ancilla), final H on input register, measure. With 4-5 qubits and gate error $\sim 10^{-3}$, results are correct >95% of shots. Historical demo: Chuang et al. 1998 NMR 2-qubit.
What is the relationship between Deutsch-Jozsa and Bernstein-Vazirani?
Bernstein-Vazirani (1993) is a natural generalisation: given oracle $f(x) = a \cdot x \pmod 2$ with unknown $a \in \{0,1\}^n$, find $a$. Classically needs $n$ queries (one per bit); quantum 1. Circuit identical to Deutsch-Jozsa, but the measurement output is directly $a$. It is the "linear" case of Simon's problem (more general, hidden XOR subgroup).
Why an extra ancilla qubit beyond the n input ones?
Because the standard oracle is a reversible map $|x\rangle|y\rangle \to |x\rangle|y \oplus f(x)\rangle$ requiring a separate output qubit from the input register. Without ancilla, a direct map $|x\rangle \to |f(x)\rangle$ would not be unitary (it loses information about $x$). The ancilla prepared in $|-\rangle$ enables phase kickback.
How many shots are needed to measure the result?
Ideal model, one: the algorithm is exact. On real hardware with noise, ~100-1000 shots are needed and we look at the distribution: dominant $|00...0\rangle$ probability → constant, spread distribution → balanced. The decision threshold is typically $P(|00...0\rangle) > 0.5$.
Essential bibliography
- Nielsen-Chuang, Quantum Computation and Quantum Information, Cambridge UP 2010 (10th anniversary ed.).
- Preskill, Lecture Notes on Quantum Computation, Caltech 1998-presente.
- Mermin, Quantum Computer Science: An Introduction, Cambridge UP 2007.
- Kitaev-Shen-Vyalyi, Classical and Quantum Computation, AMS 2002.
- Preskill, "Quantum Computing in the NISQ era and beyond", Quantum 2:79, 2018. arxiv:1801.00862.
- Aaronson, Quantum Computing Since Democritus, Cambridge UP 2013.
- Bharti et al., "Noisy intermediate-scale quantum algorithms", Rev. Mod. Phys. 94, 015004 (2022).
- Lloyd, "Universal Quantum Simulators", Science 273:1073, 1996.
- Deutsch, "Quantum theory, the Church-Turing principle and the universal quantum computer", Proc. Royal Society A 400, 1985.
- Deutsch-Jozsa, "Rapid solution of problems by quantum computation", Proc. Royal Society A 439, 1992.
- Simon, "On the power of quantum computation", FOCS 1994.
Technical prerequisites
- Mathematical analysis I-II, linear algebra, predicate logic
- Algorithms and data structures (Cormen-Leiserson-Rivest-Stein chapters 1-7)
- Familiarity with Python 3.12+ and scientific libraries (NumPy, NetworkX, sympy)
- Ability to read advanced mathematical notation and formal proofs
- Functional or typed programming background useful for the examples
Related resources
- Series index
- Qiskit Textbook
- IBM Quantum Experience
- Previous: Entanglement
- Next: Grover
- arXiv quant-ph - preprint repository
Article updated 2026-05-16, PhD/research level.
Commenti
Caricamento commenti...
Sign in to comment