|
Maestro 0.1.0
Unified interface for quantum circuit simulation
|
The interface for quantum gates. More...
#include <QuantumGates.h>
Public Member Functions | |
| IQuantumGate (Time delay=0) | |
| IQuantumGate constructor. | |
| virtual QuantumGateType | GetGateType () const =0 |
| Get the type of the quantum gate. | |
| virtual std::vector< double > | GetParams () const |
| Get the gate parameters. | |
| 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. | |
| virtual unsigned int | GetNumQubits () const=0 |
| Get the number of qubits. | |
| virtual void | SetQubit (Types::qubit_t qubit, unsigned long index=0)=0 |
| Set the qubits involved. | |
| virtual Types::qubit_t | GetQubit (unsigned int index=0) const=0 |
| Get the qubit involved. | |
| 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 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=0 |
| Get a shared pointer to a remapped 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. | |
| virtual bool | IsClifford () const |
| Checks if the operation is a Clifford one. | |
The interface for quantum gates.
The interface for quantum gates. Quantum gates are quantum operations that can be applied to a quantum state.
| Time | The type of the execution delay. |
Definition at line 71 of file QuantumGates.h.
|
inline |
IQuantumGate constructor.
Constructs the IQuantumGate object. If specified, the delay is the time the quantum gate takes to execute.
Definition at line 80 of file QuantumGates.h.
|
pure virtual |
Get the type of the quantum gate.
Returns the type of the quantum gate.
Implemented in Circuits::CCXGate< Time >, Circuits::CHGate< Time >, Circuits::CPGate< Time >, Circuits::CRxGate< Time >, Circuits::CRyGate< Time >, Circuits::CRzGate< Time >, Circuits::CSwapGate< Time >, Circuits::CSxDagGate< Time >, Circuits::CSxGate< Time >, Circuits::CUGate< Time >, Circuits::CXGate< Time >, Circuits::CYGate< Time >, Circuits::CZGate< Time >, Circuits::HadamardGate< Time >, Circuits::KGate< Time >, Circuits::PhaseGate< Time >, Circuits::RxGate< Time >, Circuits::RyGate< Time >, Circuits::RzGate< Time >, Circuits::SdgGate< Time >, Circuits::SGate< Time >, Circuits::SwapGate< Time >, Circuits::SxDagGate< Time >, Circuits::SxGate< Time >, Circuits::TdgGate< Time >, Circuits::TGate< Time >, Circuits::UGate< Time >, Circuits::XGate< Time >, Circuits::XGate< Types::time_type >, Circuits::YGate< Time >, and Circuits::ZGate< Time >.
|
inlinevirtual |
Get the gate parameters.
Returns the parameters of the gate.
Reimplemented in Circuits::ControlledRotationGate< Time >, Circuits::ControlledRotationGate< Types::time_type >, Circuits::CPGate< Time >, Circuits::CUGate< Time >, Circuits::PhaseGate< Time >, Circuits::RotationGate< Time >, Circuits::RotationGate< Types::time_type >, and Circuits::UGate< Time >.
Definition at line 98 of file QuantumGates.h.