Search

List of quantum gates

Overview

Many ideas in quantum computing rely on a small set of standard qubit states and gates. This page summarizes the one- and two-qubit basis states and the quantum gates that act on them.

The following list can also be downloaded as pdf.

One- and two-qubit basis states

One-qubit basis states (ket and vector notation)

| 0 = ( 1 0 ) | + = 1 2 ( | 0 + | 1 ) = ( 1 2 1 2 )

and

| 1 = ( 0 1 ) | = 1 2 ( | 0 | 1 ) = ( 1 2 1 2 )

Two-qubit basis states

 

| 00 = ( 1 0 0 0 ) | 01 = ( 0 1 0 0 ) | 10 = ( 0 0 1 0 ) | 11 = ( 0 0 0 1 )

 

Quantum gates

Matrix symbol:  I

Circuit symbol:

Matrix representation for one qubit

( 1 0 0 1 )

 

Matrix representation for two qubits

( 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 )

What it does

It leaves the qubit(s) unchanged

Example of the quantum gate being applied to one or two qubits

( 10 01 ) ( 1 0 ) = ( 1 0 )

I | 0 = | 0

Matrix symbol:  X

Circuit symbol:

Matrix representation for one qubit

( 0 1 1 0 )

Matrix representation for two qubits

( 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 )

What it does

It flips the two qubit states. This gate is also called bit flip.

Example of the quantum gate being applied to one or two qubits

( 0 1 1 0 ) ( 1 0 ) = ( 0 1 )

( 0 1 1 0 ) ( 0 1 ) = ( 1 0 )

X | 0 = | 1 and X | 1 = | 0

( 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 ) | 00 = | 11

Matrix symbol:  Z

Circuit symbol:

Matrix representation for one qubit

( 1 0 0 -1 )

Matrix representation for two qubits

( 1 0 0 00 -1 0 00 0 -1 00 0 0 1)

What it does

Changes the sign of the | 1 state resp. the | 01 and | 10 states; corresponds to a phase flip.

Example of the quantum gate being applied to one or two qubits

( 1 00 -1) ( 10) = ( 10)

( 1 00 -1) ( 01) = ( 0-1)

Z | 0 = | 0 and Z | 1 = -| 1

Matrix symbol:  Y

Circuit symbol:

Matrix representation for one qubit

( 0 i i 0 )

What it does

Combination of X and Z gate – it flips the qubit state and the phase.

Example of the quantum gate being applied to one or two qubits

( 0 i i 0 ) ( 1 0 ) = i ( 0 1 )

( 0 i i 0 ) ( 0 1 ) = i ( 1 0 )

Y | 0 = i | 1 and Y | 0 = i | 1

Matrix symbol:  C N O T

Circuit symbol:

Matrix representation for one qubit

--

Matrix representation for two qubits

( 1 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 )

What it does

Flips the second qubit (the target qubit) if and only if the first qubit (the control qubit) is |1
It leaves the first qubit (the control qubit) unchanged.

Example of the quantum gate being applied to one or two qubits

( 1 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 ) ( 0 0 1 0 ) = ( 0 0 0 1 )

C N O T | 00 = | 00

C N O T | 10 = | 11

Matrix symbol:  H

Circuit symbol:

Matrix representation for one qubit

1 2 ( 1 1 1 1 )

Matrix representation for two qubits

1 2 ( 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 )

What it does

Creates an equal superposition state of a qubit.

Example of the quantum gate being applied to one or two qubits

1 2 ( 1 1 1 1 ) ( 1 0 ) = 1 2 ( 1 1 ) = 1 2 ( ( 1 0 ) + ( 0 1 ) )

H | 0 = 1 2 ( | 0 + | 1 )

H | 1 = 1 2 ( | 0 - | 1 )

Matrix symbol:  S W A P

Circuit symbol:

Matrix representation for one qubit

--

Matrix representation for two qubits

( 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 )

What it does

Swaps the states of two qubits.

Example of the quantum gate being applied to one or two qubits

( 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 ) ( 0 1 0 0 ) = ( 0 0 1 0 )

S W A P | 10 = | 01

S W A P | 01 = | 10

How to go from a 2x2-matrix (1 qubit) to a 4x4-matrix (2 qubits)

X X = ( 0 1 1 0 ) ( 0 1 1 0 ) = ( 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 )

H H = 1 2 ( 1 1 1 1 ) 1 2 ( 1 1 1 1 ) = 1 2 ( 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 )

| 00 = | 0 | 0 = ( 1 0 ) ( 1 0 ) = ( 1 0 0 0 ) | 11 = | 1 | 1 = ( 0 1 ) ( 0 1 ) = ( 0 0 0 1 )

| 01 = | 0 | 1 = ( 1 0 ) ( 0 1 ) = ( 0 1 0 0 ) | 10 = | 1 | 0 = ( 0 1 ) ( 1 0 ) = ( 0 0 1 0 )

 

  1. Images "Identity", "Pauli X (NOT)" and "Pauli Z" circuit symbol: By Geek3 - Own work, CC BY 3.0

Close search