Template Function Pennylane::Gates::getCNOT

Function Documentation

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

Create a matrix representation of the CNOT 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 CNOT gate data.