1. Home
  2. Explore
  3. Computer Science
  4. Quantum Circuit Model

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Quantum Circuit Model

Understanding Quantum Information and Computation: Lesson 3 Notes

Quantum Circuit Model

The quantum circuit model is a framework for describing quantum computations using wires (representing qubits) and gates (representing unitary operations and measurements). Information flows from left to right, making circuits acyclic — no feedback loops are allowed. This model is analogous to Boolean circuits (which use binary values and Boolean logic gates) and arithmetic circuits (which manipulate numbers), but with quantum-specific elements.

Basic Structure of Quantum Circuits

  • Wires: Horizontal lines, each representing a qubit. Labels can be added (e.g., X, Y).

  • Gates: Represent unitary operations. Usually drawn as squares with a letter indicating the operation (e.g., H for Hadamard, S, T).

  • Measurements: Represented by meter-like symbols. Classical bits (outcomes) are indicated by double lines.

Example of a single-qubit circuit:
A qubit X undergoes a sequence: Hadamard → S → Hadamard → T. The combined unitary matrix is the product (reversed order due to composition convention):

U=T⋅H⋅S⋅H=(product of matrices)U = T \cdot H \cdot S \cdot H = \text{(product of matrices)}U=T⋅H⋅S⋅H=(product of matrices)

If the input state is ∣0⟩|0\rangle∣0⟩, the output is U∣0⟩U|0\rangleU∣0⟩.

Ordering Convention for Multiple Qubits

In quantum circuit diagrams, bottom-to-top ordering corresponds to left-to-right ordering in a tuple or tensor product. This is the convention used in Qiskit. For example, with qubits X (bottom) and Y (top), the combined state is ordered as (X,Y)(X, Y)(X,Y). Visualize rotating the circuit clockwise: inputs align top-to-bottom, outputs bottom-to-top.

Controlled Gates and Common Symbols

  • Controlled NOT (CNOT): A control qubit (solid circle) and a target qubit (circle with + inside). The target is flipped if the control is ∣1⟩|1\rangle∣1⟩.

  • Swap gate: Two crossing lines with an × at each end.

  • Toffoli gate: A controlled-controlled NOT (two control qubits).

  • Fredkin gate: A controlled swap gate.

  • Arbitrary unitary U: Drawn as a rectangle labeled U. Controlled-U uses a solid circle on the control.

Example: Two-qubit circuit producing Bell states
The circuit: apply Hadamard to Y, then CNOT with Y as control and X as target. For input ∣0⟩X∣0⟩Y|0\rangle_X |0\rangle_Y∣0⟩X​∣0⟩Y​, the output is the Bell state ∣Φ+⟩=12(∣00⟩+∣11⟩)|\Phi^+\rangle = \frac{1}{\sqrt{2}}(|00\rangle + |11\rangle)∣Φ+⟩=2​1​(∣00⟩+∣11⟩). Other standard basis inputs yield other Bell states (up to global phase).

Incorporating Classical Bits and Measurements

  • Classical bits are represented by double lines.

  • A measurement of a qubit yields a classical outcome. After measurement, the qubit may continue (but often discarded).

  • Shorthand: measurement symbol with qubit in, classical bit out — qubit is discarded.

Summary of Quantum Circuit Model

  • Any unitary operation on any number of qubits can be treated as a single gate (black box).

  • The model provides a standard language for describing quantum algorithms, protocols, and interactions.

  • Many examples will appear throughout the series, ranging from simple to complex.


Inner Products, Orthonormality, and Projections

These mathematical concepts are essential for working with quantum states and measurements.

Inner Product

Given two vectors (kets) ∣ψ⟩|\psi\rangle∣ψ⟩ and ∣ϕ⟩|\phi\rangle∣ϕ⟩ with the same number of entries, the inner product is ⟨ψ∣ϕ⟩\langle \psi | \phi \rangle⟨ψ∣ϕ⟩, obtained by multiplying the bra (conjugate transpose) of ∣ψ⟩|\psi\rangle∣ψ⟩ with the ket ∣ϕ⟩|\phi\rangle∣ϕ⟩. In standard basis expansion:

∣ψ⟩=∑σασ∣σ⟩,∣ϕ⟩=∑σβσ∣σ⟩|\psi\rangle = \sum_{\sigma} \alpha_\sigma |\sigma\rangle, \quad |\phi\rangle = \sum_{\sigma} \beta_\sigma |\sigma\rangle∣ψ⟩=∑σ​ασ​∣σ⟩,∣ϕ⟩=∑σ​βσ​∣σ⟩
⟨ψ∣ϕ⟩=∑σασ∗βσ\langle \psi | \phi \rangle = \sum_{\sigma} \alpha_\sigma^* \beta_\sigma⟨ψ∣ϕ⟩=∑σ​ασ∗​βσ​

