|
Maestro 0.3.1
Unified interface for quantum circuit simulation
|
A one- or two-qubit channel that remains in Kraus form until execution. More...
#include <QuantumChannelOperation.h>
Public Member Functions | |
| QuantumChannelOperation (const Types::qubits_vector &targets, const Simulators::QuantumChannel &channel, Time delay=0) | |
| virtual std::vector< size_t > | AffectedBits () const |
| Returns the affected bits. | |
| Types::qubits_vector | AffectedQubits () const override |
| Returns the affected qubits. | |
| bool | CanAffectQuantumState () const override |
| Find if the operation can affect the quantum state. | |
| std::shared_ptr< IOperation< Time > > | Clone () const override |
| Get a shared pointer to a clone of this object. | |
| void | Execute (const std::shared_ptr< Simulators::ISimulator > &simulator, OperationState &state) const override |
| Execute the operation. | |
| const Simulators::QuantumChannel & | GetChannel () const |
| Types::time_type | GetDelay () const |
| Get the delay of the operation. | |
| std::shared_ptr< IOperation< Types::time_type > > | getptr () |
| Get a shared pointer to this object. | |
| OperationType | GetType () const override |
| Get the type of the operation. | |
| virtual bool | IsBranching () const |
| Checks if the operation is a branching one. | |
| virtual bool | IsClifford () const |
| Checks if the operation is a Clifford one. | |
| virtual bool | IsConditional () const |
| Find if the operation is a conditional operation. | |
| bool | NeedsEntanglementForDistribution () const override |
| Find if the operation needs entanglement for distribution. | |
| 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. | |
| virtual void | SetDelay (Types::time_type d) |
| Set the delay of the operation. | |
A one- or two-qubit channel that remains in Kraus form until execution.
Definition at line 21 of file QuantumChannelOperation.h.
|
inline |
Definition at line 23 of file QuantumChannelOperation.h.
References Circuits::IOperation< Types::time_type >::IOperation().
|
inlinevirtualinherited |
Returns the affected bits.
Returns the affected classical bits.
Reimplemented in Circuits::Circuit< Time >, Circuits::Circuit< Types::time_type >, Circuits::IConditionalOperation< Time >, Circuits::IConditionalOperation< Types::time_type >, Circuits::MeasurementOperation< Time >, and Circuits::Random< Time >.
Definition at line 482 of file Operations.h.
|
inlineoverridevirtual |
Returns the affected qubits.
Returns the affected qubits by the operation.
Reimplemented from Circuits::IOperation< Types::time_type >.
Definition at line 51 of file QuantumChannelOperation.h.
|
inlineoverridevirtual |
Find if the operation can affect the quantum state.
Returns true if the operation can affect the quantum state, false otherwise.
Reimplemented from Circuits::IOperation< Types::time_type >.
Definition at line 53 of file QuantumChannelOperation.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 61 of file QuantumChannelOperation.h.
References Circuits::IOperation< Time >::GetDelay().
|
inlineoverridevirtual |
Execute the operation.
Execute the operation on the specified simulator.
| sim | The simulator to execute the operation on. |
| state | The state of the operation. |
Implements Circuits::IOperation< Types::time_type >.
Definition at line 41 of file QuantumChannelOperation.h.
|
inline |
Definition at line 59 of file QuantumChannelOperation.h.
|
inlineinherited |
Get the delay of the operation.
Returns the delay due of the execution time of the operation.
Definition at line 501 of file Operations.h.
Referenced by Circuits::NoOperation< Time >::Clone().
|
inlineinherited |
Get a shared pointer to this object.
Returns a shared pointer to this object. The object needs to be already wrapped in a shared pointer.
Definition at line 491 of file Operations.h.
|
inlineoverridevirtual |
Get the type of the operation.
Get the type of the operation.
Reimplemented from Circuits::IOperation< Types::time_type >.
Definition at line 47 of file QuantumChannelOperation.h.
References Circuits::kQuantumChannel.
|
inlinevirtualinherited |
Checks if the operation is a branching one.
Checks if the operation is a branching one, meaning that it can lead to splitting paths (relevant for the path integral simulator).
Reimplemented in Circuits::CHGate< Time >, Circuits::Circuit< Time >, Circuits::Circuit< Types::time_type >, Circuits::CRxGate< Time >, Circuits::CRyGate< Time >, Circuits::CSxDagGate< Time >, Circuits::CSxGate< Time >, Circuits::CUGate< Time >, Circuits::HadamardGate< Time >, Circuits::IConditionalOperation< Time >, Circuits::IConditionalOperation< Types::time_type >, Circuits::KGate< Time >, Circuits::RxGate< Time >, Circuits::RyGate< Time >, Circuits::SxDagGate< Time >, Circuits::SxGate< Time >, and Circuits::UGate< Time >.
Definition at line 530 of file Operations.h.
|
inlinevirtualinherited |
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 in Circuits::Circuit< Time >, Circuits::Circuit< Types::time_type >, Circuits::CXGate< Time >, Circuits::CYGate< Time >, Circuits::CZGate< Time >, Circuits::Delay< Time >, Circuits::HadamardGate< Time >, Circuits::IConditionalOperation< Time >, Circuits::IConditionalOperation< Types::time_type >, Circuits::KGate< Time >, Circuits::MeasurementOperation< Time >, Circuits::NoOperation< Time >, Circuits::PhaseGate< Time >, Circuits::Random< Time >, Circuits::Reset< Time >, Circuits::SdgGate< Time >, Circuits::SGate< Time >, Circuits::SwapGate< Time >, Circuits::SxDagGate< Time >, Circuits::SxGate< Time >, Circuits::UGate< Time >, Circuits::XGate< Time >, Circuits::XGate< Types::time_type >, Circuits::YGate< Time >, and Circuits::ZGate< Time >.
Definition at line 520 of file Operations.h.
|
inlinevirtualinherited |
Find if the operation is a conditional operation.
Returns true if the operation is conditional, false otherwise.
Definition at line 462 of file Operations.h.
|
inlineoverridevirtual |
Find if the operation needs entanglement for distribution.
Returns true if the operation needs entanglement for distribution, false otherwise.
Reimplemented from Circuits::IOperation< Types::time_type >.
Definition at line 55 of file QuantumChannelOperation.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 66 of file QuantumChannelOperation.h.
|
inlinevirtualinherited |
Set the delay of the operation.
Sets the delay due of the execution time of the operation.
| d | The delay of the operation. |
Definition at line 509 of file Operations.h.