Hadamard, Pauli and CNOT Gates With Tiny Worked Examples

Updated | 4 min read | QUANTUM (QNT) community

Gates are small, reversible moves

A gate is an operation on one or more qubits. Unlike many classical operations, every quantum gate can be undone. On one qubit, a gate is a rotation of the Bloch sphere. This page works through the gates you will see in nearly every textbook circuit. For the big picture, see gates and circuits. Here we do the arithmetic, and it stays small.

Notation: a state is written as a list of amplitudes. The state 0 is (1, 0), meaning amplitude 1 for result 0 and amplitude 0 for result 1. The state 1 is (0, 1). A blend is (a, b), where the squared sizes give the odds, as in the Born rule.

Pauli X: the bit flip

X swaps the two amplitudes. Start with 0 = (1, 0). After X you get (0, 1), which is 1. Apply X to 1 and you get 0. It is the quantum version of the classical NOT gate. On the Bloch sphere it is a half turn around the horizontal axis that sends north pole to south pole.

Pauli Z: the phase flip

Z leaves the 0 amplitude alone and flips the sign of the 1 amplitude. Applied to 0 = (1, 0), nothing changes. Applied to 1 = (0, 1), you get (0, minus 1). The odds are identical, since the sign vanishes when squared. So Z seems to do nothing, until the state is a blend. Try the plus blend, (0.707, 0.707). After Z you get (0.707, minus 0.707), the minus blend. These two blends look the same in the 0/1 measurement but are different states. Z is a rotation about the vertical axis, a half turn around the globe.

Pauli Y: both, with a twist

Y is a bit flip combined with a phase flip, up to an overall factor involving the imaginary number i. Applied to 0 it gives a 1 with a factor of i. In odds it behaves like X, but it rotates around the third axis. The three Paulis, X, Y and Z, are half-turns around the three axes of the globe, and they appear everywhere in error correction, because any single-qubit error can be described as a mix of them.

Hadamard: the blend maker

The Hadamard gate (H) maps 0 to the even blend with equal signs, and 1 to the even blend with opposite signs:

Here is the worked example that explains why interference matters. Apply H to 0, getting the plus blend. Apply H a second time. The first term gives (0.5, 0.5) and the second gives (0.5, minus 0.5), and they add to (1, 0). You are back at 0 with certainty. The two routes to 1 canceled out. That cancellation is interference, and it is the whole engine behind how quantum algorithms get useful answers. On the globe, H sends the north pole to the equator, and doing it twice returns you to the start.

CNOT: the conditional flip

CNOT works on two qubits: a control and a target. It flips the target only when the control is 1. In shorthand, writing control first:

On definite inputs it acts like a classical gate. On blends, it does something new.

Making an entangled pair

Start with both qubits at 0, that is 00. Step one, apply H to the first qubit, giving an even blend of 00 and 10 (amplitude 0.707 each). Step two, apply CNOT with the first qubit as control. The 00 part stays 00, and the 10 part becomes 11. The result is an even blend of 00 and 11. This is a Bell state. Measure either qubit and you get 0 or 1 at random, but the second always agrees with the first. Neither qubit has a definite value on its own, which is the heart of entanglement, and these are the states used in the Bell tests and in teleportation.

Why this small set matters

H, a phase gate, and CNOT together can build any quantum operation to as much accuracy as you like, with the addition of a gate called T for universality. Real devices compile big programs into these basics, a process described in how a quantum program runs. Two-qubit gates like CNOT are usually the hardest and noisiest, which is why their error rates are watched so closely (see decoherence and noise).

Common misunderstandings

Sources and further reading

Standard textbook physics, reported as of 2026-10-09. Nothing here is financial advice. The QNT memecoin is independent of Quantinuum Ltd, the real company, and of every lab, university and prize body named on this page.

Frequently asked questions

What does the Hadamard gate do?

It turns a definite 0 or 1 into an even blend of both, and applying it twice returns the original state.

What is the difference between X, Y and Z?

X flips 0 and 1, Z flips the sign of the 1 amplitude, and Y does both with a twist. They are half turns around the three axes of the Bloch sphere.

How do you make an entangled pair?

Apply a Hadamard to the first qubit, then a CNOT with that qubit as control and the other as target, starting from 00.

Is CNOT the same as a classical XOR?

On definite inputs, the target becomes the XOR of control and target. On blended inputs it can create entanglement, which classical XOR cannot.

Share on X

Keep reading

All Quantum computing guides | Back to top | Search the site

Main pages: Quantum computing explained | Quantum and crypto | Companies | Quantum news | Glossary

QUANTUM (QNT) is the quantum sector memecoin on Solana. See the live chart, buys and burnt supply or read the token facts. Questions? Join the Telegram.