Processing math: 100%

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: Rot(ϕ,θ,ω)=RZ(ω)RY(θ)RZ(ϕ)=[ei(ϕ+ω)/2cos(θ/2)ei(ϕω)/2sin(θ/2)ei(ϕω)/2sin(θ/2)ei(ϕ+ω)/2cos(θ/2)].

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

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

Parameters
  • phiϕ shift angle.

  • thetaθ shift angle.

  • omegaω shift angle.

Returns

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