Template Function Pennylane::LightningGPU::cuGates::getRot(U, U, U)

Function Documentation

template<class CFP_t, class U = double>
static auto Pennylane::LightningGPU::cuGates::getRot(U phi, U theta, U omega) -> std::vector<CFP_t>

Create a matrix representation of the Rot gate data in row-major format.

The gate is defined as: \(\begin{split}Rot(\phi,\theta,\omega) = RZ(\omega)RY(\theta)RZ(\phi)= \begin{bmatrix} e^{-i(\phi+\omega)/2}\cos(\theta/2) & -e^{i(\phi-\omega)/2}\sin(\theta/2) \\ e^{-i(\phi-\omega)/2}\sin(\theta/2) & e^{i(\phi+\omega)/2}\cos(\theta/2) \end{bmatrix}.\end{split}\)

Template Parameters
  • CFP_t – Required precision of gate (float or double).

  • U – Required precision of parameter (float or double).

Parameters
  • phi\(\phi\) shift angle.

  • theta\(\theta\) shift angle.

  • omega\(\omega\) shift angle.

Returns

std::vector<CFP_t> Return Rot gate data.