Learning Quantum
  • Project Scope and Purpose
  • Getting Started
    • Need to Know
    • Resources
  • Linear Algebra
    • Linear Algebra Summary
      • Math References
    • Basics
    • Vector Relationships
    • Span, Basis and Spaces
    • Transformations
  • Physics
    • Physics Summary
      • Physics References
    • Classical Mechanics
    • Quantum Mechanics
  • Qubits
    • Qubits Summary
      • Qubit References
    • Classical Bits
    • Quantum Bits
    • Multi-Qubit Systems
  • Quantum Circuits
    • Quantum Circuit Summary
      • Quantum Circuit References
    • Classical Models of Computation
    • Quantum Information
    • Single Qubit Gates
    • Multi-Qubit Gates
  • IBMQ
    • IBMQ Summary
    • Getting Access to IBM Quantum
    • IBMQ Tools
    • Using Quantum Gates - The Circuit Composer
  • Qiskit
    • Qiskit Overview
    • Installing Qiskit
    • Parts of a Qiskit Program
    • Writing a Qiskit Program
  • Supplementary
  • Quantum Safe Algorithms
Powered by GitBook
On this page
  • The Identity Gate
  • Pauli Gates
  • Pauli X
  • Pauli Y
  • Pauli Z
  • Hadamard Gate
  • Phase Gate
  • The T Gate
  • Reversibility
  • Reverse Phase Gate

Was this helpful?

  1. Quantum Circuits

Single Qubit Gates

Discussion some of simple single qubit gates

PreviousQuantum InformationNextMulti-Qubit Gates

Last updated 5 years ago

Was this helpful?

Over the course of this tutorial, we won't be able to go through all possible quantum gates. We will however take time to go through the most important ones, especially ones that we'll use when learning to code later on.

The Identity Gate

A very simple gate, which doesn't change anything at all. It preserves the state of the system as it is - it gives us the identity of the qubit.

I=[1001]I=\begin{bmatrix}1&0\\0&1\end{bmatrix}I=[10​01​]

Pauli Gates

Pauli X

The Pauli X gate is exactly the classical NOT gate as we described earlier:

And here is how the X gate will be represented on our circuit diagram:

We can track the result on the Bloch sphere:

Pauli Y

The Pauli Y gate is an interesting machine - we get the same result as the Pauli X gate, but instead of moving through real space we move through imaginary space instead.

Pauli Z

The Pauli Z gate changes the state of our qubit along the plane formed by the vectors represented by our two states. This means that no change will occur if we're fully in one state or the other - only if we're somewhere between the two.

Hadamard Gate

The Hadamard gate imposes the uniform superposition on our system. This gate is very important, because often we need to scramble our initial state before we can start computation. The Hadamard gate does this for us in a predictable way.

Phase Gate

The Phase gate is often referred to as the "Z90" gate or the "S" gate. We can see that it's half of our Z gate - instead of going half way around the Bloch sphere, we only go a quarter (a 90 degree turn).

The T Gate

Reversibility

That is to say that if you apply the Pauli X gate twice, for example, it undoes what it did. This makes intuitive sense when we look at the diagram. If we make a 180 degree turn the first time, we would make the same turn when we go the second time, resulting in ending up where we started.

Reverse Phase Gate

These gates work by changing the direction of the vector ∣ψ⟩|\psi\rangle∣ψ⟩ in either the xxx, yyy or zzz direction.

X=[0110]X = \begin{bmatrix}0&1\\1&0\end{bmatrix}X=[01​10​]
∣0⟩→∣1⟩,∣1⟩→∣0⟩|0\rangle \rightarrow |1\rangle, |1\rangle \rightarrow|0\rangle∣0⟩→∣1⟩,∣1⟩→∣0⟩
Y=[0−ii0]Y=\begin{bmatrix}0&-i\\i&0\end{bmatrix}Y=[0i​−i0​]
Z=[100−1]Z=\begin{bmatrix}1&0\\0&-1\end{bmatrix}Z=[10​0−1​]
H=12[111−1]H=\frac{1}{\sqrt{2}}\begin{bmatrix}1&1\\1&-1\end{bmatrix}H=2​1​[11​1−1​]
S=[100i]S=\begin{bmatrix}1&0\\0&i\end{bmatrix}S=[10​0i​]

The T gate preforms a 18\frac{1}{8}81​ turn on the sphere. It's a quarter of our Z gate, and half of our S gate. You might think that there's a relationship between the T gate and the S gate, and you'd be right - one S gate amounts two the T gate squared: S=T2S=T^2S=T2

T=[100exp(iπ4)]T=\begin{bmatrix}1&0\\0&exp(\frac{i\pi}{4})\end{bmatrix}T=[10​0exp(4iπ​)​]

This exp(a)exp(a)exp(a) notation just means to take the constant eeeto the power of whatever is in the brackets - i.e. eae^aea. You'll see this notation used often, so I've left it unconverted here for you.

We said before that all of our quantum gates need to be . For most of these gates (in fact all of them except the phase gate and T gate) they reverse themselves.

The phase gate requires an extra step - we need to do some math to it to find the matrix that reverses it's operations. We denote reverse matrices using the †\dagger† symbol, so this would be the S†S^\daggerS† gate.

S†=[100−i]S^\dagger = \begin{bmatrix}1&0\\0&-i\end{bmatrix}S†=[10​0−i​]
More about the Pauli matrices and where they come from
Symbol for the Identity gate
Symbol for the X gate
An animation showing the rotation of the X gate on the Bloch sphere
Symbol for the y gate
An animation showing the rotation of the Y gate on the Bloch sphere
Symbol for the Z gate
An animation showing the rotation of the Z gate on the Bloch sphere
Symbol for the Hadamard gate
An animation showing the rotation of the Hadamard gate on the Bloch sphere
Symbol for the phase gate
An animation showing the rotation of the phase gate on the Bloch sphere
Symbol for the T gate
An animation showing the rotation of the T gate on the Bloch sphere
Symbol for the reverse phase gate
An animation showing the rotation of the reverse phase gate on the Bloch sphere
reversible