9.2 From gates to circuits
A quantum register is a collection of qubits we use for computation. We number the qubits in the register with labels such as q0, q1, …, q–n or q1, q2, …, qn. The quantum system initializes all qubits in a register to state |0⟩. quantum$register circuit$quantum quantum$circuit
A quantum circuit is a sequence of gates applied to one or more qubits in a quantum register.
In some algorithms, we group qubits into one or more labeled registers to better delineate their roles. It’s common to have an upper register and a lower register, for example. upper register lower register register$upper register$lower
Let’s look at some simple example circuits to see how we put them together and what we call their components.
9.2.1 Constructing a circuit
The simplest circuit is
We give qubit q0 the initial state |0⟩, but then...