Template Function Pennylane::Gates::getRot¶
Defined in File Gates.hpp
Function Documentation¶
-
template<template<typename...> class ComplexT, typename T, typename U = T>
static auto Pennylane::Gates::getRot(U phi, U theta, U omega) -> std::vector<ComplexT<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
ComplexT – Complex class.
T – Required precision of gate (
float
ordouble
).T – Required precision of parameter (
float
ordouble
).
- Parameters
phi – ϕ shift angle.
theta – θ shift angle.
omega – ω shift angle.
- Returns
std::vector<ComplexT<T>> Return Rot gate data.