GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - openqasm/openpulse-python: Reference Python package to work with OpenPulse

BranchesTags
Open more actions menu

Latest commit

 

History

73 Commits
73 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
source
source
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

OpenPulse Python Parser Reference Implementation

This project is a reference implementation of OpenPulse. Specifically, the parser passes the body of cal and defcal written in OpenPulse. It reuses the classical types and statements from openqasm3.

Developing openpulse

To install dependencies, change to source/openpulse directory and run:

python -m pip install -r requirements.txt -r requirements-dev.txt

To reuse classic statements/types, OpenPulse grammar imports OpenQASM grammar. When we update the OpenPulse grammar, we also need to copy the latest OpenQASM grammar from https://github.com/openqasm/openqasm/tree/main/source/grammar into the source/grammar directory.

Now build the openpulse grammar. Change to the source/grammar directory and run:

antlr4 -o ../openpulse/openpulse/_antlr/_<major>_<minor> -Dlanguage=Python3 -visitor openpulseLexer.g4 openpulseParser.g4

Finally, you can change to the source/openpulse directory and run:

pytest .

Deployment procedure

The deployment is primarily managed by a GitHub Actions pipeline, triggered by a tag of the form v<version>. For example, for package version 0.4.0, the tag should be v0.4.0.

To deploy:

  1. create a PR that sets the version number of the package in __init__.py to what it should be.
  2. once the PR has merged, tag the merge commit (for example, git fetch origin; git tag -m "Python AST 0.4.0" v0.4.0 origin/main).
  3. push the tag to this repository (for example, git push origin v0.4.0).

At this point, the deployment pipeline will take over and deploy the package to PyPI. You should be able to see the progress in the Actions tab of this repository.

About

Reference Python package to work with OpenPulse

Resources

Readme
Apache-2.0 license

Code of conduct

Code of conduct

Contributing

Contributing
Activity
Custom properties

Stars

6 stars

Watchers

7 watching

Forks

10 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.