Qbraid

Latest version: v0.8.9

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

Scan your dependencies

Page 1 of 3

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.8.9

Added
- Added "new" classes to the relevant runtime module scopes ([843](https://github.com/qBraid/qBraid/pull/843)):
- `qbraid.schemas`: `AhsExperimentMetadata` model, `USD` and `Credits` classes
- `qbraid.runtime`: `ValidationLevel` enum
- `qbraid.runtime.native`: Device-specific `ResultData` subclasses

- Added `plot_runtime_conversion_scheme` function to visualize the conversion graph and the target program types for a specific device. This enhancement clarifies which program types are available as input when submitting a quantum job to a particular device. See usage example below. ([845](https://github.com/qBraid/qBraid/pull/845))

python
from qbraid.runtime import QbraidProvider
from qbraid.visualization import plot_runtime_conversion_scheme

provider = QbraidProvider()

device = provider.get_device("qbraid_qir_simulator")

device.update_scheme(max_path_depth=1)

plot_runtime_conversion_scheme(device, legend=True)


- Display seed in bottom left corner of conversion graph if `plot_conversion_graph` called with `legend=True` ([849](https://github.com/qBraid/qBraid/pull/849))

Improved / Modified
- Made remote tests for `QbraidDevice("nec_vector_annealer")` more robust ([843](https://github.com/qBraid/qBraid/pull/843))
- Updated doc string & improved type hinting of `qbraid.load_program` ([849](https://github.com/qBraid/qBraid/pull/849))

Fixed
- Resolved an issue where passing `bloqade.builder.assign.BatchAssign` to `QbraidDevice("quera_aquila")` caused the transpile step to incorrectly wrap its output list in another list, leading to errors in `QuantumDevice.validate` and `QuantumDevice.to_ir`. The native `QbraidDevice` class now adapts when the transpile input is a single object but the output is a list, properly iterating through the sub-batch for final submission. ([843](https://github.com/qBraid/qBraid/pull/843))

0.8.8

Added
- Added support for specifying different `quera_qasm_simulator` backends in the `QbraidDevice.run` method using the "backend" keyword argument (e.g., "cirq", "cirq-gpu") ([836](https://github.com/qBraid/qBraid/pull/836))
- Add native runtime support for AHS experiment types, specifically for QuEra Aquila device ([837](https://github.com/qBraid/qBraid/pull/837))
- Added `QbraidJob.queue_position()` method ([838](https://github.com/qBraid/qBraid/pull/838))

Improved / Modified
- Enhanced type hinting for the `Result.data` property by leveraging a custom `typing.TypeVar`, enabling automatic adaptation to the specific `ResultData` subclass being accessed. ([836](https://github.com/qBraid/qBraid/pull/836))
- Improved type annotations and updated runtime test cases / structure ([837](https://github.com/qBraid/qBraid/pull/837))
- Updated validators for `AhsExperimentMetadata` pydantic model/schema ([838](https://github.com/qBraid/qBraid/pull/838))

0.8.7

Improved / Modified
- `OQCDevice.transform()` method now removes "include" statements from qasm strings, as they are not supported by the OQC cloud. ([831](https://github.com/qBraid/qBraid/pull/831))
- Extended `OQCDevice.get_next_window()` to fallback and attempt to extract next (or current) start window from `OQCClient.get_qpu_execution_estimates()` if `OQCClient.get_next_window()` raises an exception (e.g. for non-AWS windows). Now can return next widow `datetime` for Toshiko QPU. ([831](https://github.com/qBraid/qBraid/pull/831))
- Updated `OQCDevice.submit()` to so that we no longer explicitly set the `CompilerConfig` defaults and rather leave optional arguments as `None` if not provided. ([831](https://github.com/qBraid/qBraid/pull/831))

Removed
- Removed `qbraid.passes.compat.rename_qasm_registers()`. Function did not work properly, and is no longer even needed for OQC runtime as submission format is now `qasm3`, not `qasm2`. ([831](https://github.com/qBraid/qBraid/pull/831))

0.8.6

Added
- Registered "qubo" coefficients program type under `qbraid.programs.typer.QuboCoefficientsDict` ([820](https://github.com/qBraid/qBraid/pull/820))
- Added option to create a `ConversionGraph` using only specific nodes ([822](https://github.com/qBraid/qBraid/pull/822))
- Added option to include all registered program types in `ConversionGraph`, even if they don't have any supported conversions ([822](https://github.com/qBraid/qBraid/pull/822))
- Added method that maps all nodes in a `ConversionGraph` to their corresponding `ExperimentType` ([822](https://github.com/qBraid/qBraid/pull/822))
- Added option to `ConversionGraph` while only showing nodes matching given `ExperimentType` value(s) ([822](https://github.com/qBraid/qBraid/pull/822))

python
from qbraid import ConversionGraph, ExperimentType

graph = ConversionGraph(nodes=["qasm2", "qasm3", "qubo"], include_isolated=True)

for alias, exp_type in graph.get_node_experiment_types().items():
print(alias, exp_type.value)

graph.plot(experiment_type=ExperimentType.GATE_MODEL)


- Added conditional for OQC device `OFFLINE` status when unavailable + outside live window ([826](https://github.com/qBraid/qBraid/pull/826))
- Added units for OQC device pricing (USD) ([826](https://github.com/qBraid/qBraid/pull/826))

Improved / Modified
- Separated runtime device `transform` and `to_ir` logic into separate steps ([819](https://github.com/qBraid/qBraid/pull/819))
- Updated runtime validation step to handle program batches and not re-warn for device-related checks ([819](https://github.com/qBraid/qBraid/pull/819))
- Updated runtime device transpile method and target profile to allow for lists of `ProgramSpec` ([819](https://github.com/qBraid/qBraid/pull/819))
- Updated native runtime logic for NEC vector annealer to support "qubo" program spec type. Offset argument / attribute removed from `qbraid.programs.annealing.Problem`. `QbraidDevice.run` flow now derives "offset" paramater from `params` argument (of type `QuboSolveParams`, now required). This allows a more straightfoward procedure (with more visiblity) when submitting programs from `pyqubo.Module`. See code example below. ([820](https://github.com/qBraid/qBraid/pull/820))

python
from qbraid import QbraidProvider
from qbraid.runtime.schemas import QuboSolveParams

s1, s2, s3, s4 = [pyqubo.Spin(f"s{i}") for i in range(1, 5)]
H = (4 * s1 + 2 * s2 + 7 * s3 + s4) ** 2
model = H.compile()
qubo, offset = model.to_qubo()

params = QuboSolveParams(offset=offset)

provider = QbraidProvider()

device = provider.get_device("nec_vector_annealer")

job = device.run(qubo, params=params)


- IonQ multicircuit jobs and input data format field added explicitly ([825](https://github.com/qBraid/qBraid/pull/825))
- OQC provider url + timeout params added to `__init__`, and target profile updates to include new device metadata fields returned by `OQCClient`, particularly in relation to Toshiko QPU ([825](https://github.com/qBraid/qBraid/pull/825))
- Updated `random_circuit` function to use transpiler to consider all possible random circuit generators package funcs starting from the one with the closest conversion path to the specified target package. Reverses the logic of `ConversionGraph.get_sorted_closest_targets` with new function `ConversionGraph.get_sorted_closest_sources()` ([829](https://github.com/qBraid/qBraid/pull/829))

Fixed
- Fixed `qasm2_to_qasm3()` conversion error cause by `qbraid/transpiler/conversions/qasm2/qelib_qasm3.qasm` not being included in `MANIFEST.in` ([825](https://github.com/qBraid/qBraid/pull/825))
- Fixed docs CSS so stable/latest words show up (previously white and blended into the background so weren't visible) ([826](https://github.com/qBraid/qBraid/pull/826))

Dependencies
- Updated `pyqasm` optional dependency to `0.0.3` ([824](https://github.com/qBraid/qBraid/pull/824))
- Updated `oqc-qcass-client` optional dependnecy to `3.11.0` ([826](https://github.com/qBraid/qBraid/pull/826))

0.8.5

Added
- Updates for interfacing with IonQ devices from `QbraidProvider` including error mitigation field (to support `debias` parameter) for run method and basis gates set included in target profile ([817](https://github.com/qBraid/qBraid/pull/817))

Improved / Modified
- Updated examples submodule and added note to contributing doc about how to do so ([817](https://github.com/qBraid/qBraid/pull/817))

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.