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: \(\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
ordouble
).U – Required precision of parameter (
float
ordouble
).
- Parameters
params – Vector of gate data. Values are expected in order of \([\phi, \theta, \omega]\).
- Returns
std::vector<CFP_t> Return Rot gate data.
api/function_cuGates__host_8hpp_1a3d7b6e7041238db906e947f3c3bb7f80
Download Python script
Download Notebook
View on GitHub