Template Class HermitianObs¶
Defined in File Observables.hpp
Inheritance Relationships¶
Base Type¶
public Pennylane::Algorithms::Observable< T >
(Template Class Observable)
Class Documentation¶
-
template<typename T>
class HermitianObs : public Pennylane::Algorithms::Observable<T>¶ Class models.
Public Functions
-
template<typename T1>
inline HermitianObs(T1 &&matrix, std::vector<size_t> wires)¶ Create Hermitian observable.
- Parameters
matrix – Matrix in row major format.
wires – Wires the observable applies to.
-
inline virtual auto getWires() const -> std::vector<size_t> override¶
Get the wires the observable applies to.
-
inline virtual auto getObsName() const -> std::string override¶
Get the name of the observable.
-
inline virtual void applyInPlace(StateVectorManagedCPU<T> &sv) const override¶
Apply the observable to the given statevector in place.
-
template<typename T1>
api/classPennylane_1_1Algorithms_1_1HermitianObs
Download Python script
Download Notebook
View on GitHub