QCQI – Chapter 4 Detailed Summary: Quantum Circuits & Universality
Learning Objectives¶
Use the quantum circuit model: wires, gates, controlled operations, measurement.
Decompose arbitrary single-qubit unitaries via ZYZ Euler angles and synthesize circuits.
Understand universal gate sets (e.g., Clifford+T, ) and the idea of Solovay–Kitaev.
Recognize two-qubit universality: any entangling two-qubit gate + all 1-qubit gates is universal.
Implement and reason about Toffoli/controlled- constructions and CNOT counts at a high level.
Circuit Model & Controlled Operations¶
A circuit is a sequence of unitary gates acting on qubit wires, followed by measurements. Controlled gates apply a target unitary when the control is , with matrix in the control’s computational basis.
Eureka! Control promotes linear evolution into conditional evolution without leaving unitarity; it is the bridge to classical logic within quantum circuits.
Universality & Gate Libraries¶
A gate set is universal if any -qubit unitary can be approximated to tolerance by a circuit over with polynomial overhead in and . Key libraries:
Clifford+T: generated by , where .
: also universal (since ).
Any entangling 2-qubit gate + all 1-qubit gates is universal.
Eureka! Adding any entangling 2-qubit gate to the set of all 1-qubit gates “crosses the universality threshold.”
Single-Qubit Decomposition (ZYZ)¶
Any admits
Synthesis follows directly from these rotations.
Eureka! On the Bloch sphere, is a rotation; ZYZ chooses a convenient coordinate chart for that rotation.
Two-Qubit Decomposition (Idea)¶
Any can be compiled into a sequence of one-qubit gates interleaved with a finite number of CNOTs. Canonical/KAK decompositions separate local (1-qubit) and nonlocal content.
Eureka! CNOTs are the currency of nonlocality; compilation tries to spend as few as possible.
Approximation & Solovay–Kitaev (SK) Idea¶
Given a finite universal set with inverses, SK constructs -approximations of single-qubit unitaries with length polylog. Practical compilers often use number-theoretic exact synthesis for Clifford+T and heuristic search for small circuits.
Eureka! Polylogarithmic approximation length means high precision is cheap asymptotically.
Worked Constructions¶
Controlled- (single control). Using ZYZ for and two CNOTs yields a standard template (Barenco-style).
Toffoli (CCX). Can be implemented using Clifford+T with modest -count (relative-phase versions reduce CNOT/T counts).
Pseudo-code Aids¶
Pseudocode — ZYZ angles from a unitary
Input: Normalize phase so ; extract so that (Use arctan2 on matrix entries; handle edge cases when )
Pseudocode — Controlled- from ZYZ + two CNOTs (concept)
Input: Synthesize using patterns: interleave s with on the target Output: Circuit with two CNOTs + single-qubit rotations (details in notebook)
Pseudocode — Coarse Clifford+T approximation of
Input: angle , grid step Find and use (up to phase) Refine with context to reduce global-phase effects
Schematics¶
Universal Gate Library¶
Controlled- (concept)¶
Hands-on Notebook (Multi-Backend)¶
Run: L04
In the first cell set backend to one of: cirq, pennylane, braket, pyquil, or qiskit.
Mini-Lab Ideas¶
Extract ZYZ angles from a random single-qubit unitary; synthesize and verify fidelity.
Coarsely approximate with Clifford+T; study error vs. -count.
Implement controlled- and measure entanglement generated from .