Explore quantum hero banner

Explore quantum

Quantum circuits

A quantum circuit is a graphical way to represent a sequence of quantum gates and measurements used to perform a quantum computation. In a quantum circuit, single-qubit gates are typically represented as boxes with a text label indicating the type of gate. For example, the symbols below depict the Pauli Y and Pauli Z gates. 
 

Pauli Y gate and Z gates

An exception to the lettering system used for most single-qubit gates is the NOT gate (X gate), which is usually depicted as a circle with a cross inside, like this:
 

NOT gate

In a quantum circuit, time flows from left to right. In other words, quantum gates are ordered in chronological order. The left-most is the first gate applied to the qubits. In the diagram below, Gate A is performed first, then B then C. 
 

Quantum gates in chronological order

Next, we introduce some common types of multi-qubit operations, which are controlled operations where one qubit controls the operations performed on other qubits. Multi-qubit gates are usually denoted by a line connecting the different qubits. A black circle denotes the quantum bit on which the gate is controlled, and the appropriate gate notation is used to indicate the unitary that is applied when the control qubit takes the value |1⟩ .  For example, the diagrams below show a Controlled-NOT (CNOT) gate and a Controlled-Y gate. In both cases, the first qubit acts as the control and the operation will only be applied if the control qubit takes the value |1⟩.
 

Multi qubit operations CNOT and controlled-Y


Another common type of multi-qubit operation is a two-qubit SWAP gate which exchanges the state of two qubits. These unitaries are represented by a single box that covers all the appropriate set of qubits and are labeled by the unitary gate’s matrix.The circuit representation is show below:
 

Two qubit SWAP gate

Measurement is an important operation in quantum computing. Measurement takes a qubit register, measures it, and outputs the result as classical information. In a quantum circuit, the measurement operation is denoted by a meter symbol that always takes as input a qubit register (denoted by a solid line) and outputs classical information (denoted by a double line). Such a subcircuit looks like this: 

qcircuit measurement

Putting all this together, a circuit diagram with multiple gates and measurements may look like the diagram below. An annotated version of the circuit is provided next to the circuit diagram to help with interpretation.
 

circuit diagram with multiple gates

 

 

Suggested Topics

The qubit

Learn how qubits use the quantum-mechanical phenomena of superposition and entanglement to power quantum computations

Quantum math

Learn about the mathematics behind quantum computing, and how it is used to describe the behavior of qubits and quantum gates

Dirac notation

Learn about Dirac notation, also known as bra-ket notation, and how it is used to represent quantum states and operations

Entanglement

Learn how quantum entanglement is used to enable parallelism in quantum computers, unlocking simultaneous calculation