Skip to content
aiqbenchAI & Quantum Intelligence
NewsInsightsBenchmarksSkillsAsk AILearnAbout
...Loading your session
NewsInsightsBenchmarksSkillsAsk AILearnAbout
  1. Future Jobs
  2. ›
  3. Quantum Software Developer
  4. ›
  5. Lesson 2 of 8

Quantum Circuits & Gates

Beginner¶ Read · 3 min⚑ Mission · 38 min◆ Test · 5 questions✓ Checked Nov 30, 2026

You'll be able to:

You can read a quantum circuit diagram, name the common single- and two-qubit gates (H, X, Y, Z, S, T, CNOT), and explain why arbitrary computations can be built from a small universal set.

A developer writing their first quantum program looks for the equivalent of an if-statement and does not find one. In the basic circuit model there are no branches, no loops over data, and no way to inspect an intermediate value without destroying the computation. The programming model is genuinely different, and the circuit is the whole of it.

Reading a circuit

A quantum circuit is drawn as horizontal wires, one per qubit, with time flowing left to right. Boxes on a wire are gates applied to that qubit; symbols spanning wires are multi-qubit gates. The diagram is the program, executed once per shot, and typically repeated many times because each run yields one probabilistic sample.

Every gate before measurement is reversible — it is a unitary operation, and running it backwards recovers the input. This is why there is no in-place deletion and no classical branching mid-circuit in the basic model: discarding information is not a reversible operation.

The gates worth knowing

H (Hadamard) creates superposition, mapping a definite 0 into an equal combination of 0 and 1. It appears at the start of most algorithms and again before measurement, where it converts phase differences into measurable amplitude differences — which is how interference becomes an observable result.

X, Y, Z are the Pauli gates. X is the quantum analogue of a classical NOT. Z leaves 0 alone and flips the sign of the 1 component, changing phase without changing measurement probabilities on its own. Y combines both.

S and T are finer phase rotations, applying quarter and eighth turns respectively. T is important out of proportion to its simplicity: it is the gate that makes a gate set universal, and it is also the most expensive to implement fault-tolerantly, which makes T-count a primary cost metric for real algorithms.

CNOT flips a target qubit conditional on a control qubit. It is the standard entangling gate, and entanglement is what any interesting multi-qubit computation requires.

Build a circuit from these gates and see what a measurement would give:

Lab

A circuit of up to five qubits

Gates, in order

  1. H on qubit 0
  2. CNOT: control 0, target 1

What a measurement gives

  • 0050%
  • 1150%

Qubit 0 is the left-most digit.

Runs in your browser. Nothing is sent or saved.

Why a small universal set suffices

A handful of gates — Clifford operations plus T, for instance — can approximate any unitary operation to arbitrary precision. The Solovay-Kitaev result guarantees this approximation is efficient, requiring only polylogarithmic overhead in the target precision.

The practical consequence is that hardware need only implement a small native gate set well, and compilers translate arbitrary algorithms into it. The insight that matters for cost estimation: this translation is not free, and the resource that dominates fault-tolerant cost is usually T-count, not total gate count. Two circuits of similar length can differ by orders of magnitude in real cost depending on how many T gates they require.

Failure modes

Classical control assumed — designs relying on mid-circuit branching. Signal: pseudocode with conditionals inside the quantum section.

Intermediate inspection — attempts to read state without collapsing it. Signal: an algorithm that checks a value and continues unchanged.

Gate count as cost — total gates used to estimate feasibility. Signal: a resource estimate that never mentions T-count.

Single-shot reasoning — expecting one execution to yield the answer. Signal: no repetition or sampling in the experimental design.

Explaining this to stakeholders

On the programming model: the program is a fixed sequence of reversible operations. You cannot look at a value partway through and take a different path, because looking destroys the computation.

On repetition: each run gives one sample from a distribution. We run it many times and read the pattern, closer to a physics experiment than to running a function.

On cost: not all gates cost the same. One particular gate type dominates the expense on error-corrected hardware, so we count those rather than counting operations.

Curated Materials

1.4h

The deep work happens here — the lesson is your briefing.

  • Qiskit: Construct circuitsDocs· 30 min
  • Cirq Tutorials: Introduction to Quantum Circuits (Google)Docs· 30 min
  • Microsoft Learn: Multiple-qubit Operations (Azure Quantum)Tutorial· 25 min

Live on aiqbench

This lesson's subject on the rest of the site, today.

In the news, last 30 days

  • Improved quantum algorithm for factoring integers with Jacobi symbolarXiv · Dec 4
  • Harness or Fine-Tuning? Execution-Verified Agents for Qiskit-to-CUDA-Q PortingarXiv · Dec 4
  • Classiq Partners with Carahsoft to Distribute Quantum Software Across U.S. Public Sector ContractsQuantum Computing Report · Dec 4
More news on this subject →

Go further

  • Quantum vendors comparedQubits, fidelities and roadmaps, each with its source.
  • Ask AI about this lessonOpens Ask AI with a question about this lesson, answered from the news archive with sources.

Test your knowledge

5 questions in 100 seconds, on a page of its own. Read everything above first.

Test your knowledge →

Module Mission

30–45 min

Write a 3-qubit circuit that transforms |000⟩ into an equal superposition over |000⟩ and |111⟩ (a GHZ state). Simulate it with Qiskit's Aer simulator and confirm the measurement distribution.

Loading your work…

← Previous lesson1. Qubits, Superposition & EntanglementNext lesson →3. Foundational Algorithms — Deutsch, Grover, QFT
aiqbench
AI & Quantum Intelligence© aiqbench. All rights reserved.

Feeds:RSS·JSON Feed

LanguageEnglish·Românăbeta
NewsAI & TechQuantumInsights
ExploreBenchmarksLearn
CompanyAboutTrustLegal noticeTerms of ServicePrivacy PolicyCopyright noticesData erasureReport content

The aiqbench take, the insights, the daily digest and Ask answers are written by AI models from the sources shown, without editorial review before publication. They may contain errors — check the source. How the model is used →

  • News
  • Insights
  • Ask AI
  • Benchmarks
  • Account