Template Function Pennylane::Gates::getRX(U)

Function Documentation

template<class T, class U = T>
static auto Pennylane::Gates::getRX(U angle) -> std::vector<std::complex<T>>

Create a matrix representation of the RX gate data in row-major format.

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

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

Parameters

angle – Phase shift angle.

Returns

const std::vector<std::complex<T>> Return const RX gate data.