Curriculum / Quantum Foundations / Combining Gates

Lesson 5 of 17Code challengeFree+125 XP

Combining Gates

Chain multiple quantum gates together.

Combining Gates

Gate Sequences

Quantum circuits apply gates in sequence, left to right. The order matters! Let's explore what happens when we combine gates.

X then H

Applying X first flips |0⟩ to |1⟩, then H creates superposition of |1⟩: H|1⟩ = (|0⟩ - |1⟩)/√2

You still get 50/50 measurement results, but the underlying quantum state is different!

H then X

H|0⟩ = (|0⟩ + |1⟩)/√2, then X flips each component.

Your Challenge

Create a circuit with 1 qubit. Apply X then H, measure, and simulate. Verify you get roughly 50/50 results.

Up next

Next: phase gates. Meet the Z, S, and T gates, which change a state's phase without changing its measurement probabilities.

How this lesson works

A hands-on coding challenge. You write Qiskit-compatible Python in the browser editor, run it instantly via WebAssembly, watch the circuit and Bloch sphere react, and pass automatic output checks. The AI tutor Qubitus gives Socratic hints if you get stuck.

Part of: Quantum Foundations

Learn the basics: qubits, gates, superposition, and measurement.

Take this lesson free

Create a free account and start this lesson in your browser. No credit card, no installation.