Skip to main content

S Gate

Definition

The S gate is a single-qubit gate that rotates the qubit state by 90 degrees around the ZZ of the Bloch sphere. The relationship between the S gate and the Pauli-Z gate is similar to the relationship between the T gate and the PauliZ\sqrt{Pauli-Z} gate. The S gate is also known as the Z\sqrt{Z} gate. It is also called as Clifford gate or π2\frac{\pi}{2}-gate.

Effect on qubit

The S gate changes the phase of the qubit by 90 degrees. The S gate changes the phase of the qubit from +1+1 to ii and vice versa, where ii is the imaginary unit. (Note that i=eiπ/2i = e^{i\pi/2}) [An exact behaviour of T gate, just the difference in the phase change]

Types

The S gate has only one type.

Matrix representation

The matrix representation of the S gate is:

  • S gate: [100i]\begin{bmatrix} 1 & 0 \\ 0 & i \end{bmatrix}

The matrix can also be represented as [100eiπ/2]\begin{bmatrix} 1 & 0 \\ 0 & e^{i\pi/2} \end{bmatrix}

where ii is equal to eiπ/2e^{i\pi/2}.

Circuit representation

The S gate is represented as ───S─── in the circuit.

Example

Let's take an example to demonstrate the S gate.

  • S Gate Suppose we have a qubit initially in the state 0|0\rangle, represented as:
q0=0(1)|q_0\rangle = |0\rangle \tag{1}

The S gate is represented by the following matrix:

S=[100i](2)S = \begin{bmatrix} 1 & 0 \\ 0 & i \end{bmatrix} \tag{2}

To apply the S gate to the qubit q0=0|q_0\rangle = |0\rangle, we perform a matrix multiplication of the S gate matrix with the state vector representing 0|0\rangle.

Sq0=[100i][10](3)S|q_0\rangle = \begin{bmatrix} 1 & 0 \\ 0 & i \end{bmatrix} \begin{bmatrix} 1 \\ 0 \end{bmatrix} \tag{3}

Performing the matrix multiplication:

Sq0=[11+0001+i0](4)S|q_0\rangle = \begin{bmatrix} 1*1 + 0*0 \\ 0*1 + i*0 \end{bmatrix} \tag{4}

Simplifying:

Sq0=[10](5)S|q_0\rangle = \begin{bmatrix} 1 \\ 0 \end{bmatrix} \tag{5}

Thus, the S gate does not change the state of the qubit 0|0\rangle.

It does not affect the state of the qubit 0|0\rangle as the phase of the qubit is already +1+1. So, the S gate does not introduce any phase change to the qubit 0|0\rangle. Instead, it introduces a phase of 9090 degrees to the qubit 1|1\rangle.

Therefore, after applying the S gate, the state of the qubit q0|q_0\rangle remains unchanged, indicating that the S gate only changes the phase of the qubit.

Now, let's see the effect of the S gate on the qubit 1|1\rangle.

Suppose we have a qubit initially in the state 1|1\rangle, represented as:

q1=1(6)|q_1\rangle = |1\rangle \tag{6}

To apply the S gate to the qubit q1=1|q_1\rangle = |1\rangle, we perform a matrix multiplication of the S gate matrix with the state vector representing 1|1\rangle.

Sq1=[100i][01](7)S|q_1\rangle = \begin{bmatrix} 1 & 0 \\ 0 & i \end{bmatrix} \begin{bmatrix} 0 \\ 1 \end{bmatrix} \tag{7}

Performing the matrix multiplication:

Sq1=[10+0100+i1](8)S|q_1\rangle = \begin{bmatrix} 1*0 + 0*1 \\ 0*0 + i*1 \end{bmatrix} \tag{8}

Simplifying:

Sq1=[0i](9)S|q_1\rangle = \begin{bmatrix} 0 \\ i \end{bmatrix} \tag{9}

Thus, the S gate changes the state of the qubit 1|1\rangle to i1i|1\rangle.

Therefore, the S gate introduces a phase of 9090 degrees to the qubit 1|1\rangle.

Hence, the S gate changes the phase of the qubit by 90 degrees.

The S gate is used in various quantum algorithms and quantum circuits to introduce phase changes to the qubits.

Properties

This gate has exact same properties as the T gate ie. S2=ZS^2 = Z and S0=0S|0\rangle = |0\rangle and S1=i1S|1\rangle = i|1\rangle.

Conjugate Transpose

The conjugate transpose of the S gate is:

  • S=[100i]S^{\dagger} = \begin{bmatrix} 1 & 0 \\ 0 & -i \end{bmatrix}

Inverse

The inverse of the S gate is:

  • S1=[100i]S^{-1} = \begin{bmatrix} 1 & 0 \\ 0 & -i \end{bmatrix}

Dagger

The dagger of the S gate is:

  • S=[100i]S^{\dagger} = \begin{bmatrix} 1 & 0 \\ 0 & -i \end{bmatrix}