Template Class HermitianObsTNCuda

Inheritance Relationships

Base Type

Class Documentation

template<class TensorNetT>
class HermitianObsTNCuda : public Pennylane::LightningTensor::TNCuda::Observables::ObservableTNCuda<TensorNetT>

Hermitian observables.

Template Parameters

TensorNetT – tensor network class.

Public Types

using BaseType = ObservableTNCuda<TensorNetT>
using PrecisionT = typename TensorNetT::PrecisionT
using ComplexT = typename TensorNetT::ComplexT
using MatrixT = std::vector<ComplexT>

Public Functions

inline HermitianObsTNCuda(MatrixT matrix, std::vector<std::size_t> wires)

Construct a HermitianObs object, representing a given observable.

Parameters
  • matrix – Matrix in row major format.

  • wires – Wires the observable applies to.

inline virtual auto getObsName() const -> std::string override

Get the name of the observable.

inline virtual auto getWires() const -> std::vector<std::size_t> override

Get the wires the observable applies to.

inline auto getMatrix() const -> const MatrixT&

Get the matrix of the Hermitian observable.