Maestro 0.3.11
Unified interface for quantum circuit simulation
Loading...
Searching...
No Matches
Simulators::FusionRoutingOperation Class Reference

#include <FusionGate.h>

Inheritance diagram for Simulators::FusionRoutingOperation:
Collaboration diagram for Simulators::FusionRoutingOperation:

Public Member Functions

 FusionRoutingOperation (Types::qubits_vector targets, double rank=4, bool swap=false)
virtual std::vector< size_t > AffectedBits () const
 Returns the affected bits.
Types::qubits_vector AffectedQubits () const override
 Returns the affected qubits.
virtual bool CanAffectQuantumState () const
 Find if the operation can affect the quantum state.
std::shared_ptr< Circuits::IOperation<> > Clone () const override
 Get a shared pointer to a clone of this object.
void Execute (const std::shared_ptr< ISimulator > &, Circuits::OperationState &) const override
 Execute the operation.
Time GetDelay () const
 Get the delay of the operation.
std::shared_ptr< IOperation< Time > > getptr ()
 Get a shared pointer to this object.
Circuits::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 IsNoiseless () const
 Whether noise models skip this operation.
virtual bool NeedsEntanglementForDistribution () const
 Find if the operation needs entanglement for distribution.
std::shared_ptr< Circuits::IOperation<> > Remap (const std::unordered_map< Types::qubit_t, Types::qubit_t > &map, const std::unordered_map< Types::qubit_t, Types::qubit_t > &={}) const override
 Get a shared pointer to a remapped operation.
virtual void SetDelay (Time d)
 Set the delay of the operation.
void SetNoiseless (bool value=true)
 Mark the operation as exempt from injected gate noise.

Public Attributes

bool isSwap = false
double schmidtRank = 4

Detailed Description

Definition at line 291 of file FusionGate.h.

Constructor & Destructor Documentation

◆ FusionRoutingOperation()

Simulators::FusionRoutingOperation::FusionRoutingOperation ( Types::qubits_vector targets,
double rank = 4,
bool swap = false )
inlineexplicit

Member Function Documentation

◆ AffectedBits()

template<typename Time = Types::time_type>
virtual std::vector< size_t > Circuits::IOperation< Time >::AffectedBits ( ) const
inlinevirtualinherited

◆ AffectedQubits()

Types::qubits_vector Simulators::FusionRoutingOperation::AffectedQubits ( ) const
inlineoverridevirtual

Returns the affected qubits.

Returns the affected qubits by the operation.

Returns
A vector with the affected qubits.

Reimplemented from Circuits::IOperation< Time >.

Definition at line 300 of file FusionGate.h.

◆ CanAffectQuantumState()

template<typename Time = Types::time_type>
virtual bool Circuits::IOperation< Time >::CanAffectQuantumState ( ) const
inlinevirtualinherited

Find if the operation can affect the quantum state.

Returns true if the operation can affect the quantum state, false otherwise.

Returns
True if the operation can affect the quantum state, false otherwise.

Reimplemented in Circuits::Circuit< Time >, Circuits::Circuit< Time >, Circuits::Circuit< Types::time_type >, Circuits::Delay< Time >, and Circuits::QuantumChannelOperation< Time >.

Definition at line 473 of file Operations.h.

◆ Clone()

std::shared_ptr< Circuits::IOperation<> > Simulators::FusionRoutingOperation::Clone ( ) const
inlineoverridevirtual

Get a shared pointer to a clone of this object.

Returns a shared pointer to a copy of this object.

Returns
A shared pointer to this object.

Implements Circuits::IOperation< Time >.

Definition at line 315 of file FusionGate.h.

References Simulators::RoutingGateInfo::isSwap, and Simulators::RoutingGateInfo::schmidtRank.

◆ Execute()

void Simulators::FusionRoutingOperation::Execute ( const std::shared_ptr< ISimulator > & sim,
Circuits::OperationState & state ) const
inlineoverridevirtual

Execute the operation.

Execute the operation on the specified simulator.

Parameters
simThe simulator to execute the operation on.
stateThe state of the operation.
See also
ISimulator
OperationState

