{"id":13472449,"url":"https://github.com/openqasm/openqasm","last_synced_at":"2025-12-12T01:02:14.772Z","repository":{"id":37898884,"uuid":"83821737","full_name":"openqasm/openqasm","owner":"openqasm","description":"Quantum assembly language for extended quantum circuits","archived":false,"fork":false,"pushed_at":"2025-04-16T15:53:06.000Z","size":12316,"stargazers_count":1320,"open_issues_count":92,"forks_count":331,"subscribers_count":88,"default_branch":"main","last_synced_at":"2025-04-25T15:48:21.604Z","etag":null,"topics":["openqasm","quantum-computing","quantum-information"],"latest_commit_sha":null,"homepage":"https://openqasm.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openqasm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":"governance.md","roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-03-03T17:03:30.000Z","updated_at":"2025-04-22T00:53:38.000Z","dependencies_parsed_at":"2023-02-15T05:46:24.677Z","dependency_job_id":"53093bf5-cf4a-41a7-9ba5-e1841dcc6330","html_url":"https://github.com/openqasm/openqasm","commit_stats":null,"previous_names":["qiskit/openqasm"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openqasm%2Fopenqasm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openqasm%2Fopenqasm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openqasm%2Fopenqasm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openqasm%2Fopenqasm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openqasm","download_url":"https://codeload.github.com/openqasm/openqasm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253990468,"owners_count":21995774,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["openqasm","quantum-computing","quantum-information"],"created_at":"2024-07-31T16:00:54.739Z","updated_at":"2025-12-12T01:02:14.730Z","avatar_url":"https://github.com/openqasm.png","language":"Python","funding_links":[],"categories":["Python","Quantum Software Packages","Main"],"sub_categories":[],"readme":"# OpenQASM\n\nOpenQASM is an imperative programming language for describing quantum circuits. It is capable of\ndescribing universal quantum computing using the circuit model, measurement-based model,\nand near-term quantum computing experiments.\n\nThis repo contains the OpenQASM specification, examples, and tools for the OpenQASM intermediate representation.\n\nOpenQASM started as a [Qiskit project](https://qiskit.org)\n\n\n## :bangbang: Call for Applicants for TSC Secretary! :bangbang:\n\nWe are searching for candidates for the role of [TSC Secretary](governance.md#tsc-secretary).\nThe TSC will select a new Secretary during a TSC meeting in April, 2025.\nCandidates should familiarize themselves with the [responsibilties of the role](governance.md#tsc-secretary).\nIf you are interested in presenting yourself as a candidate, please contact Jack Woehr,\nthe current Secretary, at [jack.woehr@procern.com](mailto:jack.woehr@procern.com) before April, 2025.\n\n## Current version: **3.1**\n\n* Live language specification [**version 3.1**](https://openqasm.github.io/)\n\n* The branch of this repository for the previous version: [OpenQASM 2.0](https://github.com/openqasm/openqasm/tree/OpenQASM2.x)\n\n## About this project\n\nIn this repository, you'll find all the documentation related to OpenQASM, some useful OpenQASM examples, and a reference grammar.\n\n### Language specs\n\nThe live [language documentation](https://openqasm.github.io/) specification.\n\n### Implementations\n\nSee this [list of software that implements or supports OpenQASM 3](./implementations.md).\n\n### Examples\n\nAn example of OpenQASM 3.0 source code is given below. Several more examples may be found in the [examples folder](examples).\n\n```text\n/*\n * Repeat-until-success circuit for Rz(theta),\n * cos(theta-pi)=3/5, from Nielsen and Chuang, Chapter 4.\n */\nOPENQASM 3;\ninclude \"stdgates.inc\";\n\n/*\n * Applies identity if out is 01, 10, or 11 and a Z-rotation by\n * theta + pi where cos(theta)=3/5 if out is 00.\n * The 00 outcome occurs with probability 5/8.\n */\ndef segment qubit[2] anc, qubit psi -\u003e bit[2] {\n  bit[2] b;\n  reset anc;\n  h anc;\n  ccx anc[0], anc[1], psi;\n  s psi;\n  ccx anc[0], anc[1], psi;\n  z psi;\n  h anc;\n  measure anc -\u003e b;\n  return b;\n}\n\nqubit input;\nqubit[2] ancilla;\nbit[2] flags = \"11\";\nbit output;\n\nreset input;\nh input;\n\n// braces are optional in this case\nwhile(int(flags) != 0) {\n  flags = segment ancilla, input;\n}\nrz(pi - arccos(3 / 5)) input;\nh input;\noutput = measure input;  // should get zero\n```\n\n## Citation format\n\nFor research papers, we encourage authors to reference.\n\n* [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]](https://arxiv.org/abs/2104.14722).\n* [Previous Version: 2.0] Andrew W. Cross, Lev S. Bishop, John A. Smolin, Jay M. Gambetta \"Open Quantum Assembly Language\" [[arXiv:1707.03429]](https://arxiv.org/abs/1707.03429).\n\n## Governance\n\nThe OpenQASM project has a process for accepting changes to the language and making decisions codified in its [governance model](governance.md).\n\n## License\n\nThis project is licensed under the Apache License 2.0 - see the [LICENSE](./LICENSE) file for details.\n\n## Contributing\n\nIf you'd like to help please take a look to our [contribution guidelines](CONTRIBUTING.md). This project adheres to a [Code of Conduct](./CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.\n\n## Release Notes\n\nSee the section on Release Notes [contribution guidelines](CONTRIBUTING.md#release-notes).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenqasm%2Fopenqasm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenqasm%2Fopenqasm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenqasm%2Fopenqasm/lists"}