Computer Science Grade 12 20 min

Quantum Gates: Hadamard, Pauli, and CNOT Gates

Learn about quantum gates, including Hadamard, Pauli, and CNOT gates, and how they manipulate qubits.

Tutorial Preview

1

Introduction & Learning Objectives

Learning Objectives Define a qubit and represent its state using a column vector. Represent the Hadamard, Pauli (X, Y, Z), and CNOT gates as matrices. Apply single-qubit gates to a qubit's state vector using matrix multiplication to determine the resulting state. Explain how the Hadamard gate creates a state of superposition. Describe the function of the two-qubit CNOT gate and its role in creating entanglement. Trace the state of a simple two-qubit system through a circuit involving H and CNOT gates to produce a Bell state. What if a computer bit could be both 0 and 1 at the same time? 🤯 Let's explore the fundamental logic gates that unlock this quantum power. This tutorial introduces the core building blocks of quantum circuits: the Hadamard, Pauli, and CNOT ga...
2

Key Concepts & Vocabulary

TermDefinitionExample Qubit (Quantum Bit)The fundamental unit of quantum information. Unlike a classical bit which is either 0 or 1, a qubit can exist in a state of superposition, being a combination of both |0⟩ and |1⟩ simultaneously.A qubit's state |ψ⟩ is represented as a vector: |ψ⟩ = α|0⟩ + β|1⟩, where α and β are complex numbers called probability amplitudes and |α|² + |β|² = 1. For example, |+⟩ = (1/√2)|0⟩ + (1/√2)|1⟩ is a qubit in a perfect superposition. State VectorA column vector in a 2-dimensional complex vector space that represents the state of a qubit. The basis states |0⟩ and |1⟩ are represented by orthogonal vectors.The state |0⟩ is represented by the vector [1, 0]ᵀ, and the state |1⟩ is represented by the vector [0, 1]ᵀ. Quantum GateA fundamental quantum circuit oper...
3

Core Syntax & Patterns

Single-Qubit Gate Application |ψ'⟩ = U |ψ⟩ To find the state of a qubit |ψ'⟩ after a gate U is applied, you perform matrix multiplication. The gate's matrix U is multiplied by the qubit's initial state vector |ψ⟩. The order of operations matters. Hadamard and Pauli Gate Matrices H = (1/√2)[[1, 1], [1, -1]] X = [[0, 1], [1, 0]] Y = [[0, -i], [i, 0]] Z = [[1, 0], [0, -1]] These are the matrix representations for the most common single-qubit gates. H creates superposition. X is a bit-flip (NOT). Z is a phase-flip. Y is both a bit-flip and a phase-flip. Controlled-NOT (CNOT) Gate Matrix CNOT = [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 0, 1], [0, 0, 1, 0]] This is a two-qubit gate. It flips the second qubit (target) if and only if the first qubit (control...

4 more steps in this tutorial

Sign up free to access the complete tutorial with worked examples and practice.

Sign Up Free to Continue

Sample Practice Questions

Easy
Which matrix correctly represents the Pauli-X gate, also known as the quantum NOT gate?
A.[[1, 0], [0, -1]]
B.[[0, 1], [1, 0]]
C.(1/√2)[[1, 1], [1, -1]]
D.[[0, -i], [i, 0]]
Easy
What is the primary function of the Hadamard (H) gate when applied to a basis state like |0⟩ or |1⟩?
A.To flip the phase of the qubit by 180 degrees.
B.To entangle the qubit with another qubit.
C.To create an equal superposition of the |0⟩ and |1⟩ states.
D.To perform a bit-flip, changing |0⟩ to |1⟩.
Easy
In the standard computational basis, what is the correct column vector representation for a qubit in the state |1⟩?
A.[1, 0]
B.[0, 1]
C.[(1/√2), (1/√2)]
D.[1, 1]

Want to practice and check your answers?

Sign up to access all questions with instant feedback, explanations, and progress tracking.

Start Practicing Free

More from Quantum Computing: Principles, Algorithms, and Applications

Ready to find your learning gaps?

Take a free diagnostic test and get a personalized learning plan in minutes.