Template Function Pennylane::LightningGPU::cuGates::getRot(const std::vector<U>&)¶
Defined in File cuGates_host.hpp
Function Documentation¶
-
template<class CFP_t, class U = double>
static auto Pennylane::LightningGPU::cuGates::getRot(const std::vector<U> ¶ms) -> 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
params – Vector of gate data. Values are expected in order of [ϕ,θ,ω].
- Returns
std::vector<CFP_t> Return Rot gate data.