Implements Circuits::IOperation< Time >.

Definition at line 310 of file FusionGate.h.

◆ GetDelay()

template<typename Time = Types::time_type>
Time Circuits::IOperation< Time >::GetDelay ( ) const
inlineinherited

◆ getptr()

template<typename Time = Types::time_type>
std::shared_ptr< IOperation< Time > > Circuits::IOperation< Time >::getptr ( )
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.

Returns
A shared pointer to this object.

Definition at line 535 of file Operations.h.

◆ GetType()

Circuits::OperationType Simulators::FusionRoutingOperation::GetType ( ) const
inlineoverridevirtual

Get the type of the operation.

Get the type of the operation.

Returns
The type of the operation.
See also
OperationType

Reimplemented from Circuits::IOperation< Time >.

Definition at line 305 of file FusionGate.h.

References Circuits::kGate.

◆ IsBranching()

template<typename Time = Types::time_type>
virtual bool Circuits::IOperation< Time >::IsBranching ( ) const
inlinevirtualinherited

◆ IsClifford()

◆ IsConditional()

template<typename Time = Types::time_type>
virtual bool Circuits::IOperation< Time >::IsConditional ( ) const
inlinevirtualinherited

Find if the operation is a conditional operation.

Returns true if the operation is conditional, false otherwise.

Returns
True if the operation is conditional, false otherwise.

Definition at line 500 of file Operations.h.

◆ IsNoiseless()

template<typename Time = Types::time_type>
bool Circuits::IOperation< Time >::IsNoiseless ( ) const
inlineinherited

Whether noise models skip this operation.

Returns
True if no gate noise is injected after this operation.

Definition at line 580 of file Operations.h.

◆ NeedsEntanglementForDistribution()

template<typename Time = Types::time_type>
virtual bool Circuits::IOperation< Time >::NeedsEntanglementForDistribution ( ) const
inlinevirtualinherited

Find if the operation needs entanglement for distribution.

Returns true if the operation needs entanglement for distribution, false otherwise.

Returns
True if the operation needs entanglement for distribution, false otherwise.

Reimplemented in Circuits::Circuit< Time >, Circuits::Circuit< Time >, Circuits::Circuit< Types::time_type >, and Circuits::QuantumChannelOperation< Time >.

Definition at line 488 of file Operations.h.

◆ Remap()

std::shared_ptr< Circuits::IOperation<> > Simulators::FusionRoutingOperation::Remap ( const std::unordered_map< Types::qubit_t, Types::qubit_t > & qubitsMap,
const std::unordered_map< Types::qubit_t, Types::qubit_t > & bitsMap = {} ) const
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.

Parameters
qubitsMapThe map of qubits to remap.
bitsMapThe map of classical bits to remap.
Returns
A shared pointer to the remapped object.

Implements Circuits::IOperation< Time >.

Definition at line 320 of file FusionGate.h.

◆ SetDelay()

template<typename Time = Types::time_type>
virtual void Circuits::IOperation< Time >::SetDelay ( Time d)
inlinevirtualinherited

Set the delay of the operation.

Sets the delay due of the execution time of the operation.

Parameters
dThe delay of the operation.

Definition at line 557 of file Operations.h.

Referenced by Circuits::Delay< Time >::SetDuration().

◆ SetNoiseless()

template<typename Time = Types::time_type>
void Circuits::IOperation< Time >::SetNoiseless ( bool value = true)
inlineinherited

Mark the operation as exempt from injected gate noise.

Noise models add no noise after a noiseless operation. This is for basis changes that belong to a non-Z measurement or reset rather than being gates in their own right. Gate copies (Clone, Remap) keep the mark.

Parameters
valueTrue to exempt the operation from gate noise.

Definition at line 570 of file Operations.h.

Member Data Documentation

◆ isSwap

bool Simulators::RoutingGateInfo::isSwap = false
inherited

◆ schmidtRank

double Simulators::RoutingGateInfo::schmidtRank = 4
inherited

The documentation for this class was generated from the following file: