Skip to content

Commit

Permalink
Update pyqasm and qbraid dependencies (#183)
Browse files Browse the repository at this point in the history
* add pyqasm v0.0.3

* update changelog
  • Loading branch information
TheGupta2012 authored Nov 6, 2024
1 parent 29b8836 commit 4f009c3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ Types of changes:

### ⬇️ Dependency Updates
- Added `pyqasm` as project dependency ([#173](https://github.com/qBraid/qbraid-qir/pull/173))
- Updated `pyqasm` and `qbraid` dependencies ([#183](https://github.com/qBraid/qbraid-qir/pull/183))

### 👋 Deprecations
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ Discord = "https://discord.gg/TPBU2sa8Et"

[project.optional-dependencies]
cirq = ["cirq-core>=1.3.0,<1.5.0"]
qasm3 = ["pyqasm==0.0.2", "numpy"]
test = ["qbraid>=0.7.1,<0.9.0", "pytest", "pytest-cov", "autoqasm>=0.1.0"]
qasm3 = ["pyqasm==0.0.3", "numpy"]
test = ["qbraid>=0.8.3,<0.9.0", "pytest", "pytest-cov", "autoqasm>=0.1.0"]
lint = ["black", "isort", "pylint", "qbraid-cli>=0.8.7"]
docs = ["sphinx>=7.3.7,<=8.3.0", "sphinx-autodoc-typehints>=1.24,<2.6", "sphinx-rtd-theme>=2.0,<3.1", "docutils<0.22", "sphinx-copybutton"]

Expand Down
4 changes: 3 additions & 1 deletion qbraid_qir/qasm3/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ def qasm3_to_qir(
elif not isinstance(program, str):
raise TypeError("Input quantum program must be of type openqasm3.ast.Program or str.")

qasm3_module = pyqasm.unroll(program, as_module=True)
qasm3_module = pyqasm.load(program)
qasm3_module.unroll()

if name is None:
name = generate_module_id()
llvm_module = qir_module(Context(), name)
Expand Down
2 changes: 1 addition & 1 deletion tests/qasm3_qir/autoqasm/test_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import numpy as np
import pytest
from pyqir import Module
from qbraid.passes.qasm3.compat import add_stdgates_include, insert_gate_def
from qbraid.passes.qasm.compat import add_stdgates_include, insert_gate_def

from qbraid_qir.qasm3 import qasm3_to_qir

Expand Down

0 comments on commit 4f009c3

Please sign in to comment.