Template Function Pennylane::LightningGPU::cuGates::getRot(U, U, U)¶
Defined in File cuGates_host.hpp
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(ϕ)=[e−i(ϕ+ω)/2cos(θ/2)−ei(ϕ−ω)/2sin(θ/2)e−i(ϕ−ω)/2sin(θ/2)ei(ϕ+ω)/2cos(θ/2)].
- Template Parameters
CFP_t – Required precision of gate (
float
ordouble
).U – Required precision of parameter (
float
ordouble
).
- Parameters
phi – ϕ shift angle.
theta – θ shift angle.
omega – ω shift angle.
- Returns
std::vector<CFP_t> Return Rot gate data.