Maestro 0.2.5
Unified interface for quantum circuit simulation
Loading...
Searching...
No Matches
qasm::Program Struct Reference

#include <SyntaxTree.h>

+ Collaboration diagram for qasm::Program:

Public Member Functions

 Program (const ProgramType &program={})
 
void clear ()
 
template<typename Time = Types::time_type>
std::shared_ptr< Circuits::Circuit< Time > > ToCircuit (std::unordered_map< std::string, StatementType > &opaqueGates, std::unordered_map< std::string, StatementType > &definedGates) const
 

Static Public Member Functions

template<typename Time = Types::time_type>
static void AddToCircuit (const std::shared_ptr< Circuits::Circuit< Time > > &circuit, const StatementType &stmt, std::unordered_map< std::string, StatementType > &opaqueGates, std::unordered_map< std::string, StatementType > &definedGates)
 

Public Attributes

std::vector< std::string > comments
 
std::vector< std::string > includes
 
std::vector< StatementTypestatements
 
double version = 2.0
 

Detailed Description

Definition at line 558 of file SyntaxTree.h.

Constructor & Destructor Documentation

◆ Program()

qasm::Program::Program ( const ProgramType program = {})
inline

Definition at line 564 of file SyntaxTree.h.

Member Function Documentation

◆ AddToCircuit()

◆ clear()

void qasm::Program::clear ( )
inline

Definition at line 571 of file SyntaxTree.h.

References comments, includes, statements, and version.

Referenced by qasm::QasmToCirc< Time >::clear().

◆ ToCircuit()

template<typename Time = Types::time_type>
std::shared_ptr< Circuits::Circuit< Time > > qasm::Program::ToCircuit ( std::unordered_map< std::string, StatementType > &  opaqueGates,
std::unordered_map< std::string, StatementType > &  definedGates 
) const
inline

Definition at line 579 of file SyntaxTree.h.

References AddToCircuit(), and statements.

Referenced by qasm::QasmToCirc< Time >::ParseAndTranslate().

Member Data Documentation

◆ comments

std::vector<std::string> qasm::Program::comments

Definition at line 561 of file SyntaxTree.h.

Referenced by clear(), and qasm::QasmToCirc< Time >::GetComments().

◆ includes

std::vector<std::string> qasm::Program::includes

Definition at line 562 of file SyntaxTree.h.

Referenced by clear(), and qasm::QasmToCirc< Time >::GetIncludes().

◆ statements

std::vector<StatementType> qasm::Program::statements

Definition at line 560 of file SyntaxTree.h.

Referenced by clear(), and ToCircuit().

◆ version

double qasm::Program::version = 2.0

Definition at line 559 of file SyntaxTree.h.

Referenced by clear(), and qasm::QasmToCirc< Time >::GetVersion().


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