In classical computing, logic gates (like AND, OR, NOT) operate on bits that are strictly 0 or 1. Each gate applies a deterministic rule — for example, a NOT gate simply flips the bit:
0→1,1→0
In quantum computing, however, qubits are not restricted to being just 0 or 1. They can be in a superposition — a combination of both. Because of this, quantum operations must act in a fundamentally different way from classical logic.
Let’s explore how.
1. Qubits as Quantum States
A qubit’s general state can be expressed as:

But before measurement, the qubit can exist in any combination of the two — visualized as a point on the Bloch sphere.
2. The Bloch Sphere: Visualizing a Qubit
The Bloch sphere is a geometric representation of all possible states of a single qubit.
- The north pole represents ∣0⟩
- The south pole represents ∣1⟩
- Any point on the sphere’s surface represents a valid superposition of the two.
A qubit’s state can be described by two angles, θ and ϕ:

Thus, the qubit state corresponds to a vector pointing somewhere on the sphere — and quantum gates rotate this vector.
3. Quantum Gates as Rotations
Unlike classical logic gates, quantum gates do not change discrete values (0 or 1).
They instead perform rotations or transformations of the qubit’s state vector on the Bloch sphere.
Every quantum gate corresponds to a unitary matrix, U, which has the property:


Unitary operations ensure that probabilities remain normalized (the total probability = 1) — meaning quantum evolution is reversible.
4. Examples of Common Single-Qubit Gates
(a) Pauli-X Gate (Quantum NOT Gate)
Matrix:


Visualization:
- A rotation by 180° around the X-axis of the Bloch sphere.
This is the quantum equivalent of a classical NOT gate, but it can also flip components of superpositions — not just 0 or 1.
(b) Pauli-Y Gate
Matrix:

Effect:
- Rotates the qubit by 180° around the Y-axis on the Bloch sphere.
(c) Pauli-Z Gate
Matrix:

Effect:
- Flips the phase of the qubit: ∣1⟩ picks up a negative sign.
- Rotation by 180° around the Z-axis.
(d) Hadamard Gate (H)
Matrix:

Effect:
- Creates superposition from a basis state.
For example:

This corresponds to a rotation around an axis halfway between X and Z. Thus, Hadamard turns a definite state into an equal mixture of 0 and 1 — a key step in most quantum algorithms.
e) Rotation Gates
Quantum computing also allows arbitrary rotations around each axis:

These enable fine control of the qubit’s state — rotating it by any angle θ\thetaθ in 3D space.
5. Multi-Qubit Quantum Gates
When more than one qubit is involved, gates can entangle them — linking their states in ways impossible classically.
Example: CNOT (Controlled-NOT) Gate
Matrix:

Effect:
- If the control qubit = |1⟩, flip the target qubit.
- If the control qubit = |0⟩, do nothing.
Used to create entangled states, e.g. the Bell state

6. Why Quantum Gates Must Be Reversible
All unitary transformations (quantum gates) are reversible

This reversibility is a direct consequence of quantum mechanics — physical evolution of isolated systems must conserve probability.
Classical logic gates (like AND, OR) are not reversible because they lose information (you can’t always reconstruct the inputs from the output).
In quantum systems, losing information would violate physical laws — so every quantum gate is a rotation, not an irreversible mapping.
7. Intuitive Summary
| Classical Logic Gates | Quantum Gates |
|---|---|
| Change bits between 0 and 1 deterministically | Rotate qubit states continuously on the Bloch sphere |
| Non-reversible (information lost) | Reversible (unitary operations) |
| Operate on discrete values | Operate on complex amplitudes |
| Example: AND, OR, NOT | Example: X, Y, Z, H, CNOT, Rotation gates |
| Binary logic | Quantum mechanics & linear algebra |
8. Visualization Analogy
Imagine the qubit’s state as a tiny arrow (vector) inside a sphere.
- Classical gates can only flip the arrow up or down (0 or 1).
- Quantum gates can rotate the arrow to any point on the sphere — allowing a continuous range of superpositions and phases.
The position of this arrow determines the probabilities of measuring 0 or 1.
Quantum algorithms carefully design sequences of gates (rotations) to position the arrow such that, when measured, the desired result has the highest probability.


