libqasm
library for handling cQASM files
Public Member Functions | Protected Attributes | List of all members
compiler::QasmRepresentation Class Reference

Public Member Functions

 QasmRepresentation ()
 
void qubitRegister (int participating_number)
 
int numQubits ()
 
double versionNumber () const
 
void versionNumber (double version)
 
SubCircuitsgetSubCircuits ()
 
void addMappings (std::string name_key, NumericalIdentifiers indices, bool isQubit)
 
const NumericalIdentifiersgetMappedIndices (std::string name_key, bool isQubit, int linenumber) const
 
void setErrorModel (std::string error_model_type, std::vector< double > error_model_num_params)
 
const std::string getErrorModelType () const
 
std::vector< double > getErrorModelParameters () const
 
void printMappings () const
 
void printErrorModel () const
 

Protected Attributes

SubCircuits subcircuits_
 
int qubit_register_
 
double version_number_
 
std::map< std::string, std::pair< NumericalIdentifiers, bool > > mappings_
 
std::pair< std::string, std::vector< double > > error_model_
 

Detailed Description

Definition at line 608 of file qasm_ast.hpp.

#include <qasm_ast.hpp>

Collaboration diagram for compiler::QasmRepresentation:
Collaboration graph
[legend]

Constructor & Destructor Documentation

◆ QasmRepresentation()

compiler::QasmRepresentation::QasmRepresentation ( )
inline

Definition at line 612 of file qasm_ast.hpp.

Member Function Documentation

◆ qubitRegister()

void compiler::QasmRepresentation::qubitRegister ( int  participating_number)
inline

Definition at line 618 of file qasm_ast.hpp.

◆ numQubits()

int compiler::QasmRepresentation::numQubits ( )
inline

Definition at line 623 of file qasm_ast.hpp.

◆ versionNumber() [1/2]

double compiler::QasmRepresentation::versionNumber ( ) const
inline

Definition at line 628 of file qasm_ast.hpp.

◆ versionNumber() [2/2]

void compiler::QasmRepresentation::versionNumber ( double  version)
inline

Definition at line 633 of file qasm_ast.hpp.

◆ getSubCircuits()

SubCircuits& compiler::QasmRepresentation::getSubCircuits ( )
inline

Definition at line 638 of file qasm_ast.hpp.

◆ addMappings()

void compiler::QasmRepresentation::addMappings ( std::string  name_key,
NumericalIdentifiers  indices,
bool  isQubit 
)
inline

Definition at line 643 of file qasm_ast.hpp.

◆ getMappedIndices()

const NumericalIdentifiers& compiler::QasmRepresentation::getMappedIndices ( std::string  name_key,
bool  isQubit,
int  linenumber 
) const
inline

Definition at line 652 of file qasm_ast.hpp.

◆ setErrorModel()

void compiler::QasmRepresentation::setErrorModel ( std::string  error_model_type,
std::vector< double >  error_model_num_params 
)
inline

Definition at line 665 of file qasm_ast.hpp.

◆ getErrorModelType()

const std::string compiler::QasmRepresentation::getErrorModelType ( ) const
inline

Definition at line 671 of file qasm_ast.hpp.

◆ getErrorModelParameters()

std::vector<double> compiler::QasmRepresentation::getErrorModelParameters ( ) const
inline

Definition at line 676 of file qasm_ast.hpp.

◆ printMappings()

void compiler::QasmRepresentation::printMappings ( ) const
inline

Definition at line 681 of file qasm_ast.hpp.

◆ printErrorModel()

void compiler::QasmRepresentation::printErrorModel ( ) const
inline

Definition at line 692 of file qasm_ast.hpp.

Member Data Documentation

◆ subcircuits_

SubCircuits compiler::QasmRepresentation::subcircuits_
protected

Definition at line 703 of file qasm_ast.hpp.

◆ qubit_register_

int compiler::QasmRepresentation::qubit_register_
protected

Definition at line 704 of file qasm_ast.hpp.

◆ version_number_

double compiler::QasmRepresentation::version_number_
protected

Definition at line 705 of file qasm_ast.hpp.

◆ mappings_

std::map< std::string , std::pair<NumericalIdentifiers,bool> > compiler::QasmRepresentation::mappings_
protected

Definition at line 706 of file qasm_ast.hpp.

◆ error_model_

std::pair< std::string, std::vector<double> > compiler::QasmRepresentation::error_model_
protected

Definition at line 707 of file qasm_ast.hpp.


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