mqt.qudits.quantum_circuit.qasm¶

Module Contents¶

class QASM[source]¶

Class that manages the parsing of QASM programs

parse_nonspecial_lines(line, rgxs, in_comment_flag)[source]¶
parse_qreg(line, rgxs, sitemap) bool[source]¶
parse_creg(line, rgxs, sitemap_classic) bool[source]¶
safe_eval_math_expression(expression)[source]¶
parse_gate(line, rgxs, sitemap, gates) bool[source]¶
parse_ignore(line, rgxs, warned) bool[source]¶
parse_ditqasm2_str(contents)[source]¶

Parse the string contents of an OpenQASM 2.0 file. This parser only supports basic gate_matrix definitions, and is not guaranteed to check the full openqasm grammar.

parse_ditqasm2_file(fname)[source]¶

Parse an OpenQASM 2.0 file.