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

Public Member Functions

 QasmSemanticChecker (const char *qasm_str_input)
 
 QasmSemanticChecker (FILE *qasm_file)
 
int parseResult () const
 
const compiler::QasmRepresentationgetQasmRepresentation () const
 

Protected Member Functions

int doChecks ()
 
void checkQubits (compiler::Operation &op, int &result, int linenumber)
 
int checkQubitList (const compiler::Qubits &qubits, int linenumber) const
 
int checkQubitListLength (const compiler::Qubits &qubits1, const compiler::Qubits &qubits2, int linenumber) const
 
int checkUnitaryGate (const compiler::Operation &op, int linenumber) const
 
int checkSingleQubit (const compiler::Operation &op, int linenumber) const
 
int checkWaitDisplayNot (const compiler::Operation &op, int linenumber) const
 
int checkResetAveraging (const compiler::Operation &op, int linenumber) const
 
int checkMeasureAll (const compiler::Operation &op, int linenumber) const
 
int checkToffoli (const compiler::Operation &op, int linenumber) const
 
int checkTwoQubits (const compiler::Operation &op, int linenumber) const
 
int checkMeasureParity (const compiler::Operation &op, int linenumber) const
 

Protected Attributes

compiler::QasmRepresentation qasm_
 
size_t maxNumQubit_
 
int parse_result_
 

Detailed Description

Definition at line 16 of file qasm_semantic.hpp.

#include <qasm_semantic.hpp>

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

Constructor & Destructor Documentation

◆ QasmSemanticChecker() [1/2]

compiler::QasmSemanticChecker::QasmSemanticChecker ( const char *  qasm_str_input)
inline

Definition at line 19 of file qasm_semantic.hpp.

◆ QasmSemanticChecker() [2/2]

compiler::QasmSemanticChecker::QasmSemanticChecker ( FILE *  qasm_file)
inline

Definition at line 30 of file qasm_semantic.hpp.

Member Function Documentation

◆ parseResult()

int compiler::QasmSemanticChecker::parseResult ( ) const
inline

Definition at line 41 of file qasm_semantic.hpp.

◆ getQasmRepresentation()

const compiler::QasmRepresentation& compiler::QasmSemanticChecker::getQasmRepresentation ( ) const
inline

Definition at line 46 of file qasm_semantic.hpp.

◆ doChecks()

int compiler::QasmSemanticChecker::doChecks ( )
inlineprotected

Definition at line 56 of file qasm_semantic.hpp.

◆ checkQubits()

void compiler::QasmSemanticChecker::checkQubits ( compiler::Operation op,
int &  result,
int  linenumber 
)
inlineprotected

Definition at line 85 of file qasm_semantic.hpp.

◆ checkQubitList()

int compiler::QasmSemanticChecker::checkQubitList ( const compiler::Qubits qubits,
int  linenumber 
) const
inlineprotected

Definition at line 133 of file qasm_semantic.hpp.

◆ checkQubitListLength()

int compiler::QasmSemanticChecker::checkQubitListLength ( const compiler::Qubits qubits1,
const compiler::Qubits qubits2,
int  linenumber 
) const
inlineprotected

Definition at line 143 of file qasm_semantic.hpp.

◆ checkUnitaryGate()

int compiler::QasmSemanticChecker::checkUnitaryGate ( const compiler::Operation op,
int  linenumber 
) const
inlineprotected

Definition at line 158 of file qasm_semantic.hpp.

◆ checkSingleQubit()

int compiler::QasmSemanticChecker::checkSingleQubit ( const compiler::Operation op,
int  linenumber 
) const
inlineprotected

Definition at line 173 of file qasm_semantic.hpp.

◆ checkWaitDisplayNot()

int compiler::QasmSemanticChecker::checkWaitDisplayNot ( const compiler::Operation op,
int  linenumber 
) const
inlineprotected

Definition at line 178 of file qasm_semantic.hpp.

◆ checkResetAveraging()

int compiler::QasmSemanticChecker::checkResetAveraging ( const compiler::Operation op,
int  linenumber 
) const
inlineprotected

Definition at line 185 of file qasm_semantic.hpp.

◆ checkMeasureAll()

int compiler::QasmSemanticChecker::checkMeasureAll ( const compiler::Operation op,
int  linenumber 
) const
inlineprotected

Definition at line 195 of file qasm_semantic.hpp.

◆ checkToffoli()

int compiler::QasmSemanticChecker::checkToffoli ( const compiler::Operation op,
int  linenumber 
) const
inlineprotected

Definition at line 202 of file qasm_semantic.hpp.

◆ checkTwoQubits()

int compiler::QasmSemanticChecker::checkTwoQubits ( const compiler::Operation op,
int  linenumber 
) const
inlineprotected

Definition at line 221 of file qasm_semantic.hpp.

◆ checkMeasureParity()

int compiler::QasmSemanticChecker::checkMeasureParity ( const compiler::Operation op,
int  linenumber 
) const
inlineprotected

Definition at line 238 of file qasm_semantic.hpp.

Member Data Documentation

◆ qasm_

compiler::QasmRepresentation compiler::QasmSemanticChecker::qasm_
protected

Definition at line 52 of file qasm_semantic.hpp.

◆ maxNumQubit_

size_t compiler::QasmSemanticChecker::maxNumQubit_
protected

Definition at line 53 of file qasm_semantic.hpp.

◆ parse_result_

int compiler::QasmSemanticChecker::parse_result_
protected

Definition at line 54 of file qasm_semantic.hpp.


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