Reference : (cannot access in Mainland China)

IBM Quantum Platform Library

Quantum Coding Site : (cannot access in Mainland China)

QCoder

clash link


HGate(*args[, _force_mutable])

Single-qubit Hadamard gate.

h()

$$H=\frac{1}{\sqrt{2}} \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}$$
     ┌───┐
q_0: ┤ H ├
     └───┘

IGate(*args[, _force_mutable])

Identity gate.

id()

I=(1001)I= \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}
     ┌───┐
q_0: ┤ I ├
     └───┘

PhaseGate(theta[, label])

Single-qubit rotation about the Z axis.

p()

$$P(\theta)= \begin{pmatrix} 1 & 0 \\ 0 & e^{i\theta} \end{pmatrix}$$
     ┌──────┐
q_0: ┤ P(θ) ├
     └──────┘

RGate(theta, phi[, label])

Rotation θ\theta around the cos(ϕ)x+sin(ϕ)y\cos(\phi)x+\sin(\phi)y axis.

r()

$$R(\theta,\phi)=e^{-i\frac{\theta}{2}(\cos\phi x+\sin\phi y)}= \begin{pmatrix} \cos(\frac{\theta}{2}) & -ie^{-i\phi}\sin(\frac{\theta}{2}) \\ -ie^{i\phi}\sin(\frac{\theta}{2}) & \cos(\frac{\theta}{2}) \end{pmatrix}$$
       ┌────────┐
q_0:   ┤ R(θ,φ) ├
       └────────┘

RXGate(theta[, label])

Single-qubit rotation about the X axis.

rx()

$$RX(\theta)=\exp(-i\frac{\theta}{2}X)= \begin{pmatrix} \cos(\frac{\theta}{2}) & -i\sin(\frac{\theta}{2}) \\ -i\sin(\frac{\theta}{2}) & \cos(\frac{\theta}{2}) \end{pmatrix}$$
     ┌───────┐
q_0: ┤ Rx(ϴ) ├
     └───────┘

RYGate(theta[, label])

Single-qubit rotation about the Y axis.

ry()

$$RX(\theta)=\exp(-i\frac{\theta}{2}Y)= \begin{pmatrix} \cos(\frac{\theta}{2}) & -\sin(\frac{\theta}{2}) \\ \sin(\frac{\theta}{2}) & \cos(\frac{\theta}{2}) \end{pmatrix}$$
     ┌───────┐
q_0: ┤ Ry(ϴ) ├
     └───────┘

RZGate(theta[, label])

Single-qubit rotation about the X axis.

rz()

$$RX(\phi)=\exp(-i\frac{\phi}{2}Z)= \begin{pmatrix} e^{-i\frac{\phi}{2}} & 0 \\ 0 & e^{i\frac{\phi}{2}} \end{pmatrix}$$
     ┌───────┐
q_0: ┤ Rz(φ) ├
     └───────┘