Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade to kirin 0.12 #7

Merged
merged 1 commit into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ authors = [
requires-python = ">=3.10"
dependencies = [
"bloqade[qasm2]>=0.17.0",
"kirin-toolchain>=0.10.0",
"kirin-toolchain~=0.12.0",
]

[project.optional-dependencies]
Expand Down
8 changes: 4 additions & 4 deletions src/bloqade/pyqrack/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
fold = Fold(mt.dialects)
fold(mt)
address_analysis = AddressAnalysis(mt.dialects)
results, ret = address_analysis.run_analysis(mt)
if any(isinstance(a, AnyAddress) for a in results.values()):
frame, ret = address_analysis.run_analysis(mt)
if any(isinstance(a, AnyAddress) for a in frame.entries.values()):
raise ValueError("All addresses must be resolved.")

num_qubits = max(address_analysis.qubit_count, self.min_qubits)
Expand All @@ -57,8 +57,8 @@
"""Run the given kernel method on the PyQrack `_shots` times, caching analysis results."""

address_analysis = AddressAnalysis(mt.dialects)
results, ret = address_analysis.run_analysis(mt)
if any(isinstance(a, AnyAddress) for a in results.values()):
frame, ret = address_analysis.run_analysis(mt)
if any(isinstance(a, AnyAddress) for a in frame.entries.values()):

Check warning on line 61 in src/bloqade/pyqrack/target.py

View check run for this annotation

Codecov / codecov/patch

src/bloqade/pyqrack/target.py#L60-L61

Added lines #L60 - L61 were not covered by tests
raise ValueError("All addresses must be resolved.")

memory = Memory(
Expand Down