Qbraid

Latest version: v0.9.5

Safety actively analyzes 722491 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 4

2.0

include "qelib1.inc";
qreg q[3];
x q[0];
y q;
"""

print(qasm2_to_ionq(qasm_str))


outputs -

python
{'qubits': 3, 'circuit': [{'gate': 'x', 'target': 0},
{'gate': 'y', 'target': 0},
{'gate': 'y', 'target': 1},
{'gate': 'y', 'target': 2}]}


Deprecated

- `result.measurement_counts()` method(s) from result objects retured by `qbraid.runtime.QuantumJob.result()`. Intead, for gate model jobs, measurement counts dictionary now accessible via `result.data.get_counts()`. ([756](https://github.com/qBraid/qBraid/pull/756))

Removed

- Removed `qbraid.runtime.DeviceActionType` enum. Functionally replaced by `qbraid.runtime.ExperimentType`. ([756](https://github.com/qBraid/qBraid/pull/756))
- Removed `qbraid.runtime.QuantumJobResult`. Replaced by `qbraid.runtime.Result`. ([756](https://github.com/qBraid/qBraid/pull/756))
- Removed `qbraid.runtime.GateModelJobResult`. Replaced by `qbraid.runtime.GateModelResultData`. ([756](https://github.com/qBraid/qBraid/pull/756))

Fixed

- Fixed `qbraid.transpiler.transpile` bug where the shortest path wasn't always being favored by the rustworkx pathfinding algorithm. Fixed by adding a bias parameter to both the `ConversionGraph` and `Conversion` classes that attributes as small weight to each conversion by default. ([745](https://github.com/qBraid/qBraid/pull/745))

Dependencies

- Added `qbraid[azure]` extra to project ([723](https://github.com/qBraid/qBraid/pull/723))
- Update sphinx-autodoc-typehints requirement from <2.3,>=1.24 to >=1.24,<2.4 ([746](https://github.com/qBraid/qBraid/pull/746))
- Update qiskit-ibm-runtime requirement from <0.29,>=0.25.0 to >=0.25.0,<0.30 ([751](https://github.com/qBraid/qBraid/pull/751))
- Update sphinx-autodoc-typehints requirement from <2.4,>=1.24 to >=1.24,<2.5 ([750](https://github.com/qBraid/qBraid/pull/750))
- Update amazon-braket-sdk requirement from <1.87.0,>=1.83.0 to >=1.83.0,<1.88.0 ([748](https://github.com/qBraid/qBraid/pull/748))
- Update pennylane requirement from <0.38 to <0.39 ([749](https://github.com/qBraid/qBraid/pull/749))
- Added `flair-visual` to `qbraid[visulization]` extra to allow viewing animations of QuEra Simulator jobs run through qBraid. ([756](https://github.com/qBraid/qBraid/pull/756))

0.9.4

Added
- Added `qibo` to dynamic `QPROGRAM_REGISTRY` imports ([891](https://github.com/qBraid/qBraid/pull/891))
- Fixed `plt.show` / `plt.save_fig` bug in `plot conversion_graph` ([893](https://github.com/qBraid/qBraid/pull/893))
- Added [IonQ Forte Enterpres](https://ionq.com/quantum-systems/forte-enterprise) devices to `IonQProvider` runtime tests ([#894](https://github.com/qBraid/qBraid/pull/894))
- Added `CudaQKernel` class to support `cudaq.PyKernel` as "native" program type ([895](https://github.com/qBraid/qBraid/pull/895))
- Added `qibo_to_qasm2` conversion to transpiler ([895](https://github.com/qBraid/qBraid/pull/895))
- Added `stim` to dynamic `QPROGRAM_REGISTRY` imports and `stim_to_cirq` conversion to transpiler ([895](https://github.com/qBraid/qBraid/pull/895))
- Added `Qasm2KirinString` metatype to support qasm2 strings adapted for QuEra kirin qasm parser through qBraid native runtime. ([896](https://github.com/qBraid/qBraid/pull/896))
- Added `translate` functions as alias for `transpile`, but also that can chain multiple conversions together ([899](https://github.com/qBraid/qBraid/pull/899)). For example:

python
from qbraid import translate

circuit_out = translate(circuit_in, "qasm3", "braket", "cirq")


- Added logger `DEBUG` statements to QuantumDevice that track with the steps in job submission runtime ([906](https://github.com/qBraid/qBraid/pull/906))
- Expanded list of natively supported hardware vendors to include Rigetti, OQC, and IQM ([906](https://github.com/qBraid/qBraid/pull/906))
- Added `qbraid.runtime.load_provider` function to allow instantiating provider via a single interface using entrypoints based on provider name ([906](https://github.com/qBraid/qBraid/pull/906))

python
from qbraid.runtime import load_provider, QbraidProvider

provider = load_provider("qbraid")
assert isintance(provider, QbraidProvider)

follows suit for 'aws', 'ibm', 'oqc', 'azure', 'ionq', etc.


Improved / Modified
- Updated conversion graph and `QPROGRAM_REGISTRY` on README.md ([891](https://github.com/qBraid/qBraid/pull/891))
- Improved `plot_runtime_conversion_scheme` by removing edges not within `ConversionScheme.max_path_depth` ([893](https://github.com/qBraid/qBraid/pull/893))
- Updated native runtime `QbraidProvider` and `QbraidDevice` to support list of `ProgramSpec` loaded from API "runInputTypes" of type `list[str]` instead of single "runPackage" of type `str`. ([896](https://github.com/qBraid/qBraid/pull/896))
- Updated `qasm3_to_ionq`: no longer need to check if `pyqasm` is installed as it is now a core project dependency ([905](https://github.com/qBraid/qBraid/pull/905))

Fixed
- Handling of empty counts dict in `format_counts` pre-processing function ([899](https://github.com/qBraid/qBraid/pull/899))
- Skipping NEC remote tests if device is not online ([899](https://github.com/qBraid/qBraid/pull/899))

0.9.3

Added
- Added `cudaq` to `QPROGRAM_REGISTRY` dynamic import list ([882](https://github.com/qBraid/qBraid/pull/882))
- Added `qiskit_ionq` conversion to transpiler and refactored `IonQDevice._apply_qiskit_ionq_conversion` accordingly ([882](https://github.com/qBraid/qBraid/pull/882))
- Added `qbraid.runtime.load_job` function that uses entrypoints to load provider job class and create instance with job id ([883](https://github.com/qBraid/qBraid/pull/883))

python
from qbraid.runtime import load_job

qbraid_native_job = load_job("<job_id>", "qbraid") qbraid.runtime.QbraidJob
qbraid_braket_task = load_job("<task_arn>", "aws") qbraid.runtime.BraketQuantumTask
...


- Added `QuantumProgram.serialize` method to streamline creation of `ProgramSpec` classes in `QbraidProvider` ([883](https://github.com/qBraid/qBraid/pull/883))

Improved / Modified
- Switched all `QbraidJob` sub-classes to only require `job_id` as positional argument, and any other args that used to be required for auth can now be loaded with credentials from environment variables ([883](https://github.com/qBraid/qBraid/pull/883))
- Allow some minimum tolerance when checking for the sum of result probabilities from job to be equal to 1 ([889](https://github.com/qBraid/qBraid/pull/889))

Fixed
- Updated plot conversion graph test to account for rustworkx v0.16.0 release ([880](https://github.com/qBraid/qBraid/pull/882))

0.9.2

Added
- Added `id` gate to list of supported IonQ gates (but is still skipped in `IonQDict` conversion step) ([880](https://github.com/qBraid/qBraid/pull/880))
- Added `qiskit-ionq` integration into `IonQDevice.run` method so that if user has `qiskit-ionq` installed, we just go directly through their native `qiskit.QuantumCircuit` $\rightarrow$ `IonQDict` conversion rather than using our own. ([880](https://github.com/qBraid/qBraid/pull/880))

python
from qiskit import QuantumCircuit

from qbraid.runtime import IonQProvider
from qbraid.programs.gate_model.ionq import GateSet


circuit = QuantumCircuit(1)
circuit.u(0.1, 0.2, 0.3, 0)

provider = IonQProvider()
device = provider.get_device("simulator")

job = device.run(circuit, shots=100, gateset=GateSet.NATIVE, ionq_compiler_synthesis=False)


If `qiskit-ionq` not installed, the above code will fail. But with `qiskit-ionq` installed, it will work.

Improved / Modified
- Improved `IonQDevice.transform` method with try/except logic using `pyqasm.unroll` ([880](https://github.com/qBraid/qBraid/pull/880))

Fixed
- Fixed type checking in transpiler `weight` and `requires_extras` annotations / decorators ([880](https://github.com/qBraid/qBraid/pull/880))

0.9.1

Added

- Added support for OpenQASM 3.0 to CUDA-Q kernel transpilation ([857](https://github.com/qBraid/qBraid/pull/857)). Usage example:

python
In [1]: from qbraid.transpiler.conversions.openqasm3 import openqasm3_to_cudaq
In [2]: program = """
...: OPENQASM 3.0;
...: include "stdgates.inc";
...: qubit q;
...: bit b;
...: h q;
...: b = measure q;
...: """

In [3]: print(openqasm3_to_cudaq(program))
module attributes {quake.mangled_name_map = {__nvqpp__mlirgen____nvqppBuilderKernel_YA8BX8A573 = "__nvqpp__mlirgen____nvqppBuilderKernel_YA8BX8A573_PyKernelEntryPointRewrite"}} {
func.func __nvqpp__mlirgen____nvqppBuilderKernel_YA8BX8A573() attributes {"cudaq-entrypoint"} {
%0 = quake.alloca !quake.veq<1>
%1 = quake.extract_ref %0[0] : (!quake.veq<1>) -> !quake.ref
call __nvqpp__mlirgen____nvqppBuilderKernel_X4UUVQL2OR(%1) : (!quake.ref) -> ()
%measOut = quake.mz %1 name "" : (!quake.ref) -> !quake.measure
return
}
func.func __nvqpp__mlirgen____nvqppBuilderKernel_X4UUVQL2OR(%arg0: !quake.ref) {
quake.h %arg0 : (!quake.ref) -> ()
return
}
}


- Introduced `max_attempts` parameter in `random_circuit` function ([871](https://github.com/qBraid/qBraid/pull/871))
- Added `prepare` as `RuntimeOption` field in `QuantumDevice` ([871](https://github.com/qBraid/qBraid/pull/871))
- Added `validate_for_gateset` method in `IonQProgram` ([871](https://github.com/qBraid/qBraid/pull/871))

Improved / Modified

- Changed `QuantumDevice.to_ir` method to `QuantumDevice.prepare` ([871](https://github.com/qBraid/qBraid/pull/871))
- Updated `remove_idle_qubits` function for updated `qiskit` version ([871](https://github.com/qBraid/qBraid/pull/871))
- Incorporated `SamplerV2` and job / result primitives for qiskit migration ([871](https://github.com/qBraid/qBraid/pull/871))

Fixed

- Fixed `random_circuit` function so that when specifying `ionq`, the resulting program only uses gates supported by IonQ. ([871](https://github.com/qBraid/qBraid/pull/871))
- Qiskit migration fixes ([876](https://github.com/qBraid/qBraid/pull/876)):
- fix num args passed to `SamplerV2.run`
- raise `NotImplementedError` for `QiskitJob.queue position()` if not available
- Account for `DataBin` pub result data type `c` attribute instead of `meas`

0.9.0

Added

- Added testing code coverage for custom `rzz`, `u3`, and `u2` for Cirq $\rightarrow$ PyQuil ([862](https://github.com/qBraid/qBraid/pull/862))

Improved / Modified

- Vastly reduced size of `qbraid.passes.qasm`, `qbraid.programs.gate_model.qasm2` and `qbraid.programs.gate_model.qasm3` modules as a result of `pyqasm` integration. ([808](https://github.com/qBraid/qBraid/pull/808))
- Restricted PyPI publish jobs to specific actors for better security and maintainability. ([862](https://github.com/qBraid/qBraid/pull/862))
- Updated `MANIFEST.in` to refine file inclusion/exclusion and enhanced `pyproject.toml` by adjusting dependencies and aligning with `requirements.txt`. ([862](https://github.com/qBraid/qBraid/pull/862))
- Enhanced qbraid transpiler QASM2 to Cirq for external gate handling, and updated custom Cirq `RZZGate` to use radians convention to more closely match cirq API. ([862](https://github.com/qBraid/qBraid/pull/862))

Removed

- Dropped support for Python 3.9 ([808](https://github.com/qBraid/qBraid/pull/808))

Fixed

- Removed Python 3.9 from daily test matrix ([862](https://github.com/qBraid/qBraid/pull/862))
- Fixed OQC test edge case datetime bug ([862](https://github.com/qBraid/qBraid/pull/862))

Dependencies

- Integrated `pyqasm` as project dependency. ([808](https://github.com/qBraid/qBraid/pull/808))

Page 1 of 4

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.