Template Class NamedObs¶
Defined in File Observables.hpp
Inheritance Relationships¶
Base Type¶
public Pennylane::Algorithms::Observable< T >
(Template Class Observable)
Class Documentation¶
-
template<typename T>
class NamedObs : public Pennylane::Algorithms::Observable<T>¶ Class models named observables (PauliX, PauliY, PauliZ, etc.)
- Template Parameters
T – Floating point type
Public Functions
-
inline NamedObs(std::string obs_name, std::vector<size_t> wires, std::vector<T> params = {})¶
Construct a NamedObs object, representing a given observable.
- Parameters
arg1 – Name of the observable.
arg2 – Argument to construct wires.
arg3 – Argument to construct parameters
-
inline virtual auto getObsName() const -> std::string override¶
Get the name of the observable.
-
inline virtual auto getWires() const -> std::vector<size_t> override¶
Get the wires the observable applies to.
-
inline virtual void applyInPlace(StateVectorManagedCPU<T> &sv) const override¶
Apply the observable to the given statevector in place.
api/classPennylane_1_1Algorithms_1_1NamedObs
Download Python script
Download Notebook
View on GitHub