Geometric interpretation (real entries): For unit vectors in 2D, the inner product equals the cosine of the angle between them. Orthogonal vectors have inner product zero (90° angle). This generalizes to higher dimensions, but complex entries lose the simple geometric picture.

Properties of the Inner Product

  1. Relation to Euclidean norm: ⟨ψ∣ψ⟩=∥ψ∥2\langle \psi | \psi \rangle = \|\psi\|^2⟨ψ∣ψ⟩=∥ψ∥2.

  2. Conjugate symmetry: ⟨ψ∣ϕ⟩=⟨ϕ∣ψ⟩∗\langle \psi | \phi \rangle = \langle \phi | \psi \rangle^*⟨ψ∣ϕ⟩=⟨ϕ∣ψ⟩∗.

  3. Linearity in second argument: ⟨ψ∣αϕ1+βϕ2⟩=α⟨ψ∣ϕ1⟩+β⟨ψ∣ϕ2⟩\langle \psi | \alpha \phi_1 + \beta \phi_2 \rangle = \alpha \langle \psi | \phi_1 \rangle + \beta \langle \psi | \phi_2 \rangle⟨ψ∣αϕ1​+βϕ2​⟩=α⟨ψ∣ϕ1​⟩+β⟨ψ∣ϕ2​⟩.

  4. Conjugate linearity in first argument: ⟨αψ1+βψ2∣ϕ⟩=α∗⟨ψ1∣ϕ⟩+β∗⟨ψ2∣ϕ⟩\langle \alpha \psi_1 + \beta \psi_2 | \phi \rangle = \alpha^* \langle \psi_1 | \phi \rangle + \beta^* \langle \psi_2 | \phi \rangle⟨αψ1​+βψ2​∣ϕ⟩=α∗⟨ψ1​∣ϕ⟩+β∗⟨ψ2​∣ϕ⟩.

  5. Cauchy-Schwarz inequality: For any vectors ∣ψ⟩|\psi\rangle∣ψ⟩, ∣ϕ⟩|\phi\rangle∣ϕ⟩,

∣⟨ψ∣ϕ⟩∣≤∥ψ∥⋅∥ϕ∥|\langle \psi | \phi \rangle| \le \|\psi\| \cdot \|\phi\|∣⟨ψ∣ϕ⟩∣≤∥ψ∥⋅∥ϕ∥

Equality holds iff ∣ψ⟩|\psi\rangle∣ψ⟩ and ∣ϕ⟩|\phi\rangle∣ϕ⟩ are linearly dependent (one is a scalar multiple of the other). This inequality is fundamental in quantum information.

Orthogonality and Orthonormality

  • Orthogonal vectors: ⟨ψ∣ϕ⟩=0\langle \psi | \phi \rangle = 0⟨ψ∣ϕ⟩=0. Intuitively perpendicular.

  • Orthogonal set: Any two distinct vectors in the set are orthogonal.

  • Orthonormal set: An orthogonal set where every vector is a unit vector (norm = 1). Condition: ⟨ψi∣ψj⟩=δij\langle \psi_i | \psi_j \rangle = \delta_{ij}⟨ψi​∣ψj​⟩=δij​.

  • Orthonormal basis: An orthonormal set that spans the entire vector space.

Examples:

  • Standard basis {∣0⟩,∣1⟩}\{|0\rangle, |1\rangle\}{∣0⟩,∣1⟩} for a single qubit.

  • {∣+⟩,∣−⟩}\{|+\rangle, |-\rangle\}{∣+⟩,∣−⟩} with ∣+⟩=12(∣0⟩+∣1⟩)|+\rangle = \frac{1}{\sqrt{2}}(|0\rangle + |1\rangle)∣+⟩=2​1​(∣0⟩+∣1⟩), ∣−⟩=12(∣0⟩−∣1⟩)|-\rangle = \frac{1}{\sqrt{2}}(|0\rangle - |1\rangle)∣−⟩=2​1​(∣0⟩−∣1⟩).

  • Bell basis for two qubits: four Bell states.

Key fact: Any orthonormal set of MMM vectors in an NNN-dimensional space (M<NM < NM<N) can be extended to an orthonormal basis (e.g., via Gram-Schmidt). This implies that given such a set, there always exists a unitary matrix whose first MMM columns are those vectors.

Connection Between Unitary Matrices and Orthonormal Bases

