|
Maestro 0.1.0
Unified interface for quantum circuit simulation
|
#include <QuantumGates.h>
Public Member Functions | |
| ControlledRotationGate (Types::qubit_t ctrl=0, Types::qubit_t target=1, double theta=0, Time delay=0) | |
| ControlledRotationGate constructor. | |
| void | SetTheta (double t) |
| Set the theta angle for the controlled rotation gate. | |
| double | GetTheta () const |
| Get the theta angle for the controlled rotation gate. | |
| std::vector< double > | GetParams () const override |
| Get the gate parameters. | |
| Public Member Functions inherited from Circuits::TwoQubitsGate< Types::time_type > | |
| TwoQubitsGate (Types::qubit_t qubit1=0, Types::qubit_t qubit2=0, Types::time_type delay=0) | |
| TwoQubitsGate constructor. | |
| virtual | ~TwoQubitsGate () |
| The TwoQubitsGate destructor. | |
| unsigned int | GetNumQubits () const override |
| Get the number of qubits the quantum gate is applied to. | |
| void | SetQubit (Types::qubit_t q, unsigned long index=0) override |
| Set the qubit the quantum gate is applied to. | |
| Types::qubit_t | GetQubit (unsigned int index=0) const override |
| Get the qubit the quantum gate is applied to. | |
| Types::qubits_vector | AffectedQubits () const override |
| Get the qubits the quantum gate is applied to. | |
| std::shared_ptr< IOperation< Types::time_type > > | 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. | |
| Public Member Functions inherited from Circuits::IQuantumGate< Types::time_type > | |
| IQuantumGate (Types::time_type delay=0) | |
| IQuantumGate constructor. | |
| virtual QuantumGateType | GetGateType () const=0 |
| Get the type of the quantum gate. | |
| Public Member Functions inherited from Circuits::IGateOperation< Types::time_type > | |
| IGateOperation (Types::time_type delay=0) | |
| Construct a new IGateOperation object. | |
| OperationType | GetType () const override |
| Get the type of the operation. | |
| 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 void | Execute (const std::shared_ptr< Simulators::ISimulator > &sim, OperationState &state) const=0 |
| Execute the operation. | |
| virtual std::shared_ptr< IOperation< Types::time_type > > | Clone () const=0 |
| Get a shared pointer to a clone of this 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. | |
| 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. | |
| virtual bool | IsClifford () const |
| Checks if the operation is a Clifford one. | |
Definition at line 2159 of file QuantumGates.h.
|
inline |
ControlledRotationGate constructor.
Constructs the controlled rotation gate object. If specified, the delay is the time the quantum gate takes to execute. This class is not to be used directly, there are derived classes for specific rotations.
| ctrl | The control qubit the quantum gate is applied to. |
| target | The target qubit the quantum gate is applied to. |
| theta | The theta angle for the controlled rotation gate. |
| delay | The time the quantum gate takes to execute. |
Definition at line 2173 of file QuantumGates.h.
|
inlineoverridevirtual |
Get the gate parameters.
Returns the parameters of the gate.
Reimplemented from Circuits::IQuantumGate< Types::time_type >.
Definition at line 2199 of file QuantumGates.h.
|
inline |
Get the theta angle for the controlled rotation gate.
Returns the theta angle for the controlled rotation gate.
Definition at line 2191 of file QuantumGates.h.
|
inline |
Set the theta angle for the controlled rotation gate.
Sets the theta angle for the controlled rotation gate.
| t | The theta angle for the controlled rotation gate. |
Definition at line 2183 of file QuantumGates.h.