Skip to content

feat: added integration for PPVM simulator backend - #838

Merged
weinbe58 merged 10 commits into
mainfrom
jasonh/add-ppvm-simulator-backend
Aug 10, 2026
Merged

weinbe58 merged 10 commits into
mainfrom
jasonh/add-ppvm-simulator-backend

Conversation

@jasonhan3

@jasonhan3 jasonhan3 commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Notes:

  • Is a draft for now because uv.lock had a lot of changes due to a bug where pyproject.toml in PPVM installs kirin instead of kirin-toolchain, causing a bunch of extra unnecessary dependencies to be installed -- Resolved with recent PPVM PR Renamed kirin to kirin-toolchain in pyproject.toml ppvm#199
  • Adds PPVMSimulatorBackend as another AbstractSimulatorBackend
  • PPVMSimulatorBackend's sample returns measurements with 3 values: False (|0>), True (|1>), and None (atom loss).
  • Modifies _normalize_matrix in GeminiPhysicalSimulator and GeminiLogicalSimulator to add postprocessing to convert the None values to True to model how Gemini-MVP doesn't support loss-resolved readout.

@codecov

codecov Bot commented Jul 28, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.24324% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
python/bloqade/gemini/device/simulator_backend.py 92.18% 5 Missing ⚠️

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

☂️ Code Coverage

current status: ✅

Overall Coverage

Statements Covered Coverage Threshold Status
12276 10746 88% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
python/bloqade/gemini/_init_.py 100% 🟢
python/bloqade/gemini/device/_init_.py 100% 🟢
python/bloqade/gemini/device/_task_runtime.py 96% 🟢
python/bloqade/gemini/device/physical_simulator.py 95% 🟢
python/bloqade/gemini/device/simulator.py 100% 🟢
python/bloqade/gemini/device/simulator_backend.py 96% 🟢
TOTAL 98% 🟢

updated for commit: 6ed9df7 by action🐍

@jasonhan3
jasonhan3 marked this pull request as ready for review July 30, 2026 20:24
@weinbe58

weinbe58 commented Aug 3, 2026

Copy link
Copy Markdown
Member

@jasonhan3 can you use the conventional commit convention when creating the title for the PR

@jasonhan3 jasonhan3 changed the title Added integration for PPVM simulator backend feat: added integration for PPVM simulator backend Aug 3, 2026
@github-actions github-actions Bot added the category: feature Category: new feature or feature request. label Aug 3, 2026
@weinbe58 weinbe58 added the backport v0.11 Backport to release-0-11 label Aug 6, 2026
@jasonhan3
jasonhan3 requested a review from weinbe58 August 6, 2026 13:40

@weinbe58 weinbe58 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a little bit of work but overall looks good!

Comment thread python/bloqade/gemini/device/simulator.py
Comment thread python/bloqade/gemini/device/physical_simulator.py
Comment thread python/bloqade/gemini/device/physical_simulator.py Outdated
Comment thread python/bloqade/gemini/device/simulator_backend.py Outdated

@weinbe58 weinbe58 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving this but we will h

@weinbe58
weinbe58 merged commit 214858e into main Aug 10, 2026
20 checks passed
@weinbe58
weinbe58 deleted the jasonh/add-ppvm-simulator-backend branch August 10, 2026 13:18
@github-actions

Copy link
Copy Markdown
Contributor

Backport results for 214858e

Failed:

  • release-0-11: cherry-pick conflict in: uv.lock

To resolve manually:

git fetch origin <release-branch>
git checkout -b backport-pr838 origin/<release-branch>
git cherry-pick 214858e1abf4651e88d7ee00102e51185f82b812
# resolve conflicts, then push and open a PR

weinbe58 added a commit that referenced this pull request Aug 10, 2026
…#905)

feat: added integration for PPVM simulator backend (#838)

* feat: added integration for PPVM simulator

* feat: updated lockfile based on updated ppvm

* feat: made PPVM lazy import with error message

* fix: addressed PR comments

* fix: added equality check for None

* fix: changed test based on behavior

---------

Co-authored-by: Jason Han <98669315+jasonhan3@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport v0.11 Backport to release-0-11 category: feature Category: new feature or feature request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants