Quantum Circuits

Graduate Depth 127 in the knowledge graph I know this Set as goal
Unlocks 30 downstream topics
quantum-circuit circuit-model circuit-depth circuit-width

Core Idea

A quantum circuit is a sequence of quantum gates applied to a register of qubits, read left-to-right in time. Each horizontal wire represents a qubit, gates are boxes or symbols on those wires, and measurement is typically performed at the end. Circuit depth (number of time steps) and width (number of qubits) are the primary complexity measures. The quantum circuit model is the standard computational model for quantum algorithms, analogous to Boolean circuits in classical computing, and is polynomially equivalent to quantum Turing machines.

Explainer

A quantum circuit is the standard way to specify a quantum algorithm. The diagram looks like a musical score: each horizontal line is a qubit (a wire carrying quantum information through time), and gates are placed on these wires in the order they are applied, reading left to right. Single-qubit gates appear as boxes on one wire; two-qubit gates like CNOT span two wires with a vertical connector. The circuit begins with qubits initialized to |0> (by convention) and typically ends with measurement symbols on some or all wires.

The two key complexity measures for quantum circuits are width and depth. Width is the number of qubits — the spatial resource. Depth is the number of sequential time steps — the temporal resource. Gates on disjoint qubits can execute in the same time step (they commute because they act on independent subsystems), so depth counts the longest chain of dependent operations. Total gate count is also important but less fundamental: a circuit with many gates but low depth may be more practical than a shallow circuit with fewer gates, because real qubits decohere over time and depth directly corresponds to how long coherence must be maintained.

The quantum circuit model is polynomially equivalent to the quantum Turing machine, meaning either can simulate the other with at most polynomial overhead. This is the quantum analog of the equivalence between Boolean circuits and classical Turing machines. In practice, nearly all quantum algorithms are described as circuits rather than Turing machines because the circuit representation is more intuitive and directly maps to how quantum hardware operates. When we say an algorithm is "efficient," we mean it uses polynomial depth and polynomial width in the input size.

A crucial principle governing circuit design is deferred measurement: any circuit with mid-circuit measurements followed by classically controlled gates can be transformed into an equivalent circuit where all measurements occur at the end, with the classically controlled gates replaced by quantum-controlled gates. This means measurement never adds computational power — it only extracts classical information. The practical consequence is that you can analyze a quantum circuit as pure unitary evolution followed by a single round of measurement, even if the physical implementation performs measurements earlier. Understanding this principle clarifies why quantum circuits are reversible up to the final measurement step: the unitary part loses no information, and measurement is the irreversible extraction of a classical outcome from the quantum state.

Practice Questions 3 questions

Prerequisite Chain

Counting to 10Counting to 20Understanding ZeroThe Number ZeroCounting to FiveOne-to-One CorrespondenceCombining Small Groups Within 5Addition Within 10Addition Within 20Two-Digit Addition Without RegroupingTwo-Digit Addition with RegroupingAddition Within 100Repeated Addition as MultiplicationMultiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Two-Digit by One-Digit DivisionDivision with RemaindersRemainders and Quotients in DivisionDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueReading and Writing DecimalsComparing and Ordering DecimalsAdding and Subtracting DecimalsMultiplying DecimalsDividing DecimalsDividing FractionsMixed Number ArithmeticOrder of OperationsInteger Order of OperationsVariable ExpressionsCombining Like TermsOne-Step EquationsTwo-Step EquationsSolving Multi-Step EquationsEquations with Variables on Both SidesAngle Pairs: Complementary, Supplementary, and VerticalParallel Lines and TransversalsCorresponding AnglesAlternate Interior AnglesTriangle Angle Sum TheoremExterior Angle TheoremTriangle Inequality TheoremSimilar Triangles: AA SimilaritySimilar Triangles: SSS and SAS SimilarityProportions in Similar TrianglesRight Triangle Trigonometry IntroductionTrigonometric Ratios ReviewRadian MeasureConverting Between Degrees and RadiansThe Unit CircleGraphing Sine and CosineGraphing Tangent and Reciprocal Trigonometric FunctionsDerivatives of Trigonometric FunctionsAntiderivativesIterated Integrals and Fubini's TheoremDouble Integrals in Cartesian CoordinatesDouble Integrals over Rectangular RegionsDouble Integrals in Polar CoordinatesDouble Integrals: Definition and SetupIterated Integrals and Fubini's TheoremDouble Integrals over Rectangular RegionsDouble Integrals over General RegionsApplications of Double Integrals: Area, Mass, and MomentsTriple Integrals in Cartesian CoordinatesTriple Integrals in Cylindrical and Spherical CoordinatesChange of Variables and the Jacobian DeterminantApplications of Triple Integrals: Volume and MassVector Fields and Their RepresentationsLine Integrals of Vector FieldsGreen's TheoremSurface Integrals and Flux of Vector FieldsSurface Integrals and Flux of Vector FieldsDivergence Theorem: Flux and OutflowDivergence TheoremElectric FluxGauss's LawConductors in Electrostatic EquilibriumCapacitance and CapacitorsDielectricsDielectric Constant and Relative PermittivityElectric Field Inside Dielectric MaterialsDielectric Materials and PolarizationDielectric Susceptibility and PermittivityEnergy Density in Electric FieldsElectric Current and Current DensityElectrical Resistance and ResistivityOhm's Law and Circuit ElementsElectromotive Force (EMF) and BatteriesKirchhoff's Circuit Laws: Voltage and CurrentDC Circuit Network Analysis MethodsTransient Response in RC CircuitsRC CircuitsLC and RLC CircuitsAC Circuits: FundamentalsImpedance and ReactanceAC Power and ResonanceElectromagnetic WavesThe Electromagnetic SpectrumBlackbody Radiation and Planck's LawPhotoelectric EffectThe Photon: Light as QuantaCompton ScatteringWave-Particle Dualityde Broglie WavelengthHeisenberg Uncertainty PrincipleWavefunction and the Born RuleThe Schrödinger EquationSchrödinger Equation: Time-Dependent FormWavefunctions and Boundary ConditionsBoundary Value Problems in ElectrostaticsParticle in a Box (Infinite Square Well)Quantum NumbersSpin-1/2 SystemsPauli MatricesQuantum GatesQuantum Circuits

Longest path: 128 steps · 663 total prerequisite topics

Prerequisites (2)

Leads To (18)