banner
kanes

kanes

Common Quantum Gates

In quantum bit experiments, gate operations are the foundation of quantum computing, similar to logic gates in classical computing, but they operate on the superposition and entangled states of quantum bits. Quantum gates are represented by unitary matrices, characterized by their reversibility, meaning that the input state can be derived from the output state.

Common quantum gate operations can be divided into two main categories: single-qubit gates and multi-qubit gates.

1. Single-Qubit Gates#

These gates operate on a single quantum bit, equivalent to rotating the state vector of the quantum bit on the Bloch Sphere. The Bloch Sphere is a unit sphere where points on its surface represent all possible pure states of a single quantum bit. The $|0\rangle$ state is typically located at the north pole, while the $|1\rangle$ state is at the south pole.

  1. Hadamard (H) Gate

    • Function: Converts the basis state (such as $|0\rangle$ or $|1\rangle$) into an equal probability superposition state.

      • $H|0\rangle = \frac{1}{\sqrt{2}}(|0\rangle + |1\rangle)$
      • $H|1\rangle = \frac{1}{\sqrt{2}}(|0\rangle - |1\rangle)$
    • Matrix Representation:

      H=12(1111)H = \frac{1}{\sqrt{2}} \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}

    • Effect on the Bloch Sphere: Rotates the state on the Z-axis ($|0\rangle$ or $|1\rangle$) to the X-axis, or rotates the state on the X-axis to the Z-axis. It corresponds to a rotation of $\pi$ radians around the average axis of the X and Z axes (i.e., a specific axis in the X-Z plane).

    • Importance: The H gate is a key gate for creating quantum superposition states and serves as the starting point for quantum algorithms (such as Grover's search algorithm and Shor's factoring algorithm) because it allows quantum bits to explore multiple possibilities simultaneously.

  2. Pauli-X (X) Gate / NOT Gate

    • Function: Flips the basis state of the quantum bit, similar to the NOT gate in classical computers.

      • $X|0\rangle = |1\rangle$
      • $X|1\rangle = |0\rangle$
    • Matrix Representation:

      X=(0110)X = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}

    • Effect on the Bloch Sphere: Rotates $\pi$ radians around the X-axis.

    • Importance: Used to change the computational basis state of the quantum bit.

  3. Pauli-Y (Y) Gate

    • Function: Flips the basis state of the quantum bit and introduces a global phase factor of $i$ or $-i$.
      • $Y|0\rangle = i|1\rangle$
      • $Y|1\rangle = -i|0\rangle$
    • Matrix Representation:
      Y=(0ii0)Y = \begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix}
    • Effect on the Bloch Sphere: Rotates $\pi$ radians around the Y-axis.
    • Importance: Although it introduces a phase, the probability remains unchanged during measurement; it mainly plays a role in certain quantum algorithms that require specific phase rotations.
  4. Pauli-Z (Z) Gate

    • Function: Introduces a $\pi$ phase to the $|1\rangle$ state without changing the measurement probabilities of the basis states.

      • $Z|0\rangle = |0\rangle$
      • $Z|1\rangle = -|1\rangle$
    • Matrix Representation:

      Z=(1001)Z = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}

    • Effect on the Bloch Sphere: Rotates $\pi$ radians around the Z-axis.

    • Importance: The Z gate changes the relative phase of the quantum bit, which is crucial for constructing entangled states and performing interference operations.

  5. T Gate (Phase Shift Gate P($\pi/4$))

    • Function: Introduces a phase of $\pi/4$ to the $|1\rangle$ state.

      • $T|0\rangle = |0\rangle$
      • $T|1\rangle = e^{i\pi/4}|1\rangle$
    • Matrix Representation:

      T=(100eiπ/4)T = \begin{pmatrix} 1 & 0 \\ 0 & e^{i\pi/4} \end{pmatrix}

    • Effect on the Bloch Sphere: Rotates $\pi/4$ radians around the Z-axis.

    • Importance: The T gate (and more generally, phase gates) are key to implementing "non-Clifford" operations, enabling quantum computers to perform arbitrarily complex unitary transformations.

  6. S Gate (Phase Shift Gate P($\pi/2$))

    • Function: Introduces a phase of $\pi/2$ to the $|1\rangle$ state.

      • $S|0\rangle = |0\rangle$
      • $S|1\rangle = i|1\rangle$
    • Matrix Representation:

      S=(100i)S = \begin{pmatrix} 1 & 0 \\ 0 & i \end{pmatrix}

    • Effect on the Bloch Sphere: Rotates $\pi/2$ radians around the Z-axis.

    • Importance: The S gate is the square of the T gate ($S = T^2$) and is also a non-Clifford gate used for achieving finer phase control.

  7. Rx, Ry, Rz Gates (Rotation Gates)

    • Function: These are universal rotation gates that can rotate around the X, Y, or Z axes of the Bloch Sphere by any angle $\theta$.
      • $R_x(\theta)$: Rotates $\theta$ radians around the X-axis.

        Rx(θ)=(cos(θ/2)isin(θ/2)isin(θ/2)cos(θ/2))R_x(\theta) = \begin{pmatrix} \cos(\theta/2) & -i\sin(\theta/2) \\ -i\sin(\theta/2) & \cos(\theta/2) \end{pmatrix}

      • $R_y(\theta)$: Rotates $\theta$ radians around the Y-axis.

        Ry(θ)=(cos(θ/2)sin(θ/2)sin(θ/2)cos(θ/2))R_y(\theta) = \begin{pmatrix} \cos(\theta/2) & -\sin(\theta/2) \\ \sin(\theta/2) & \cos(\theta/2) \end{pmatrix}

      • $R_z(\theta)$: Rotates $\theta$ radians around the Z-axis.

        Rz(θ)=(eiθ/200eiθ/2)R_z(\theta) = \begin{pmatrix} e^{-i\theta/2} & 0 \\ 0 & e^{i\theta/2} \end{pmatrix}

    • Importance: They provide fine control over the state of the quantum bit and can implement any single-qubit unitary transformation. All single-qubit gates can be approximated or exactly represented by combinations of these rotation gates.
  8. U1, U2, U3 Gates (Universal Single-Qubit Gates)

    • Function: A set of more general single-qubit gates that can represent any single-qubit unitary transformation parameterized by three Euler angles. U3 is the most general, while U1 and U2 are its simplified forms.
    • Importance: They can theoretically generate a mathematical representation of any single-qubit operation.

