|
Maestro 0.1.0
Unified interface for quantum circuit simulation
|
A conditional measurement. More...
#include <Conditional.h>
Inheritance diagram for Circuits::ConditionalMeasurement< Time >:
Collaboration diagram for Circuits::ConditionalMeasurement< Time >:Public Member Functions | |
| ConditionalMeasurement (const std::shared_ptr< MeasurementOperation< Time > > &operation, const std::shared_ptr< ICondition > &condition, Time delay=0) | |
| Construct a new ConditionalMeasurement object. | |
| OperationType | GetType () const override |
| Get the type of the operation. | |
| std::shared_ptr< IOperation< Time > > | Clone () const override |
| Get a shared pointer to a clone of this object. | |
Public Member Functions inherited from Circuits::IConditionalOperation< Time > | |
| IConditionalOperation (const std::shared_ptr< IOperation< Time > > &operation, const std::shared_ptr< ICondition > &condition, Time delay=0) | |
| Construct a new IConditionalOperation object. | |
| void | Execute (const std::shared_ptr< Simulators::ISimulator > &sim, OperationState &state) const override |
| Execute the operation. | |
| void | SetOperation (const std::shared_ptr< IOperation< Time > > &op) |
| Set the operation for the conditional operation. | |
| std::shared_ptr< IOperation< Time > > | GetOperation () const |
| Get the operation for the conditional operation. | |
| void | SetCondition (const std::shared_ptr< ICondition > &cond) |
| Set the condition for the conditional operation. | |
| std::shared_ptr< ICondition > | GetCondition () const |
| Get the condition for the conditional operation. | |
| std::vector< size_t > | AffectedBits () const override |
| Get bits that are involved in the condition. | |
| Types::qubits_vector | AffectedQubits () const override |
| Get the qubits affected by the operation. | |
| std::shared_ptr< IOperation< Time > > | Remap (const std::unordered_map< Types::qubit_t, Types::qubit_t > &qubitsMap, const std::unordered_map< Types::qubit_t, Types::qubit_t > &bitsMap={}) const override |
| Get a shared pointer to a remapped operation. | |
| bool | IsClifford () const override |
| Checks if the operation is a Clifford one. | |
Public Member Functions inherited from Circuits::IOperation< Time > | |
| IOperation (Time delay=0) | |
| Construct a new IOperation object. | |
| virtual | ~IOperation ()=default |
| Destroy the IOperation object. | |
| virtual bool | CanAffectQuantumState () const |
| Find if the operation can affect the quantum state. | |
| virtual bool | NeedsEntanglementForDistribution () const |
| Find if the operation needs entanglement for distribution. | |
| virtual bool | IsConditional () const |
| Find if the operation is a conditional operation. | |
| std::shared_ptr< IOperation< Time > > | getptr () |
| Get a shared pointer to this object. | |
| Time | GetDelay () const |
| Get the delay of the operation. | |
| void | SetDelay (Time d) |
| Set the delay of the operation. | |
A conditional measurement.
A measurement that is executed only if a condition is met.
| Time | The type of the time parameter that is used for operations timing. |
Definition at line 439 of file Conditional.h.
|
inline |
Construct a new ConditionalMeasurement object.
Construct a new ConditionalMeasurement object with the given measurement, condition and delay.
| operation | The measurement to execute if the condition is met. |
| condition | The condition to check. |
| delay | The time required for the operation to complete. |
Definition at line 453 of file Conditional.h.
|
inlineoverridevirtual |
Get a shared pointer to a clone of this object.
Returns a shared pointer to a copy of this object.
Implements Circuits::IOperation< Time >.
Definition at line 475 of file Conditional.h.
|
inlineoverridevirtual |
Get the type of the operation.
Returns the type of the operation.
Reimplemented from Circuits::IOperation< Time >.
Definition at line 465 of file Conditional.h.