Template Function Pennylane::Util::randomUnitary¶
Defined in File TestHelpers.hpp
Function Documentation¶
-
template<typename PrecisionT, class RandomEngine>
auto Pennylane::Util::randomUnitary(RandomEngine &re, std::size_t num_qubits) -> std::vector<std::complex<PrecisionT>>¶ Generate random unitary matrix.
- Template Parameters
PrecisionT – Floating point type
RandomEngine – Random engine type
- Parameters
re – Random engine instance
num_qubits – Number of qubits
- Returns
Generated unitary matrix in row-major format
api/function_TestHelpers_8hpp_1aea08be58fd7e3dbe8299657d28a990f0
Download Python script
Download Notebook
View on GitHub