|
Maestro 0.3.11
Unified interface for quantum circuit simulation
|
Implements Clone() once for a concrete gate. More...
#include <QuantumGates.h>
Public Member Functions | |
| std::shared_ptr< IOperation< Time > > | Clone () const override |
| Get a shared pointer to a clone of this object. | |
Implements Clone() once for a concrete gate.
A concrete gate derives from CloneableGate<Gate, Base, Time> instead of directly from Base. Clone() copy-constructs the gate, so every member (qubits, parameters, delay, the noiseless mark) carries over without each gate listing them. A gate's constructor names this base as CloneableGate<Gate, Circuits::Base, Time>: unqualified, MSVC takes Base for the injected name of the inherited Base<Time> class rather than the template, and rejects it (C3200).
| Gate | The concrete gate template deriving from this class. |
| Base | The gate interface it implements, e.g. SingleQubitGate. |
| Time | The type of the execution delay. |
Definition at line 133 of file QuantumGates.h.
|
inlineoverride |
Get a shared pointer to a clone of this object.
Returns a shared pointer to a copy of this object.
Definition at line 144 of file QuantumGates.h.