|
Maestro 0.1.0
Unified interface for quantum circuit simulation
|
The no operation. More...
#include <Operations.h>
Public Member Functions | |
| NoOperation (Time delay=0) | |
| Construct a new NoOperation object. | |
| void | Execute (const std::shared_ptr< Simulators::ISimulator > &sim, OperationState &state) const override |
| Execute the operation. | |
| std::shared_ptr< IOperation< Time > > | Clone () const override |
| Get a shared pointer to a clone of this object. | |
| 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< Types::time_type > | |
| IOperation (Types::time_type delay=0) | |
| Construct a new IOperation object. | |
| virtual | ~IOperation ()=default |
| Destroy the IOperation object. | |
| virtual OperationType | GetType () const |
| Get the type of the operation. | |
| 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. | |
| virtual Types::qubits_vector | AffectedQubits () const |
| Returns the affected qubits. | |
| virtual std::vector< size_t > | AffectedBits () const |
| Returns the affected bits. | |
| std::shared_ptr< IOperation< Types::time_type > > | getptr () |
| Get a shared pointer to this object. | |
| Types::time_type | GetDelay () const |
| Get the delay of the operation. | |
| void | SetDelay (Types::time_type d) |
| Set the delay of the operation. | |
The no operation.
This a an operation that does nothing.
| Time | The type of the delay time parameter. |
Definition at line 534 of file Operations.h.
|
inline |
Construct a new NoOperation object.
Construct a new NoOperation object with the specified execution time.
| delay | The execution time of the operation. |
Definition at line 542 of file Operations.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< Types::time_type >.
Definition at line 565 of file Operations.h.
|
inlineoverridevirtual |
Execute the operation.
Execute the operation on the specified simulator. The execution does nothing, except adding the delay for the execution if a discrete event simulator is used. To not be confused with the simulator passed here as a parameter, which is a quantum simulator.
| sim | The simulator to execute the operation on. |
| state | The state of the operation. |
Implements Circuits::IOperation< Types::time_type >.
Definition at line 556 of file Operations.h.
|
inlineoverridevirtual |
Checks if the operation is a Clifford one.
Checks if the operation is a Clifford one, allowing to be simulated in a stabilizers simulator.
Reimplemented from Circuits::IOperation< Types::time_type >.
Definition at line 595 of file Operations.h.
|
inlineoverridevirtual |
Get a shared pointer to a remapped operation.
Returns a shared pointer to a copy of the operation with qubits and classical bits changed according to the provided maps.
| qubitsMap | The map of qubits to remap. |
| bitsMap | The map of classical bits to remap. |
Implements Circuits::IOperation< Types::time_type >.
Definition at line 580 of file Operations.h.