Back to course

Matrix Multiplication & Quantum Gates

Quantum Computing Basics for Developers

Gates are Matrices

In classical computing, gates are logic circuits (AND, OR). In quantum computing, gates are Unitary Matrices.

To apply a gate to a qubit, we perform matrix-vector multiplication:

New_State = Gate_Matrix * Current_State_Vector

Because gates are unitary, they are reversible. This is a key difference from classical gates like AND, which lose information.