Skip to content
Gate and operation specification for quantum circuits
Branch: master
Clone or download
Latest commit 7967c67 Feb 24, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
benchmarks Update README.md (#43) Dec 21, 2018
examples Update README.md Feb 24, 2019
spec-human Conformance tests and contributing section (#18) Sep 20, 2017
spec
templates Conformance tests and contributing section (#18) Sep 20, 2017
test Conformance tests and contributing section (#18) Sep 20, 2017
.gitignore
.pylintrc
LICENSE
Makefile
README.md Minor fixes and updates in documentation related to names, links, etc. ( Nov 5, 2018
contributing.md Minor fixes and updates in documentation related to names, links, etc. ( Nov 5, 2018
requires.txt

README.md

OpenQASM

Specs, examples and tools for the OpenQASM intermediate representation.

Current version

The latest version is: 2.0.

About this project

On this repository you'll find all the documentation related to OpenQASM and some useful OpenQASM examples.

Language specs

The language documentation is available here.

Examples

The examples can be found under the examples folder.

They are OpenQASM files, i.e.:

// Repetition code syndrome measurement
OPENQASM 2.0;
include "qelib1.inc";
qreg q[3];
qreg a[2];
creg c[3];
creg syn[2];
gate syndrome d1,d2,d3,a1,a2
{
  cx d1,a1; cx d2,a1;
  cx d2,a2; cx d3,a2;
}
x q[0]; // error
barrier q;
syndrome q[0],q[1],q[2],a[0],a[1];
measure a -> syn;
if(syn==1) x q[0];
if(syn==2) x q[2];
if(syn==3) x q[1];
measure q -> c;

Tests

The official OpenQASM conformance test suite is included in this repo.

Authors (alphabetical)

Lev S. Bishop, Antonio Córcoles, Andrew W. Cross, Jay M. Gambetta, Jesús Pérez and John A. Smolin.

Anyone who contributes to this project can include their name here.

Citation format

For research papers, we encourage authors to reference.

  • Andrew W. Cross, Lev S. Bishop, John A. Smolin, Jay M. Gambetta "Open Quantum Assembly Language" [arXiv:1707.03429].

Other Qiskit projects

License

This project is licensed under the Apache License 2.0 - see the [LICENSE] file for details.

Acknowledgments

Contributing

If you'd like to help please take a look to our contribution guidelines.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.