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/openqasm: Quantum assembly language for extended quantum circuits

BranchesTags
Open more actions menu

Latest commit

 

History

1,509 Commits
1,509 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
ast_releasenotes/releasenotes
ast_releasenotes/releasenotes
 
 
examples
examples
 
 
releasenotes/notes
releasenotes/notes
 
 
source
source
 
 
spec_releasenotes/releasenotes
spec_releasenotes/releasenotes
 
 
.gitignore
.gitignore
 
 
.pylintrc
.pylintrc
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
WG.md
WG.md
 
 
ast_release.md
ast_release.md
 
 
buildPublishable.sh
buildPublishable.sh
 
 
constraints.txt
constraints.txt
 
 
contributors.md
contributors.md
 
 
convert2pdf.py
convert2pdf.py
 
 
convert2svg.py
convert2svg.py
 
 
governance.md
governance.md
 
 
implementations.md
implementations.md
 
 
make.bat
make.bat
 
 
requirements.txt
requirements.txt
 
 
tsc_statements_of_intent.md
tsc_statements_of_intent.md
 
 

Repository files navigation

OpenQASM

OpenQASM is an imperative programming language for describing quantum circuits. It is capable of describing universal quantum computing using the circuit model, measurement-based model, and near-term quantum computing experiments.

This repo contains the OpenQASM specification, examples, and tools for the OpenQASM intermediate representation.

OpenQASM started as a Qiskit project

‼️ Call for Applicants for TSC Secretary! ‼️

We are searching for candidates for the role of TSC Secretary. The TSC will select a new Secretary during a TSC meeting in November, 2025. Candidates should familiarize themselves with the responsibilties of the role. If you are interested in presenting yourself as a candidate, please contact Jack Woehr, the current Secretary, at [email protected] before November, 2025.

Current version: 3.1

  • Live language specification version 3.1

  • The branch of this repository for the previous version: OpenQASM 2.0

About this project

In this repository, you'll find all the documentation related to OpenQASM, some useful OpenQASM examples, and a reference grammar.

Language specs

The live language documentation specification.

Implementations

See this list of software that implements or supports OpenQASM 3.

Examples

An example of OpenQASM 3.0 source code is given below. Several more examples may be found in the examples folder.

/*
 * Repeat-until-success circuit for Rz(theta),
 * cos(theta-pi)=3/5, from Nielsen and Chuang, Chapter 4.
 */
OPENQASM 3;
include "stdgates.inc";

/*
 * Applies identity if out is 01, 10, or 11 and a Z-rotation by
 * theta + pi where cos(theta)=3/5 if out is 00.
 * The 00 outcome occurs with probability 5/8.
 */
def segment(qubit[2] anc, qubit psi) -> bit[2] {
  bit[2] b;
  reset anc;
  h anc;
  ccx anc[0], anc[1], psi;
  s psi;
  ccx anc[0], anc[1], psi;
  z psi;
  h anc;
  measure anc -> b;
  return b;
}

qubit input;
qubit[2] ancilla;
bit[2] flags = "11";
bit output;

reset input;
h input;

// braces are optional in this case
while(int(flags) != 0) {
  flags = segment ancilla, input;
}
rz(pi - arccos(3 / 5)) input;
h input;
output = measure input;  // should get zero

Citation format

For research papers, we encourage authors to reference.

  • [Version 3.0] Andrew W. Cross, Ali Javadi-Abhari, Thomas Alexander, Niel de Beaudrap, Lev S. Bishop, Steven Heidel, Colm A. Ryan, John Smolin, Jay M. Gambetta, Blake R. Johnson "OpenQASM 3: A broader and deeper quantum assembly language" [arxiv:2104.14722].
  • [Previous Version: 2.0] Andrew W. Cross, Lev S. Bishop, John A. Smolin, Jay M. Gambetta "Open Quantum Assembly Language" [arXiv:1707.03429].

Governance

The OpenQASM project has a process for accepting changes to the language and making decisions codified in its governance model.

License

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

Contributing

If you'd like to help please take a look to our contribution guidelines. This project adheres to a Code of Conduct. By participating, you are expected to uphold this code.

Release Notes

See the section on Release Notes contribution guidelines.

About

Quantum assembly language for extended quantum circuits

openqasm.com

Topics

openqasmquantum-computingquantum-information

Resources

Readme
Apache-2.0 license

Code of conduct

Code of conduct

Contributing

Contributing
Activity
Custom properties

Stars

1.5k stars

Watchers

84 watching

Forks

369 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402775 — 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.