Skip to content

qevedo/openqasm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

openqasm

PyPI Version Build Status Dependency Status Python Version

An OPENQASM 2.0 parser for Python

Installation

pip install openqasm

Usage

from openqasm import Qasm

file_path = '/path/to/file.qasm'

# Parse the QASM file
qasm = Qasm(file_path)

# Get AST
ast = qasm.parse()

# Print the parsed QASM with precision=15
print(ast.qasm(15))

License

Apache 2.0