Maestro 0.1.0
Unified interface for quantum circuit simulation
Loading...
Searching...
No Matches
Circuits::Converter< Time > Class Template Reference

The converter class. More...

#include <Converter.h>

Static Public Member Functions

static std::shared_ptr< Circuit< Time > > ToCircuit (const std::shared_ptr< IOperation< Time > > &operation)
 Converts a smart pointer to the IOperation interface/base class to a smart pointer to the Circuit class.
static std::shared_ptr< IQuantumGate< Time > > ToQuantumGate (const std::shared_ptr< IOperation< Time > > &operation)
 Converts a smart pointer to the IOperation interface/base class to a smart pointer to the QuantumGate class.
static std::shared_ptr< SingleQubitGate< Time > > ToSingleQubitGate (const std::shared_ptr< IOperation< Time > > &operation)
 Converts a smart pointer to the IOperation interface/base class to a smart pointer to the SingleQubitGate class.
static std::shared_ptr< TwoQubitsGate< Time > > ToTwoQubitsGate (const std::shared_ptr< IOperation< Time > > &operation)
 Converts a smart pointer to the IOperation interface/base class to a smart pointer to the TwoQubitsGate class.
static std::shared_ptr< ThreeQubitsGate< Time > > ToThreeQubitsGate (const std::shared_ptr< IOperation< Time > > &operation)
 Converts a smart pointer to the IOperation interface/base class to a smart pointer to the ThreeQubitsGate class.
static std::shared_ptr< Random< Time > > ToRandom (const std::shared_ptr< IOperation< Time > > &operation)
 Converts a smart pointer to the IOperation interface/base class to a smart pointer to the Random class.
static std::shared_ptr< Reset< Time > > ToReset (const std::shared_ptr< IOperation< Time > > &operation)
 Converts a smart pointer to the IOperation interface/base class to a smart pointer to the Reset class.
static std::shared_ptr< MeasurementOperation< Time > > ToMeasurement (const std::shared_ptr< IOperation< Time > > &operation)
 Converts a smart pointer to the IOperation interface/base class to a smart pointer to the MeasurementOperation class.
static std::shared_ptr< ConditionalGate< Time > > ToConditionalGate (const std::shared_ptr< IOperation< Time > > &operation)
 Converts a smart pointer to the IOperation interface/base class to a smart pointer to the ConditionalGate class.
static std::shared_ptr< ConditionalMeasurement< Time > > ToConditionalMeasurement (const std::shared_ptr< IOperation< Time > > &operation)
 Converts a smart pointer to the IOperation interface/base class to a smart pointer to the ConditionalMeasurement class.
static std::shared_ptr< ConditionalRandomGen< Time > > ToConditionalRandom (const std::shared_ptr< IOperation< Time > > &operation)
 Converts a smart pointer to the IOperation interface/base class to a smart pointer to the ConditionalRandomGen class.
static std::shared_ptr< EqualConditionToEqualCondition (const std::shared_ptr< ICondition > &cond)
 Converts a smart pointer to the ICondition interface/base class to a smart pointer to the EqualCondition class.

Detailed Description

template<typename Time = Types::time_type>
class Circuits::Converter< Time >

The converter class.

Contains static functions to convert smart pointers to the IOperation interface/base class to smart pointers to the derived classes.

Template Parameters
TimeThe time type.

Definition at line 33 of file Converter.h.

Member Function Documentation

◆ ToCircuit()

template<typename Time = Types::time_type>
std::shared_ptr< Circuit< Time > > Circuits::Converter< Time >::ToCircuit ( const std::shared_ptr< IOperation< Time > > & operation)
inlinestatic

Converts a smart pointer to the IOperation interface/base class to a smart pointer to the Circuit class.

Parameters
operationThe operation.
Returns
The smart pointer to the Circuit class or a null pointer if the conversion is not possible.

Definition at line 44 of file Converter.h.

◆ ToConditionalGate()

template<typename Time = Types::time_type>
std::shared_ptr< ConditionalGate< Time > > Circuits::Converter< Time >::ToConditionalGate ( const std::shared_ptr< IOperation< Time > > & operation)
inlinestatic

Converts a smart pointer to the IOperation interface/base class to a smart pointer to the ConditionalGate class.

Parameters
operationThe operation.
Returns
The smart pointer to the ConditionalGate class or a null pointer if the conversion is not possible.

Definition at line 177 of file Converter.h.

◆ ToConditionalMeasurement()

template<typename Time = Types::time_type>
std::shared_ptr< ConditionalMeasurement< Time > > Circuits::Converter< Time >::ToConditionalMeasurement ( const std::shared_ptr< IOperation< Time > > & operation)
inlinestatic

Converts a smart pointer to the IOperation interface/base class to a smart pointer to the ConditionalMeasurement class.

Parameters
operationThe operation.
Returns
The smart pointer to the ConditionalMeasurement class or a null pointer if the conversion is not possible.

Definition at line 193 of file Converter.h.

◆ ToConditionalRandom()

template<typename Time = Types::time_type>
std::shared_ptr< ConditionalRandomGen< Time > > Circuits::Converter< Time >::ToConditionalRandom ( const std::shared_ptr< IOperation< Time > > & operation)
inlinestatic

Converts a smart pointer to the IOperation interface/base class to a smart pointer to the ConditionalRandomGen class.

Parameters
operationThe operation.
Returns
The smart pointer to the ConditionalRandomGen class or a null pointer if the conversion is not possible.

Definition at line 210 of file Converter.h.

◆ ToEqualCondition()

template<typename Time = Types::time_type>
std::shared_ptr< EqualCondition > Circuits::Converter< Time >::ToEqualCondition ( const std::shared_ptr< ICondition > & cond)
inlinestatic

Converts a smart pointer to the ICondition interface/base class to a smart pointer to the EqualCondition class.

Parameters
operationThe operation.
Returns
The smart pointer to the EqualCondition class or a null pointer if the conversion is not possible.

Definition at line 227 of file Converter.h.

◆ ToMeasurement()

template<typename Time = Types::time_type>
std::shared_ptr< MeasurementOperation< Time > > Circuits::Converter< Time >::ToMeasurement ( const std::shared_ptr< IOperation< Time > > & operation)
inlinestatic

Converts a smart pointer to the IOperation interface/base class to a smart pointer to the MeasurementOperation class.

Parameters
operationThe operation.
Returns
The smart pointer to the MeasurementOperation class or a null pointer if the conversion is not possible.

Definition at line 161 of file Converter.h.

◆ ToQuantumGate()

template<typename Time = Types::time_type>
std::shared_ptr< IQuantumGate< Time > > Circuits::Converter< Time >::ToQuantumGate ( const std::shared_ptr< IOperation< Time > > & operation)
inlinestatic

Converts a smart pointer to the IOperation interface/base class to a smart pointer to the QuantumGate class.

Parameters
operationThe operation.
Returns
The smart pointer to the QuantumGate class or a null pointer if the conversion is not possible.

Definition at line 60 of file Converter.h.

◆ ToRandom()

template<typename Time = Types::time_type>
std::shared_ptr< Random< Time > > Circuits::Converter< Time >::ToRandom ( const std::shared_ptr< IOperation< Time > > & operation)
inlinestatic

Converts a smart pointer to the IOperation interface/base class to a smart pointer to the Random class.

Parameters
operationThe operation.
Returns
The smart pointer to the Random class or a null pointer if the conversion is not possible.

Definition at line 129 of file Converter.h.

◆ ToReset()

template<typename Time = Types::time_type>
std::shared_ptr< Reset< Time > > Circuits::Converter< Time >::ToReset ( const std::shared_ptr< IOperation< Time > > & operation)
inlinestatic

Converts a smart pointer to the IOperation interface/base class to a smart pointer to the Reset class.

Parameters
operationThe operation.
Returns
The smart pointer to the Reset class or a null pointer if the conversion is not possible.

Definition at line 145 of file Converter.h.

◆ ToSingleQubitGate()

template<typename Time = Types::time_type>
std::shared_ptr< SingleQubitGate< Time > > Circuits::Converter< Time >::ToSingleQubitGate ( const std::shared_ptr< IOperation< Time > > & operation)
inlinestatic

Converts a smart pointer to the IOperation interface/base class to a smart pointer to the SingleQubitGate class.

Parameters
operationThe operation.
Returns
The smart pointer to the SingleQubitGate class or a null pointer if the conversion is not possible.

Definition at line 76 of file Converter.h.

◆ ToThreeQubitsGate()

template<typename Time = Types::time_type>
std::shared_ptr< ThreeQubitsGate< Time > > Circuits::Converter< Time >::ToThreeQubitsGate ( const std::shared_ptr< IOperation< Time > > & operation)
inlinestatic

Converts a smart pointer to the IOperation interface/base class to a smart pointer to the ThreeQubitsGate class.

Parameters
operationThe operation.
Returns
The smart pointer to the ThreeQubitsGate class or a null pointer if the conversion is not possible.

Definition at line 110 of file Converter.h.

◆ ToTwoQubitsGate()

template<typename Time = Types::time_type>
std::shared_ptr< TwoQubitsGate< Time > > Circuits::Converter< Time >::ToTwoQubitsGate ( const std::shared_ptr< IOperation< Time > > & operation)
inlinestatic

Converts a smart pointer to the IOperation interface/base class to a smart pointer to the TwoQubitsGate class.

Parameters
operationThe operation.
Returns
The smart pointer to the TwoQubitsGate class or a null pointer if the conversion is not possible.

Definition at line 93 of file Converter.h.


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