For any square matrix UUU, the following are equivalent:

  • UUU is unitary: U†U=UU†=IU^\dagger U = U U^\dagger = IU†U=UU†=I.

  • The rows of UUU form an orthonormal basis.

  • The columns of UUU form an orthonormal basis.

This equivalence is powerful: to construct a unitary matrix, one can take any orthonormal set of vectors as columns and fill in the rest to form an orthonormal basis.

Projections

A square matrix Π\PiΠ is a projection (or projection matrix) if it satisfies:

  • Π\PiΠ is Hermitian: Π†=Π\Pi^\dagger = \PiΠ†=Π.

  • Π\PiΠ is idempotent: Π2=Π\Pi^2 = \PiΠ2=Π.

Intuition: A projection maps a vector onto a subspace, "zeroing out" the orthogonal complement. Applying it twice does nothing.

Example: For any unit vector ∣ψ⟩|\psi\rangle∣ψ⟩, the matrix Π=∣ψ⟩⟨ψ∣\Pi = |\psi\rangle \langle \psi|Π=∣ψ⟩⟨ψ∣ is a projection. Check:

  • Hermitian: (∣ψ⟩⟨ψ∣)†=∣ψ⟩⟨ψ∣(|\psi\rangle \langle \psi|)^\dagger = |\psi\rangle \langle \psi|(∣ψ⟩⟨ψ∣)†=∣ψ⟩⟨ψ∣ (since ∣ψ⟩⟨ψ∣|\psi\rangle \langle \psi|∣ψ⟩⟨ψ∣ is its own conjugate transpose).

  • Idempotent: (∣ψ⟩⟨ψ∣)2=∣ψ⟩⟨ψ∣ψ⟩⟨ψ∣=∣ψ⟩⟨ψ∣(|\psi\rangle \langle \psi|)^2 = |\psi\rangle \langle \psi| \psi\rangle \langle \psi| = |\psi\rangle \langle \psi|(∣ψ⟩⟨ψ∣)2=∣ψ⟩⟨ψ∣ψ⟩⟨ψ∣=∣ψ⟩⟨ψ∣ because ⟨ψ∣ψ⟩=1\langle \psi | \psi \rangle = 1⟨ψ∣ψ⟩=1.

General form: Any projection can be written as Π=∑k=1M∣ψk⟩⟨ψk∣\Pi = \sum_{k=1}^M |\psi_k\rangle \langle \psi_k|Π=∑k=1M​∣ψk​⟩⟨ψk​∣, where {∣ψk⟩}\{|\psi_k\rangle\}{∣ψk​⟩} is an orthonormal set (possibly empty, giving zero matrix). This projects onto the subspace spanned by these vectors.

Projective Measurements

A projective measurement is defined by a collection of projections {Πk}k=1M\{\Pi_k\}_{k=1}^M{Πk​}k=1M​ such that ∑k=1MΠk=I\sum_{k=1}^M \Pi_k = I∑k=1M​Πk​=I. The outcomes can be labeled arbitrarily (e.g., from a set Γ\GammaΓ).

Measurement process:

  • Given state ∣ψ⟩|\psi\rangle∣ψ⟩, outcome kkk occurs with probability

pk=∥Πk∣ψ⟩∥2=⟨ψ∣Πk∣ψ⟩p_k = \|\Pi_k |\psi\rangle\|^2 = \langle \psi | \Pi_k | \psi \ranglepk​=∥Πk​∣ψ⟩∥2=⟨ψ∣Πk​∣ψ⟩
  • Conditioned on outcome kkk, the state collapses to

Πk∣ψ⟩∥Πk∣ψ⟩∥\frac{\Pi_k |\psi\rangle}{\|\Pi_k |\psi\rangle\|}∥Πk​∣ψ⟩∥Πk​∣ψ⟩​

Examples:

  1. Standard basis measurement: For a system with classical state set Σ\SigmaΣ, the projections are {∣σ⟩⟨σ∣:σ∈Σ}\{ |\sigma\rangle \langle \sigma| : \sigma \in \Sigma\}{∣σ⟩⟨σ∣:σ∈Σ}. This yields probabilities ∣⟨σ∣ψ⟩∣2|\langle \sigma | \psi \rangle|^2∣⟨σ∣ψ⟩∣2 and post-measurement state ∣σ⟩|\sigma\rangle∣σ⟩ (up to a global phase).

  2. Measuring a subsystem: Measuring qubit X (while doing nothing to Y) corresponds to projections {∣a⟩⟨a∣X⊗IY}\{ |a\rangle \langle a|_X \otimes I_Y \}{∣a⟩⟨a∣X​⊗IY​}.

  3. Bell measurement example: A projective measurement on two qubits with two outcomes: one projection onto the span of the three symmetric Bell states, and another onto the antisymmetric Bell state ∣Ψ−⟩|\Psi^-\rangle∣Ψ−⟩.

Implementation: Any projective measurement can be realized by a quantum circuit consisting of unitary operations followed by a standard basis measurement. For example, the Bell measurement can be implemented using a Hadamard gate, Fredkin gate, another Hadamard, and a measurement on an ancilla qubit.


Important Limitations of Quantum Information

Global Phase Irrelevance

Two quantum state vectors ∣ψ⟩|\psi\rangle∣ψ⟩ and ∣ϕ⟩|\phi\rangle∣ϕ⟩ differ by a global phase if ∣ϕ⟩=α∣ψ⟩|\phi\rangle = \alpha |\psi\rangle∣ϕ⟩=α∣ψ⟩ for some complex number α\alphaα with ∣α∣=1|\alpha| = 1∣α∣=1.

Why global phases are irrelevant:

  • For any measurement (projective or standard basis), probabilities depend only on ∣⟨⋅∣ψ⟩∣2|\langle \cdot | \psi \rangle|^2∣⟨⋅∣ψ⟩∣2, which is unchanged by multiplying by a unit modulus factor.

  • Applying any unitary operation preserves the global phase difference.

  • Therefore, states differing by a global phase are physically indistinguishable. They are considered equivalent—different vector representations of the same quantum state.

Examples:

  • ∣−⟩|-\rangle∣−⟩ and −∣−⟩-|-\rangle−∣−⟩ differ by a global phase (multiply by −1-1−1).

  • ∣+⟩|+\rangle∣+⟩ and ∣−⟩|-\rangle∣−⟩ do not differ by a global phase; they are orthogonal. The difference here is a relative phase (sign between ∣0⟩|0\rangle∣0⟩ and ∣1⟩|1\rangle∣1⟩ components).

Note: In the density matrix formalism (Unit 3), this degeneracy disappears—each quantum state has a unique representation.

No-Cloning Theorem

Statement: It is impossible to create a perfect copy of an arbitrary unknown quantum state. Specifically, there is no unitary operation UUU on systems XXX and YYY (with the same classical state set, dimension ≥2\ge 2≥2) such that for all ∣ψ⟩|\psi\rangle∣ψ⟩,

U(∣ψ⟩X⊗∣0⟩Y)=∣ψ⟩X⊗∣ψ⟩YU (|\psi\rangle_X \otimes |0\rangle_Y) = |\psi\rangle_X \otimes |\psi\rangle_YU(∣ψ⟩X​⊗∣0⟩Y​)=∣ψ⟩X​⊗∣ψ⟩Y​

Proof sketch: Suppose such a UUU exists. It must clone standard basis states, e.g., U∣0⟩∣0⟩=∣0⟩∣0⟩U|0\rangle|0\rangle = |0\rangle|0\rangleU∣0⟩∣0⟩=∣0⟩∣0⟩ and U∣1⟩∣0⟩=∣1⟩∣1⟩U|1\rangle|0\rangle = |1\rangle|1\rangleU∣1⟩∣0⟩=∣1⟩∣1⟩. By linearity, for ∣ψ⟩=∣+⟩=12(∣0⟩+∣1⟩)|\psi\rangle = |+\rangle = \frac{1}{\sqrt{2}}(|0\rangle + |1\rangle)∣ψ⟩=∣+⟩=2​1​(∣0⟩+∣1⟩),

U∣+⟩∣0⟩=12(∣0⟩∣0⟩+∣1⟩∣1⟩)U|+\rangle|0\rangle = \frac{1}{\sqrt{2}}(|0\rangle|0\rangle + |1\rangle|1\rangle)U∣+⟩∣0⟩=2​1​(∣0⟩∣0⟩+∣1⟩∣1⟩)

But the required output is ∣+⟩∣+⟩=12(∣00⟩+∣01⟩+∣10⟩+∣11⟩)|+\rangle|+\rangle = \frac{1}{2}(|00\rangle + |01\rangle + |10\rangle + |11\rangle)∣+⟩∣+⟩=21​(∣00⟩+∣01⟩+∣10⟩+∣11⟩). These are different states (e.g., the first lacks terms ∣01⟩|01\rangle∣01⟩ and ∣10⟩|10\rangle∣10⟩), so no such UUU exists.

Remarks:

  • Cloning of orthogonal states (e.g., standard basis states) is possible (CNOT copies ∣0⟩|0\rangle∣0⟩ and ∣1⟩|1\rangle∣1⟩).

  • Approximate cloning is possible but limited.

  • The no-cloning theorem also holds for probabilistic states (linearity prevents copying an unknown probability distribution), but is less celebrated.

