--- id: oqpy version: "0.3.10" license: Apache-2.0 license_treatment: permissive maintenance: active --- # oqpy — Generating OpenQASM 3 + OpenPulse in Python License: permissive · Maintenance: active · Downloads: 163.7K/mo ## What it is and what it does OQpy is a Python library for programmatically generating OpenQASM 3 quantum programs with OpenPulse calibration support. It wraps the abstract syntax trees of both OpenQASM 3 and OpenPulse, allowing developers to write quantum circuits and pulse-level control definitions in Python rather than directly in OpenQASM text. The library depends on openpulse, numpy, and mypy-extensions, and is designed for quantum researchers and hardware engineers who need to specify both high-level quantum gates and low-level pulse implementations for near-term quantum processors. The package targets the intersection of quantum software development and hardware control, where users need to define not just what quantum operations to perform but exactly how those operations are implemented at the pulse level on specific hardware architectures. It supports explicit timing, classical logic, and hardware-specific calibration blocks, making it suitable for characterization experiments, pulse optimization, and hardware-aware quantum algorithm development. Use it for: - Define Ramsey interferometry and other qubit characterization experiments with precise pulse-level control. - Generate calibration definitions (defcal blocks) for quantum gates on specific hardware architectures. - Build quantum circuits that mix high-level gate definitions with low-level pulse waveform specifications. - Programmatically create OpenQASM 3 programs with classical control flow and variable delays. - Develop pulse-based quantum algorithms for superconducting qubit systems. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. OQpy generates OpenQASM 3 and OpenPulse programs in Python, providing a high-level interface to build quantum circuits with pulse-level control and calibration definitions. Yes. OQpy is actively maintained, has no known vulnerabilities, and fills a specific niche for developers working with OpenQASM 3 and pulse-level quantum control. The low install friction and permissive license make adoption straightforward. Install it if you need to generate OpenQASM 3 programs with pulse calibrations from Python; skip it if you only work with high-level quantum circuit abstractions. ## Install pip install oqpy uv add oqpy poetry add oqpy ## Installing oqpy Before you install: Low friction install with a pure-wheel distribution. Actively maintained with a recent release and no known vulnerabilities. Supports Python 3.8 through 3.14. License in practice: Apache-2.0 permissive license allows commercial and private use with minimal restrictions, typical for open-source scientific software. Quickstart: pip install oqpy import oqpy prog = oqpy.Program() qubit = oqpy.PhysicalQubits[0] prog.reset(qubit).gate(qubit, "x90").measure(qubit) print(prog.to_qasm()) Requires Python 3.8 or greater; openpulse and numpy must be available at runtime. Verify before relying: - Whether the package includes comprehensive documentation or tutorials beyond the example in the README. - Performance characteristics when generating large or complex quantum programs. - Stability of the API across minor versions (currently at 0.3.10). ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 163.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags openqasm 3 python generator, quantum circuit pulse control, openpulse programming library, quantum calibration definitions, openqasm dsl python, quantum hardware control, pulse-level quantum programming, quantum-computing, openqasm, pulse-control [View on SkillFed](https://skillfed.io/packages/oqpy) · [View on PyPI](https://pypi.org/project/oqpy/)