<jupyter_start><jupyter_text>Definition of all avalaible gates In the following table, we list and give the definition of all available gates on the QLM.<table     align="center"     style="width:100% ;   border: 1px solid black" >                Gate name    pyAQASM name     qubits      Matrix        Hadamard    H    1    $ \begin{vmatrix} \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}}  \\ \frac{1}{\sqrt{2}}  & -\frac{1}{\sqrt{2}}  \\ \end{vmatrix}$            Pauli X    X    1    $ \begin{vmatrix}  0 & 1  \\  1 & 0 \\ \end{vmatrix}$            Pauli Y     Y    1    $ \begin{vmatrix}  0 & -i  \\  i & 0 \\ \end{vmatrix}$            Pauli Z     Z    1    $ \begin{vmatrix}  1 & 0  \\  0 & -1 \\ \end{vmatrix}$         Identity    I    1    $ \begin{vmatrix}  1 & 0  \\  0 & 1 \\ \end{vmatrix}$         Phase Shift     PH($\theta$)    1    $\forall \theta \in\rm I\!R$: $\begin{vmatrix}  1 & 0  \\  0 & e^{i\theta} \\ \end{vmatrix}$         Phase Shift gate of $\frac{\pi}{2}$     S    1     	$ \begin{vmatrix}  1 & 0  \\  0 & i \\ \end{vmatrix}$         Phase Shift gate of $\frac{\pi}{4}$    T    1     	$ \begin{vmatrix}  1 & 0  \\  0 & e^{i\frac{\pi}{4}} \\ \end{vmatrix}$         X Rotation     RX($\theta$)    1     $\forall \theta \in\rm I\!R$: $\begin{vmatrix}  \cos(\frac{\theta}{2}) & -i\sin(\frac{\theta}{2})  ~\\  -i\sin(\frac{\theta}{2}) & \cos(\frac{\theta}{2}) \\ \end{vmatrix}$         Y Rotation     RY($\theta$)	    1     $\forall \theta \in\rm I\!R$: $\begin{vmatrix}  \cos(\frac{\theta}{2}) & -\sin(\frac{\theta}{2})  ~\\  \sin(\frac{\theta}{2}) & \cos(\frac{\theta}{2}) \\ \end{vmatrix}$         Z Rotation	     RZ($\theta$)	    1     $\forall \theta \in\rm I\!R$: $\begin{vmatrix}  e^{-i\frac{\theta}{2}} & 0  \\  0 & e^{i\frac{\theta}{2}} \\ \end{vmatrix}$         Controlled NOT    CNOT	    2     $\begin{vmatrix}  1 & 0 & 0 & 0  \\  0 & 1 & 0 & 0  \\  0 & 0 & 0 & 1  \\  0 & 0 & 1 & 0  \\ \end{vmatrix}$           SWAP	     SWAP	    2     $\begin{vmatrix}  1 & 0 & 0 & 0  \\  0 & 0 & 1 & 0  \\  0 & 1 & 0 & 0  \\  0 & 0 & 0 & 1  \\ \end{vmatrix}$           iSWAP	     ISWAP	    2     $\begin{vmatrix}  1 & 0 & 0 & 0  \\  0 & 0 & i & 0  \\  0 & i & 0 & 0  \\  0 & 0 & 0 & 1  \\ \end{vmatrix}$           $\sqrt{\text{SWAP}}$	     SQRTSWAP	    2     $\begin{vmatrix}  1 & 0 & 0 & 0  \\  0 & \frac{1}{2}(1 + i) & \frac{1}{2}(1 - i) & 0  \\  0 & \frac{1}{2}(1 - i) & \frac{1}{2}(1 + i) & 0  \\  0 & 0 & 0 & 1  \\ \end{vmatrix}$        Toffoli    CCNOT	    3     $\begin{vmatrix}  1 & 0 & 0 & 0 & 0 & 0 & 0 & 0  \\  0 & 1 & 0 & 0 & 0 & 0 & 0 & 0   \\  0 & 0 & 1 & 0 & 0 & 0 & 0 & 0   \\  0 & 0 & 0 & 1 & 0 & 0 & 0 & 0   \\  0 & 0 & 0 & 0 & 1 & 0 & 0 & 0  \\  0 & 0 & 0 & 0 & 0 & 1 & 0 & 0   \\  0 & 0 & 0 & 0 & 0 & 0 & 0 & 1  \\  0 & 0 & 0 & 0 & 0 & 0 & 1 & 0   \\ \end{vmatrix}$    Short exampleHere is a short example to illustrate the creation of a quantum program with all those gates:<jupyter_code>from qat.lang.AQASM import Program, H, X, Y, Z, I, PH, S, T, RX, RY, RZ, CNOT, ISWAP, SQRTSWAP, CCNOT, SWAP

p = Program()
reg = p.qalloc(3)

p.apply(H, reg[0])
p.apply(X, reg[0])
p.apply(Y, reg[2])
p.apply(Z, reg[1])
p.apply(I, reg[1])
p.apply(S, reg[0])
p.apply(T, reg[0])
p.apply(PH(0.3), reg[0])
p.apply(RX(-0.3), reg[0])
p.apply(RY(0.6), reg[1])
p.apply(RZ(0.3), reg[0])
p.apply(CNOT, reg[0:2])
p.apply(SWAP, reg[0], reg[2])
p.apply(ISWAP, reg[1:3])
p.apply(SQRTSWAP, reg[0:2])
p.apply(CCNOT, reg)

circuit = p.to_circ()
%qatdisplay circuit<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.2202517162471396, 'fraction_numerical': 0.06521739130434782, 'mean_word_length': 1.760063141278611, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 15, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '99678', 'license': 'CC0-1.0', 'n_tokens_mistral': 1590, 'n_tokens_neox': 1461, 'n_words': 400, 'path': 'available_gates.ipynb', 'repo_name': 'lsteffenel/myqlm-tuto', 'size': '3496'}