Quantum Machine Learning Paradigms
Quantum Gates and Circuits
Gates, Rotations, and Circuits
In classical computing, logic gates like AND, OR, and NOT manipulate bits. Quantum computing has its own set of fundamental operations, called quantum gates. Instead of flipping bits from 0 to 1, these gates perform precise rotations on a qubit's state vector.
The most useful way to visualize the state of a single qubit is with the It's a 3D sphere where any point on the surface represents a possible pure state for a qubit. The north pole is typically designated as the state , and the south pole as . All other points on the sphere represent a superposition of these two states. A quantum gate's job is to move the state vector to a new point on the sphere.
The Rules of Transformation
Every quantum gate can be represented by a matrix. When a gate acts on a qubit, its matrix is multiplied by the qubit's state vector to find the new state. For a quantum operation to be valid, it must be reversible. This physical constraint means that all quantum gate matrices must be
A matrix is unitary if its conjugate transpose, , is also its inverse. This ensures that the total probability of the system remains 1 after the operation. In other words, the length of the state vector is always preserved.
Single-Qubit Rotations
The most fundamental gates for a single qubit are rotations around the x, y, and z axes of the Bloch sphere. For data scientists, these are analogous to applying a transformation or activation function to a single feature.
| Gate | Matrix Representation | Action on Bloch Sphere |
|---|---|---|
| Pauli-X | 180° rotation around the x-axis. Flips $ | |
| Pauli-Y | 180° rotation around the y-axis. | |
| Pauli-Z | 180° rotation around the z-axis. Leaves $ |
More general rotation gates, , , and , allow for rotations by any angle . These are the bread and butter of many quantum algorithms, providing the fine-tuned control needed to navigate the qubit's state space.
Gates That Entangle
Single-qubit gates are powerful, but they can't create entanglement. To do that, we need multi-qubit gates that make qubits interact. The most important of these is the Controlled-NOT, or gate.
A CNOT gate has two inputs: a control qubit and a target qubit. It performs a Pauli-X (or NOT) operation on the target qubit only if the control qubit is in the state . Otherwise, it does nothing to the target.
This conditional logic is how we create entanglement. Consider two qubits, both starting in the state. If we apply a Hadamard gate to the first (control) qubit to put it in superposition, and then apply a CNOT gate, the result is the famous Bell state—a maximally entangled pair.
Assembling the Circuit
Putting these gates together in a sequence creates a quantum circuit. This is the quantum equivalent of an algorithm or, for a data scientist, a model architecture. Two key metrics describe a circuit:
Circuit Width: The number of qubits used in the circuit.
Circuit Depth: The longest path of gates in the circuit, representing the number of time steps required for execution.
Just as a deep neural network has many layers, a deep quantum circuit has many sequential gates. Both width and depth are critical resources. Today's quantum computers are limited in both, making the design of shallow, narrow circuits a major challenge in the field.
By arranging these fundamental gates, we can construct algorithms that solve problems intractable for classical computers.

