qat.lang.vendors.PMS
- qat.lang.vendors.PMS
Definition of the \(PMS\) gate (of arity \(2\)). This gate is not included in the default gate set of myQLM, but in the gate set
ionq_gate_set().from qat.lang import qrout from qat.lang.vendors import PMS @qrout def circ(alpha, beta, gamma): PMS(alpha, beta, gamma)(0, 1)
from qat.lang import qrout from qat.lang.vendors import PMS @qrout def ctrl_circ(alpha, beta, gamma): PMS(alpha, beta, gamma).ctrl()(0, 1, 2)
Multi-controlled gate
from qat.lang import qrout from qat.lang.vendors import PMS @qrout def multi_ctrl_circ(alpha, beta, gamma): PMS(alpha, beta, gamma).ctrl(2)(0, 1, 2, 3)
This \(PMS\) gate is defined by:
\[\begin{split}\forall \phi_0, \phi_1, \theta \in\rm I\!R^3: \begin{vmatrix} cos(\theta/2) & 0 & 0 & -i \cdot e^{-i(\phi_0 + \phi_1)} \cdot sin(\theta/2) \\ 0 & cos(\theta/2) & -i \cdot e^{-i(\phi_0 - \phi_1)} \cdot sin(\theta/2) & 0 \\ 0 & -i \cdot e^{i(\phi_0 - \phi_1)} \cdot sin(\theta/2) & cos(\theta/2) & 0 \\ -i \cdot e^{i(\phi_0 + \phi_1)} \cdot sin(\theta/2) & 0 & 0 & cos(\theta/2) \\ \end{vmatrix}\end{split}\]