Loading [MathJax]/jax/output/HTML-CSS/jax.js

Template Function Pennylane::Gates::getRot

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

Template Parameters
  • ComplexT – Complex class.

  • T – Required precision of gate (float or double).

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

Parameters
  • phiϕ shift angle.

  • thetaθ shift angle.

  • omegaω shift angle.

Returns

std::vector<ComplexT<T>> Return Rot gate data.