Template Function Pennylane::Util::createProductState¶
Defined in File TestHelpers.hpp
Function Documentation¶
-
template<typename PrecisionT, typename ComplexT = std::complex<PrecisionT>>
auto Pennylane::Util::createProductState(std::string_view str) -> TestVector<ComplexT>¶ Create an arbitrary product state in X- or Z-basis.
Example: createProductState(“+01”) will produce |+01> state. Note that the wire index starts from the left.
api/function_TestHelpers_8hpp_1af77abb50ced2f10cd18da659f1873709
Download Python script
Download Notebook
View on GitHub