Maestro 0.3.1
Unified interface for quantum circuit simulation
Loading...
Searching...
No Matches
qasm::QasmToCirc< Time > Class Template Reference

#include <QasmCirc.h>

Collaboration diagram for qasm::QasmToCirc< Time >:

Public Member Functions

void clear ()
bool Failed () const
const std::vector< std::string > & GetComments () const
const std::string & GetErrorMessage () const
const std::vector< std::string > & GetIncludes () const
const std::vector< std::string > & GetInputs () const
double GetVersion () const
std::shared_ptr< Circuits::Circuit< Time > > ParseAndTranslate (const std::string &qasmInputStr)
std::shared_ptr< Circuits::Circuit< Time > > ParseAndTranslateWithParams (const std::string &qasmInputStr, const std::unordered_map< std::string, double > &params={})

Protected Member Functions

std::shared_ptr< Circuits::Circuit< Time > > ParseAndTranslateImpl (std::string &qasmInput)

Protected Attributes

bool error = false
std::string errorMessage
qasm::QasmGrammar grammar
qasm::Program program

Detailed Description

template<typename Time = Types::time_type>
class qasm::QasmToCirc< Time >

Definition at line 21 of file QasmCirc.h.

Member Function Documentation

◆ clear()

template<typename Time = Types::time_type>
void qasm::QasmToCirc< Time >::clear ( )
inline

Definition at line 23 of file QasmCirc.h.

References error, errorMessage, grammar, and program.

Referenced by ParseAndTranslate().

◆ Failed()

template<typename Time = Types::time_type>
bool qasm::QasmToCirc< Time >::Failed ( ) const
inline

Definition at line 53 of file QasmCirc.h.

References error.

Referenced by SimpleEstimate(), and SimpleExecute().

◆ GetComments()

template<typename Time = Types::time_type>
const std::vector< std::string > & qasm::QasmToCirc< Time >::GetComments ( ) const
inline

Definition at line 59 of file QasmCirc.h.

References program.

◆ GetErrorMessage()

template<typename Time = Types::time_type>
const std::string & qasm::QasmToCirc< Time >::GetErrorMessage ( ) const
inline

Definition at line 55 of file QasmCirc.h.

References errorMessage.

◆ GetIncludes()

template<typename Time = Types::time_type>
const std::vector< std::string > & qasm::QasmToCirc< Time >::GetIncludes ( ) const
inline

Definition at line 63 of file QasmCirc.h.

References program.

◆ GetInputs()

template<typename Time = Types::time_type>
const std::vector< std::string > & qasm::QasmToCirc< Time >::GetInputs ( ) const
inline

Definition at line 70 of file QasmCirc.h.

References grammar.

◆ GetVersion()

template<typename Time = Types::time_type>
double qasm::QasmToCirc< Time >::GetVersion ( ) const
inline

Definition at line 57 of file QasmCirc.h.

References program.

◆ ParseAndTranslate()

template<typename Time = Types::time_type>
std::shared_ptr< Circuits::Circuit< Time > > qasm::QasmToCirc< Time >::ParseAndTranslate ( const std::string & qasmInputStr)
inline

◆ ParseAndTranslateImpl()

template<typename Time = Types::time_type>
std::shared_ptr< Circuits::Circuit< Time > > qasm::QasmToCirc< Time >::ParseAndTranslateImpl ( std::string & qasmInput)
inlineprotected

Definition at line 75 of file QasmCirc.h.

References error, errorMessage, grammar, and program.

Referenced by ParseAndTranslate().

◆ ParseAndTranslateWithParams()

template<typename Time = Types::time_type>
std::shared_ptr< Circuits::Circuit< Time > > qasm::QasmToCirc< Time >::ParseAndTranslateWithParams ( const std::string & qasmInputStr,
const std::unordered_map< std::string, double > & params = {} )
inline

Definition at line 32 of file QasmCirc.h.

Member Data Documentation

◆ error

template<typename Time = Types::time_type>
bool qasm::QasmToCirc< Time >::error = false
protected

Definition at line 107 of file QasmCirc.h.

Referenced by clear(), Failed(), and ParseAndTranslateImpl().

◆ errorMessage

template<typename Time = Types::time_type>
std::string qasm::QasmToCirc< Time >::errorMessage
protected

Definition at line 106 of file QasmCirc.h.

Referenced by clear(), GetErrorMessage(), and ParseAndTranslateImpl().

◆ grammar

template<typename Time = Types::time_type>
qasm::QasmGrammar qasm::QasmToCirc< Time >::grammar
protected

Definition at line 104 of file QasmCirc.h.

Referenced by clear(), GetInputs(), and ParseAndTranslateImpl().

◆ program

template<typename Time = Types::time_type>
qasm::Program qasm::QasmToCirc< Time >::program
protected

Definition at line 105 of file QasmCirc.h.

Referenced by clear(), GetComments(), GetIncludes(), GetVersion(), and ParseAndTranslateImpl().


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