Maestro 0.1.0
Unified interface for quantum circuit simulation
Loading...
Searching...
No Matches
Simulators::SimulatorObserverProxy< Impl > Class Template Reference

A proxy class for a quantum computing simulator observer. More...

#include <SimulatorObserver.h>

Inheritance diagram for Simulators::SimulatorObserverProxy< Impl >:
Simulators::ISimulatorObserver

Public Member Functions

 SimulatorObserverProxy (const std::shared_ptr< Impl > &impl)
 Constructor.
void Update (const Types::qubits_vector &qubits) override
 Update function that is called each time an update is done.
Public Member Functions inherited from Simulators::ISimulatorObserver
virtual ~ISimulatorObserver ()=default
 Virtual destructor.
std::shared_ptr< ISimulatorObservergetptr ()
 Get a shared pointer to this object.

Detailed Description

template<class Impl>
class Simulators::SimulatorObserverProxy< Impl >

A proxy class for a quantum computing simulator observer.

If you don't want to derive from ISimulatorObserver, use this proxy class. The implementation of the observer needs to implement the Update function.

See also
ISimulatorObserver
IState
ISimulator
Template Parameters
ImplThe implementation of the observer.

Definition at line 76 of file SimulatorObserver.h.

Constructor & Destructor Documentation

◆ SimulatorObserverProxy()

template<class Impl>
Simulators::SimulatorObserverProxy< Impl >::SimulatorObserverProxy ( const std::shared_ptr< Impl > & impl)
inline

Constructor.

Constructs a proxy for the observer.

Parameters
implThe implementation of the observer, wrapped in a shared pointer.

Definition at line 85 of file SimulatorObserver.h.

Member Function Documentation

◆ Update()

template<class Impl>
void Simulators::SimulatorObserverProxy< Impl >::Update ( const Types::qubits_vector & qubits)
inlineoverridevirtual

Update function that is called each time an update is done.

This function is called each time the state is changed, with the qubits that have been changed.

Parameters
qubitsThe qubits that have been changed.

Implements Simulators::ISimulatorObserver.

Definition at line 94 of file SimulatorObserver.h.


The documentation for this class was generated from the following file: