Maestro 0.2.5
Unified interface for quantum circuit simulation
Loading...
Searching...
No Matches
Simulators::ISimulatorObserver Class Referenceabstract

Interface class for a quantum computing simulator observer. More...

#include <SimulatorObserver.h>

+ Inheritance diagram for Simulators::ISimulatorObserver:
+ Collaboration diagram for Simulators::ISimulatorObserver:

Public Member Functions

virtual ~ISimulatorObserver ()=default
 Virtual destructor.
 
std::shared_ptr< ISimulatorObservergetptr ()
 Get a shared pointer to this object.
 
virtual void Update (const Types::qubits_vector &qubits)=0
 Update function that is called each time an update is done.
 

Detailed Description

Interface class for a quantum computing simulator observer.

Derive from this class to implement a simulator observer.

See also
SimulatorObserverProxy
IState
ISimulator

Definition at line 36 of file SimulatorObserver.h.

Constructor & Destructor Documentation

◆ ~ISimulatorObserver()

virtual Simulators::ISimulatorObserver::~ISimulatorObserver ( )
virtualdefault

Virtual destructor.

Since this is a base class, the destructor should be virtual.

Member Function Documentation

◆ getptr()

std::shared_ptr< ISimulatorObserver > Simulators::ISimulatorObserver::getptr ( )
inline

Get a shared pointer to this object.

Returns a shared pointer to this object. The object needs to be already wrapped in a shared pointer.

Returns
A shared pointer to this object.

Definition at line 62 of file SimulatorObserver.h.

◆ Update()

virtual void Simulators::ISimulatorObserver::Update ( const Types::qubits_vector qubits)
pure virtual

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.

Implemented in Simulators::SimulatorObserverProxy< Impl >.


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