Module openqasm

Source
Expand description

All the openqasm specific code

Modules§

semantic_analysis
The code which performs semantic analyzis on an AST according to the openqasm 2.0 specification.

Enums§

BasicOp
An enum containing only the “basic” operations which can be performed by an openqasm program. This is useful because unlike the Operation enum, this doesn’t contain custom gates which are more difficult to handle.
OpenQASMError
The different errors that can occur when parsing an openqasm program

Functions§

parse_openqasm
The most importan function exposed by the library. This function reads a file containing openqasm 2.0 code and parses it. If the file include statments they are replaced by the contents of the included file before being parsed.