Template Function Pennylane::Gates::getIdentity

Function Documentation

template<class T>
static constexpr auto Pennylane::Gates::getIdentity() -> std::vector<std::complex<T>>

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

Template Parameters

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

Returns

constexpr std::vector<std::complex<T>> Return constant expression of Identity data.