# Rx Gate

The Rx gate is one of the Rotation operators. The Rx gate is a single-qubit rotation through angle $\theta$ (radians) around the x-axis.

$\ R_x\left ( \theta \right ) = \begin{pmatrix} \cos \left ( \frac{\theta}{2} \right ) & -i \sin \left ( \frac{\theta}{2} \right) \ -i \sin \left ( \frac{\theta}{2} \right) & \cos \left ( \frac{\theta}{2} \right ) \end{pmatrix}$

The angle of rotation must be specified in radians and can be positive or negative.

        
version 1.0
qubits 2
H q[0] # execute Hadamard gate on qubit 0
Rx q[0],-1.12  # rotation of -1.12 radians on qubit 0