2. Multi-Qubit Gates#

These gates operate on two or more quantum bits and are central to achieving quantum entanglement and complex quantum algorithms.

  1. CNOT (Controlled-NOT / CX) Gate

    • Function: Has one control bit and one target bit. The target bit performs the NOT operation (i.e., flips) only when the control bit is in the $|1\rangle$ state.

      • $|00\rangle \to |00\rangle$
      • $|01\rangle \to |01\rangle$
      • $|10\rangle \to |11\rangle$
      • $|11\rangle \to |10\rangle$
    • Matrix Representation:

      CNOT=(1000010000010010)CNOT = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \end{pmatrix}

      (Assuming the arrangement of quantum bits is $|q_1 q_0\rangle$, where $q_1$ is the control bit and $q_0$ is the target bit)

    • Importance: The CNOT gate is one of the most important two-qubit gates in quantum computing because it can generate quantum entanglement. Entanglement is the basis for many quantum algorithms (such as quantum teleportation and quantum key distribution).

  2. CZ (Controlled-Z) Gate

    • Function: Has one control bit and one target bit. The target bit introduces a $\pi$ phase (Z operation) only when both quantum bits are in the $|1\rangle$ state.

      • $|00\rangle \to |00\rangle$
      • $|01\rangle \to |01\rangle$
      • $|10\rangle \to |10\rangle$
      • $|11\rangle \to -|11\rangle$
    • Matrix Representation:

      CZ=(1000010000100001)CZ = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & -1 \end{pmatrix}

    • Importance: The CZ gate can also generate entanglement and may be easier to implement than the CNOT gate in certain physical realizations. The CNOT and CZ gates can be converted into each other through combinations of single-qubit gates.

  3. SWAP Gate

    • Function: Exchanges the states of two quantum bits.

      • $|00\rangle \to |00\rangle$
      • $|01\rangle \to |10\rangle$
      • $|10\rangle \to |01\rangle$
      • $|11\rangle \to |11\rangle$
    • Matrix Representation:

      SWAP=(1000001001000001)SWAP = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \end{pmatrix}

    • Importance: In physical hardware, since quantum bits can typically only be operated on directly if they are adjacent, the SWAP gate is very useful for "moving" distant quantum bits to positions where they can interact. It can be implemented through a sequence of three CNOT gates.

  4. Toffoli (CCNOT / CCX) Gate

    • Function: A three-qubit gate with two control bits and one target bit. It performs the NOT operation on the target bit only when both control bits are in the $|1\rangle$ state.
    • Importance: The Toffoli gate is a classical universal logic gate that can construct any classical Boolean function. In quantum computing, the Toffoli gate, along with the Hadamard gate, forms a universal set of quantum gates that can be used to approximate any quantum algorithm.

3. Universal Quantum Gate Sets#

Similar to classical computing, there exist some "universal" sets of quantum gates, meaning that any complex quantum algorithm can be approximated by a finite sequence of these basic gates. Common universal quantum gate sets include:

  • {H, CNOT, Rz($\theta$)}: Hadamard gate, controlled-NOT gate, and arbitrary Z-axis rotation gate.
  • {H, CNOT, T}: Hadamard gate, controlled-NOT gate, and T gate. The T gate is a special form of $R_z(\pi/4)$.
  • {Toffoli, Hadamard}: Toffoli gate and Hadamard gate.

4. Physical Implementation of Gates#

In actual quantum computing experiments, gate operations are implemented by precisely controlling the physical properties of quantum bits, such as:

  • Ion Trap Systems: Implementing quantum gates by precisely manipulating the electronic energy levels of ions trapped by electromagnetic fields using laser pulses.
  • Superconducting Qubits: Manipulating the energy states of quantum bits in superconducting circuits using microwave pulses.
  • Photon Systems: Implementing quantum gates by manipulating properties of photons such as polarization, frequency, or path.

This article is synchronized and updated by Mix Space to xLog. The original link is https://blog.kanes.top/posts/default/QubitGates

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.