{"id":21375256,"url":"https://github.com/qbraid/qbraid","last_synced_at":"2026-01-17T16:29:16.532Z","repository":{"id":166184268,"uuid":"207883669","full_name":"qBraid/qBraid","owner":"qBraid","description":"A platform-agnostic quantum runtime framework","archived":false,"fork":false,"pushed_at":"2026-01-10T21:36:15.000Z","size":42828,"stargazers_count":106,"open_issues_count":40,"forks_count":53,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-01-11T06:36:16.818Z","etag":null,"topics":["openqasm","python","qbraid","qir","quantum","quantum-computing","runtime","rustworkx","transpiler"],"latest_commit_sha":null,"homepage":"https://docs.qbraid.com/sdk","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/qBraid.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-09-11T18:49:15.000Z","updated_at":"2026-01-10T21:36:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"c5975bd7-51e0-4660-8503-2ceb4a995a63","html_url":"https://github.com/qBraid/qBraid","commit_stats":null,"previous_names":[],"tags_count":45,"template":false,"template_full_name":null,"purl":"pkg:github/qBraid/qBraid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qBraid%2FqBraid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qBraid%2FqBraid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qBraid%2FqBraid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qBraid%2FqBraid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qBraid","download_url":"https://codeload.github.com/qBraid/qBraid/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qBraid%2FqBraid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28302995,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T11:18:18.743Z","status":"ssl_error","status_checked_at":"2026-01-11T11:07:56.842Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","python","qbraid","qir","quantum","quantum-computing","runtime","rustworkx","transpiler"],"created_at":"2024-11-22T09:09:31.795Z","updated_at":"2026-01-17T16:29:16.518Z","avatar_url":"https://github.com/qBraid.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg width=full alt=\"qbraid-sdk-header\" src=\"https://user-images.githubusercontent.com/46977852/224456452-605e51f2-193d-4789-863e-e51cdd4b0a54.png\"\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/qBraid/qBraid/actions/workflows/main.yml\"\u003e\n    \u003cimg src=\"https://github.com/qBraid/qBraid/actions/workflows/main.yml/badge.svg?branch=main\" alt=\"CI\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://codecov.io/gh/qBraid/qBraid\"\u003e\n    \u003cimg src=\"https://codecov.io/gh/qBraid/qBraid/branch/main/graph/badge.svg?token=1UTM0XZB7A\" alt=\"codecov\"/\u003e\n  \u003c/a\u003e\n  \u003ca href='https://sdk.qbraid.com/qBraid/'\u003e\n    \u003cimg src='https://img.shields.io/github/actions/workflow/status/qBraid/qBraid/gh-pages.yml?label=docs' alt='GitHub Pages'/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://pypi.org/project/qbraid/\"\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/v/qbraid.svg?color=blue\" alt=\"PyPI version\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://pepy.tech/project/qbraid\"\u003e\n    \u003cimg src=\"https://static.pepy.tech/badge/qbraid\" alt=\"Downloads\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"http://www.apache.org/licenses/LICENSE-2.0\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/qBraid/qbraid.svg\" alt=\"License\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://doi.org/10.5281/zenodo.12627596\"\u003e\n    \u003cimg src=\"https://zenodo.org/badge/DOI/10.5281/zenodo.12627596.svg\" alt=\"DOI\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nThe qBraid-SDK is a platform-agnostic quantum runtime framework designed for both quantum software and hardware providers.\n\nThis Python-based tool streamlines the full lifecycle management of quantum jobs\u0026mdash;from defining program specifications to job submission and through to the post-processing and visualization of results. Unlike existing runtime frameworks that focus their automation and abstractions on quantum components, qBraid adds an extra layer of abstractions that considers the ultimate IR needed to encode the quantum program and securely submit it to a remote API. Notably, the qBraid-SDK does not adhere to a fixed circuit-building library, or quantum program representation. Instead, it empowers providers to dynamically register any desired input program type as the target based on their specific needs. This flexibility is extended by the framework’s modular pipeline, which facilitates any number of additional program validation, transpilation, and compilation steps.\n\nBy addressing the full scope of client-side software requirements necessary for secure submission and management of quantum jobs, the qBraid-SDK vastly reduces the overhead and redundancy typically associated with the development of internal pipelines and cross-platform integrations in quantum computing.\n\n[\u003cimg src=\"https://qbraid-static.s3.amazonaws.com/logos/Launch_on_qBraid_white.png\" width=\"150\"\u003e](https://account.qbraid.com?gitHubUrl=https://github.com/qBraid/qBraid.git)\n\n---\n\n![Runtime Diagram](https://qbraid-static.s3.amazonaws.com/qbraid-runtime.png)\n\n## Resources\n\n- [User Guide](https://docs.qbraid.com/sdk/user-guide/)\n- [API Reference](https://sdk.qbraid.com/qBraid/api/qbraid.html)\n- [Example Notebooks](https://github.com/qBraid/qbraid-lab-demo)\n\n## Installation \u0026 Setup\n\nFor the best experience, install the qBraid-SDK environment on [lab.qbraid.com](https://lab.qbraid.com). Login (or\n[create an account](https://account.qbraid.com)) and follow the steps to\n[install an environment](https://docs.qbraid.com/lab/user-guide/environments#install-environment). Using the SDK on [qBraid Lab](https://docs.qbraid.com/lab/user-guide/overview) means direct, pre-configured access to QPUs from IonQ, Oxford Quantum Circuits, QuEra, Rigetti, and IQM, as well as on-demand simulators from qBraid, AWS, IonQ, QuEra, and NEC. See [qBraid Quantum Jobs](https://docs.qbraid.com/lab/user-guide/quantum-jobs) and [pricing](https://docs.qbraid.com/home/pricing) for more.\n\n### Local install\n\nThe qBraid-SDK, and all of its dependencies, can be installed using pip:\n\n```bash\npip install qbraid\n```\n\nYou can also [install from source](CONTRIBUTING.md#installing-from-source) by cloning this repository and running a pip install command in the root directory of the repository:\n\n```bash\ngit clone https://github.com/qBraid/qBraid.git\ncd qBraid\npip install .\n```\n\n\u003e _Note:_ The qBraid-SDK requires Python 3.10 or greater.\n\nTo use [qBraid Runtime](https://docs.qbraid.com/sdk/user-guide/runtime) locally, you must also install the necessary extras and configure your account credentials according to the device(s) that you are targeting. Follow the linked, provider-specific, instructions for the [QbraidProvider](https://docs.qbraid.com/sdk/user-guide/runtime_native), [BraketProvider](https://docs.qbraid.com/sdk/user-guide/runtime_braket), [QiskitRuntimeProvider](https://docs.qbraid.com/sdk/user-guide/runtime_ibm), [IonQProvider](https://docs.qbraid.com/sdk/user-guide/runtime_ionq), [OQCProvider](https://docs.qbraid.com/sdk/user-guide/runtime_oqc), and [AzureQuantumProvider](https://docs.qbraid.com/sdk/user-guide/providers/azure), as applicable.\n\n## Quickstart\n\n### Check version\n\nYou can view the version of the qBraid-SDK you have installed and get detailed information about the installation within Python using the following commands:\n\n```python\nIn [1]: import qbraid\n\nIn [2]: qbraid.__version__\n\nIn [3]: qbraid.about()\n```\n\n### Transpiler\n\nGraph-based approach to quantum program type conversions.\n\nBelow, `QPROGRAM_REGISTRY` maps shorthand identifiers for supported quantum programs, each corresponding to a type in the typed `QPROGRAM` Union. For example, 'qiskit' maps to `qiskit.QuantumCircuit` in `QPROGRAM`. Notably, 'qasm2' and 'qasm3' both represent raw OpenQASM strings. This arrangement simplifies targeting and transpiling between different quantum programming frameworks.\n\n```python\n\u003e\u003e\u003e from qbraid import QPROGRAM_REGISTRY\n\u003e\u003e\u003e QPROGRAM_REGISTRY\n{'cirq': cirq.circuits.circuit.Circuit,\n 'qiskit': qiskit.circuit.quantumcircuit.QuantumCircuit,\n 'pennylane': pennylane.tape.tape.QuantumTape,\n 'pyquil': pyquil.quil.Program,\n 'pytket': pytket._tket.circuit.Circuit,\n 'braket': braket.circuits.circuit.Circuit,\n 'braket_ahs': braket.ahs.analog_hamiltonian_simulation.AnalogHamiltonianSimulation,\n 'openqasm3': openqasm3.ast.Program,\n 'pyqir': pyqir.Module,\n 'cpp_pyqubo': cpp_pyqubo.Model,\n 'qasm2': str,\n 'qasm3': str,\n 'qasm2_kirin': str,\n 'ionq': qbraid.programs.typer.IonQDict,\n 'qubo': qbraid.programs.typer.QuboCoefficientsDict,\n 'bloqade': bloqade.analog.builder.assign.BatchAssign,\n 'cudaq': cudaq.kernel.kernel_builder.PyKernel,\n 'qibo': qibo.models.circuit.Circuit,\n 'stim': stim._stim_sse2.Circuit,\n 'pulser': pulser.sequence.sequence.Sequence,\n 'pyqpanda3': pyqpanda3.core.QProg,\n 'autoqasm': autoqasm.program.program.Program}\n```\n\nPass any registered quantum program along with a target package from\n`QPROGRAM_REGISTRY` to \"transpile\" your circuit to a new program type:\n\n```python\n\u003e\u003e\u003e from qbraid import random_circuit, transpile\n\u003e\u003e\u003e qiskit_circuit = random_circuit(\"qiskit\")\n\u003e\u003e\u003e cirq_circuit = transpile(qiskit_circuit, \"cirq\")\n\u003e\u003e\u003e print(qiskit_circuit)\n          ┌────────────┐\nq_0: ──■──┤ Rx(3.0353) ├\n     ┌─┴─┐└───┬────┬───┘\nq_1: ┤ H ├────┤ √X ├────\n     └───┘    └────┘\n\u003e\u003e\u003e print(cirq_circuit)\n0: ───@───Rx(0.966π)───\n      │\n1: ───H───X^0.5────────\n```\n\nBehind the scenes, the qBraid-SDK uses [rustworkx](https://www.rustworkx.org/) to create a\ndirectional graph that maps all possible conversions between supported program types:\n\n```python\nfrom qbraid import ConversionGraph\n\n# Loads native conversions from QPROGRAM_REGISTRY\ngraph = ConversionGraph()\n\ngraph.plot(legend=True)\n```\n\n\u003cimg src=\"https://qbraid-static.s3.us-east-1.amazonaws.com/conversion-graph-0.9.7.png\" style=\"width: 65%;\"\u003e\n\nYou can use the native conversions supported by qBraid, or define your own. For [example](https://docs.qbraid.com/sdk/user-guide/transpiler#conversion-graph):\n\n```python\nfrom unittest.mock import Mock\n\nfrom qbraid import Conversion, register_program_type\n\n# replace with any program type\nregister_program_type(Mock, alias=\"mock\")\n\n# replace with your custom conversion function\nexample_qasm3_to_mock_func = lambda x: x\n\nconversion = Conversion(\"qasm3\", \"mock\", example_qasm3_to_mock_func)\n\ngraph.add_conversion(conversion)\n\n# using a seed is helpful to ensure reproducibility\ngraph.plot(seed=20, k=3, legend=True)\n```\n\n### QbraidProvider\n\nRun experiments using on-demand simulators provided by qBraid. Retrieve a list of available devices:\n\n```python\nfrom qbraid import QbraidProvider\n\nprovider = QbraidProvider()\ndevices = provider.get_devices()\n```\n\nOr, instantiate a known device by ID and submit quantum jobs from any supported program type:\n\n```python\ndevice = provider.get_device(\"qbraid_qir_simulator\")\njobs = device.run([qiskit_circuit, braket_circuit, cirq_circuit, qasm3_str], shots=1000)\n\nresults = [job.result() for job in jobs]\nbatch_counts = [result.data.get_counts() for result in results]\n\nprint(batch_counts[0])\n# {'00': 483, '01': 14, '10': 486, '11': 17}\n```\n\nAnd visualize the results:\n\n```python\nfrom qbraid.visualization import plot_distribution, plot_histogram\n\nplot_distribution(batch_counts)\n\nplot_histogram(batch_counts)\n```\n\n## Get Involved\n\n[![Community](https://img.shields.io/badge/Community-DF0982)](https://github.com/qBraid/community)\n[![GitHub Issues](https://img.shields.io/badge/issue_tracking-github-blue?logo=github)](https://github.com/qBraid/qBraid/issues)\n[![Stack Exchange](https://img.shields.io/badge/StackExchange-qbraid-orange?logo=stackexchange)](https://quantumcomputing.stackexchange.com/questions/tagged/qbraid)\n[![Discord](https://img.shields.io/badge/Discord-%235865F2.svg?logo=discord\u0026logoColor=white)](https://discord.gg/TPBU2sa8Et)\n\n- Interested in contributing code, or making a PR? See\n  [CONTRIBUTING.md](CONTRIBUTING.md)\n- For feature requests and bug reports:\n  [Submit an issue](https://github.com/qBraid/qBraid/issues)\n- For discussions, and specific questions about the qBraid-SDK [join our discord community](https://discord.gg/TPBU2sa8Et)\n- For questions that are more suited for a forum, post to [QCSE](https://quantumcomputing.stackexchange.com/) with the [`qbraid`](https://quantumcomputing.stackexchange.com/questions/tagged/qbraid) tag.\n\n## Launch on qBraid\n\nThe \"Launch on qBraid\" button (top) can be added to any public GitHub\nrepository. Clicking on it automatically opens qBraid Lab, and performs a\n`git clone` of the project repo into your account's home directory. Copy the\ncode below, and replace `YOUR-USERNAME` and `YOUR-REPOSITORY` with your GitHub\ninfo.\n\nUse the badge in your project's `README.md`:\n\n```markdown\n[\u003cimg src=\"https://qbraid-static.s3.amazonaws.com/logos/Launch_on_qBraid_white.png\" width=\"150\"\u003e](https://account.qbraid.com?gitHubUrl=https://github.com/YOUR-USERNAME/YOUR-REPOSITORY.git)\n```\n\nUse the badge in your project's `README.rst`:\n\n```rst\n.. image:: https://qbraid-static.s3.amazonaws.com/logos/Launch_on_qBraid_white.png\n    :target: https://account.qbraid.com?gitHubUrl=https://github.com/YOUR-USERNAME/YOUR-REPOSITORY.git\n    :width: 150px\n```\n\n## License\n\n[Apache-2.0 License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqbraid%2Fqbraid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqbraid%2Fqbraid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqbraid%2Fqbraid/lists"}