Perfect Discrimination of Non-Orthogonal States is Impossible

Two quantum states can be perfectly discriminated without error iff they are orthogonal.

Proof (Impossibility ⇒\Rightarrow⇒ orthogonality):
Assume there exists a unitary UUU and an ancilla system that perfectly discriminates states ∣ψ⟩|\psi\rangle∣ψ⟩ and ∣ϕ⟩|\phi\rangle∣ϕ⟩: applying UUU with ancilla in ∣0…0⟩|0\ldots 0\rangle∣0…0⟩ yields, after measurement of the top qubit, outcome 0 for ∣ψ⟩|\psi\rangle∣ψ⟩ and outcome 1 for ∣ϕ⟩|\phi\rangle∣ϕ⟩ with certainty. Then the global state after UUU must be ∣0⟩⊗∣π0⟩|0\rangle \otimes |\pi_0\rangle∣0⟩⊗∣π0​⟩ (for ψ\psiψ) and ∣1⟩⊗∣π1⟩|1\rangle \otimes |\pi_1\rangle∣1⟩⊗∣π1​⟩ (for ϕ\phiϕ), for some normalized ∣π0⟩|\pi_0\rangle∣π0​⟩, ∣π1⟩|\pi_1\rangle∣π1​⟩. Taking inner products:

⟨ψ∣ϕ⟩=⟨ψ∣ϕ⟩⟨0…0∣0…0⟩=(inner product of left-hand sides)=(inner product of right-hand sides)=⟨0∣1⟩⟨π0∣π1⟩=0⋅⟨π0∣π1⟩=0\langle \psi | \phi \rangle = \langle \psi | \phi \rangle \langle 0\ldots0 | 0\ldots0 \rangle = (\text{inner product of left-hand sides}) = (\text{inner product of right-hand sides}) = \langle 0|1\rangle \langle \pi_0 | \pi_1 \rangle = 0 \cdot \langle \pi_0 | \pi_1 \rangle = 0⟨ψ∣ϕ⟩=⟨ψ∣ϕ⟩⟨0…0∣0…0⟩=(inner product of left-hand sides)=(inner product of right-hand sides)=⟨0∣1⟩⟨π0​∣π1​⟩=0⋅⟨π0​∣π1​⟩=0

Thus ⟨ψ∣ϕ⟩=0\langle \psi | \phi \rangle = 0⟨ψ∣ϕ⟩=0, i.e., the states are orthogonal.

Converse (Orthogonal states can be discriminated):

  • Use a unitary UUU whose first two columns are ∣ψ⟩|\psi\rangle∣ψ⟩ and ∣ϕ⟩|\phi\rangle∣ϕ⟩ (possible due to extension of orthonormal sets). After applying U†U^\daggerU† to the unknown state, measuring the first qubit yields distinguishable outcomes.

  • Alternatively, define a projective measurement with Π0=∣ψ⟩⟨ψ∣\Pi_0 = |\psi\rangle \langle \psi|Π0​=∣ψ⟩⟨ψ∣ and Π1=I−∣ψ⟩⟨ψ∣\Pi_1 = I - |\psi\rangle \langle \psi|Π1​=I−∣ψ⟩⟨ψ∣. Then p0=1p_0 = 1p0​=1 for ∣ψ⟩|\psi\rangle∣ψ⟩ and p1=1p_1 = 1p1​=1 for any ∣ϕ⟩|\phi\rangle∣ϕ⟩ orthogonal to ∣ψ⟩|\psi\rangle∣ψ⟩.


Summary of Lesson 3

  • Quantum circuit model: Standard method to describe quantum computations with wires (qubits) and gates (unitary operations, measurements). Conventions: left-to-right time flow, bottom-to-top ordering for multiple qubits.

  • Inner product: Essential mathematical tool for calculating probabilities, norms, and orthogonality. Key properties: conjugate symmetry, linearity, Cauchy-Schwarz inequality.

  • Orthonormality and bases: Orthonormal sets can always be extended to orthonormal bases. Unitary matrices have orthonormal rows and columns.

  • Projections and projective measurements: Projections are Hermitian idempotent matrices. Projective measurements generalize standard basis measurements and are defined by a set of projections summing to identity.

  • Global phase: States differing by a global phase are physically equivalent; can be ignored.

  • No-cloning theorem: Unknown quantum states cannot be copied perfectly.

  • Discrimination limitation: Two quantum states can be perfectly distinguished iff they are orthogonal.

These concepts prepare the ground for advanced topics in the next lesson: teleportation, superdense coding, and the CHSH game.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent