Maestro 0.3.11
Unified interface for quantum circuit simulation
Loading...
Searching...
No Matches
Network::Configuration< Time > Class Template Reference

#include <Configuration.h>

Inheritance diagram for Network::Configuration< Time >:
Collaboration diagram for Network::Configuration< Time >:

Public Member Functions

 Configuration ()=default
 The constructor.
 Configuration (Configuration &&)=default
 The move constructor.
 Configuration (const Configuration &)=default
 The copy constructor.
virtual ~Configuration ()=default
 The destructor.
void ApplyConfigurationFromNetwork (const std::shared_ptr< INetwork< Time > > &network)
void ApplyConfigurationFromSimulator (const std::shared_ptr< Simulators::IState > &simulator)
void ApplyConfigurationToNetwork (const std::shared_ptr< INetwork< Time > > &network) const
void ApplyConfigurationToSimulator (const std::shared_ptr< Simulators::IState > &simulator) const
bool CanBeAppliedOnInitializedSimulator (const std::string &key) const
const std::unordered_map< std::string, std::string > & GetConfigMap () const
std::string GetConfiguration (const std::string &key) const
 Get a configuration value.
double GetConfigurationAsDouble (const std::string &key) const
long long int GetConfigurationAsInt (const std::string &key) const
bool IsSet (const std::string &key) const
 Check if a configuration value is set.
Configuration & operator= (Configuration &&)=default
 The move assignment operator.
Configuration & operator= (const Configuration &)=default
 The copy assignment operator.
void SetConfiguration (const std::string &key, const std::string &value)
 Set a configuration value.
void SetConfiguration (const std::string &key, double value)
void SetConfiguration (const std::string &key, long long int value)
void SetSimulatorConfiguration (const Simulators::Configuration &config)
bool WasApplied (const std::string &key, const std::string &value) const

Detailed Description

template<typename Time = Types::time_type>
class Network::Configuration< Time >

Definition at line 21 of file Network/Configuration.h.

Constructor & Destructor Documentation

◆ Configuration() [1/3]

template<typename Time = Types::time_type>
Network::Configuration< Time >::Configuration ( )
default

The constructor.

The constructor for the simulator configuration.

Referenced by Configuration(), Configuration(), operator=(), and operator=().

◆ ~Configuration()

template<typename Time = Types::time_type>
virtual Network::Configuration< Time >::~Configuration ( )
virtualdefault

The destructor.

The destructor for the simulator configuration.

◆ Configuration() [2/3]

template<typename Time = Types::time_type>
Network::Configuration< Time >::Configuration ( const Configuration< Time > & )
default

The copy constructor.

The copy constructor for the simulator configuration.

References Configuration().

◆ Configuration() [3/3]

template<typename Time = Types::time_type>
Network::Configuration< Time >::Configuration ( Configuration< Time > && )
default

The move constructor.

The move constructor for the simulator configuration.

References Configuration().

Member Function Documentation

◆ ApplyConfigurationFromNetwork()

template<typename Time = Types::time_type>
void Network::Configuration< Time >::ApplyConfigurationFromNetwork ( const std::shared_ptr< INetwork< Time > > & network)
inline

Definition at line 145 of file Network/Configuration.h.

◆ ApplyConfigurationFromSimulator()

template<typename Time = Types::time_type>
void Network::Configuration< Time >::ApplyConfigurationFromSimulator ( const std::shared_ptr< Simulators::IState > & simulator)
inline

Definition at line 140 of file Network/Configuration.h.

◆ ApplyConfigurationToNetwork()

template<typename Time = Types::time_type>
void Network::Configuration< Time >::ApplyConfigurationToNetwork ( const std::shared_ptr< INetwork< Time > > & network) const
inline

Definition at line 152 of file Network/Configuration.h.

◆ ApplyConfigurationToSimulator()

template<typename Time = Types::time_type>
void Network::Configuration< Time >::ApplyConfigurationToSimulator ( const std::shared_ptr< Simulators::IState > & simulator) const
inline

Definition at line 135 of file Network/Configuration.h.

◆ CanBeAppliedOnInitializedSimulator()

template<typename Time = Types::time_type>
bool Network::Configuration< Time >::CanBeAppliedOnInitializedSimulator ( const std::string & key) const
inline

Definition at line 125 of file Network/Configuration.h.

◆ GetConfigMap()

template<typename Time = Types::time_type>
const std::unordered_map< std::string, std::string > & Network::Configuration< Time >::GetConfigMap ( ) const
inline

Definition at line 158 of file Network/Configuration.h.

◆ GetConfiguration()

template<typename Time = Types::time_type>
std::string Network::Configuration< Time >::GetConfiguration ( const std::string & key) const
inline

Get a configuration value.

Get a configuration value for the simulator.

Parameters
keyThe key of the configuration value.
Returns
The configuration value as a string.

Definition at line 110 of file Network/Configuration.h.

◆ GetConfigurationAsDouble()

template<typename Time = Types::time_type>
double Network::Configuration< Time >::GetConfigurationAsDouble ( const std::string & key) const
inline

Definition at line 120 of file Network/Configuration.h.

◆ GetConfigurationAsInt()

template<typename Time = Types::time_type>
long long int Network::Configuration< Time >::GetConfigurationAsInt ( const std::string & key) const
inline

Definition at line 115 of file Network/Configuration.h.

◆ IsSet()

template<typename Time = Types::time_type>
bool Network::Configuration< Time >::IsSet ( const std::string & key) const
inline

Check if a configuration value is set.

Check if a configuration value is set for the simulator.

Parameters
keyThe key of the configuration value.
Returns
True if the configuration value is set, false otherwise.

Definition at line 97 of file Network/Configuration.h.

◆ operator=() [1/2]

template<typename Time = Types::time_type>
Configuration & Network::Configuration< Time >::operator= ( Configuration< Time > && )
default

The move assignment operator.

The move assignment operator for the simulator configuration.

References Configuration().

◆ operator=() [2/2]

template<typename Time = Types::time_type>
Configuration & Network::Configuration< Time >::operator= ( const Configuration< Time > & )
default

The copy assignment operator.

The copy assignment operator for the simulator configuration.

References Configuration().

◆ SetConfiguration() [1/3]

template<typename Time = Types::time_type>
void Network::Configuration< Time >::SetConfiguration ( const std::string & key,
const std::string & value )
inline

Set a configuration value.

Set a configuration value for the simulator.

Parameters
keyThe key of the configuration value.
valueThe value of the configuration.

Definition at line 74 of file Network/Configuration.h.

◆ SetConfiguration() [2/3]

template<typename Time = Types::time_type>
void Network::Configuration< Time >::SetConfiguration ( const std::string & key,
double value )
inline

Definition at line 84 of file Network/Configuration.h.

◆ SetConfiguration() [3/3]

template<typename Time = Types::time_type>
void Network::Configuration< Time >::SetConfiguration ( const std::string & key,
long long int value )
inline

Definition at line 79 of file Network/Configuration.h.

◆ SetSimulatorConfiguration()

template<typename Time = Types::time_type>
void Network::Configuration< Time >::SetSimulatorConfiguration ( const Simulators::Configuration< Time > & config)
inline

Definition at line 130 of file Network/Configuration.h.

◆ WasApplied()

template<typename Time = Types::time_type>
bool Network::Configuration< Time >::WasApplied ( const std::string & key,
const std::string & value ) const
inline

Definition at line 163 of file Network/Configuration.h.


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