Template Function Pennylane::Algorithms::applyObservables

Function Documentation

template<typename T>
inline void Pennylane::Algorithms::applyObservables(std::vector<StateVectorManagedCPU<T>> &states, const StateVectorManagedCPU<T> &reference_state, const std::vector<std::shared_ptr<Observable<T>>> &observables)

OpenMP accelerated application of observables to given statevectors.

Parameters
  • states – Vector of statevector copies, one per observable.

  • reference_state – Reference statevector

  • observables – Vector of observables to apply to each statevector.