Skip to content

fix: make qir-qis optional and stabilize CI - #164

Merged
qartik merged 6 commits into
mainfrom
ks-qir-qis-dev-dep-dynamic-load
Apr 23, 2026
Merged

qartik merged 6 commits into
mainfrom
ks-qir-qis-dev-dep-dynamic-load

Conversation

@qartik

@qartik qartik commented Apr 22, 2026

Copy link
Copy Markdown
Member

Summary

  • move qir-qis out of selene-core runtime dependencies and keep it as an optional dev/test dependency
  • lazy-load qir_qis in the QIR builtins so importing selene-core does not require the optional package
  • tighten the optional-import and QIR classification behavior, and fix the related selene-core and selene-sim typing issues surfaced by CI
  • add just nitpicks and update DEVELOPMENT.md to prefer the higher-level local workflows
  • refresh the GitHub Actions versions used by CI and align the macOS wheel build to install the Rust toolchain declared in rust-toolchain.toml

Notes

  • uv.lock includes the dependency refresh needed to match the updated constraints and workflow tooling

@qartik
qartik requested a review from jake-arkinstall as a code owner April 22, 2026 14:09
@qartik
qartik marked this pull request as draft April 22, 2026 14:42
@qartik qartik changed the title fix: make qir-qis a dev dependency fix: make qir-qis optional and align nitpicks Apr 22, 2026
@qartik
qartik marked this pull request as ready for review April 22, 2026 19:02
@qartik
qartik requested a review from Copilot April 22, 2026 19:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Makes qir-qis optional for selene-core consumers while keeping QIR-backed functionality available in dev/CI, and aligns various CI/mypy/nitpick tooling and docs.

Changes:

  • Move qir-qis out of selene-core runtime deps and lazy-load it in QIR builtins.
  • Add qir-qis to wheel CI test requirements and refresh related dependency pins.
  • Address mypy typing nits, add a just nitpicks workflow, and update development docs accordingly.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
selene-sim/python/selene_sim/interactive/full_stack.py Use a ClassVar shared library handle to avoid repeated CDLL loads and satisfy typing.
selene-core/python/selene_core/build_utils/types.py Tighten generics and mark step kind attributes as ClassVar for mypy correctness.
selene-core/python/selene_core/build_utils/builtins/qir.py Lazy-load qir_qis and route QIR conversions through the optional module.
selene-core/pyproject.toml Remove qir-qis from runtime deps and add it to a dev dependency group.
pyproject.toml Bump selene-core pin and include qir-qis in dev + cibuildwheel test requirements.
justfile Add a nitpicks recipe and minor formatting cleanup.
DEVELOPMENT.md Document just develop, just nitpicks, and higher-level just workflows.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread selene-core/python/selene_core/build_utils/builtins/qir.py Outdated
Comment thread selene-core/python/selene_core/build_utils/builtins/qir.py Outdated
Comment thread justfile
Comment thread DEVELOPMENT.md

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread selene-core/python/selene_core/build_utils/types.py Outdated
Comment thread selene-core/python/selene_core/build_utils/builtins/qir.py

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread selene-core/python/selene_core/build_utils/types.py
Comment thread selene-sim/python/tests/test_build_classification.py Outdated
Comment thread selene-core/python/selene_core/build_utils/builtins/qir.py
@qartik
qartik force-pushed the ks-qir-qis-dev-dep-dynamic-load branch from b38835b to 9f120d3 Compare April 22, 2026 20:37
@qartik qartik changed the title fix: make qir-qis optional and align nitpicks fix: make qir-qis optional and stabilize CI Apr 22, 2026
@qartik
qartik requested a review from Copilot April 22, 2026 20:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 13 out of 14 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (1)

.github/workflows/build_wheels.yml:32

  • This workflow mixes actions/cache@v4 (selene-core wheel cache) with actions/cache@v5 later in the same job. Since this PR is already refreshing action versions, update the remaining actions/cache@v4 usage here as well to keep the workflow consistent and avoid relying on an older major version.
      - uses: actions/checkout@v6

      - name: Cache selene-core wheel
        id: selene_core_wheel_cache
        uses: actions/cache@v4
        with:

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/build_wheels.yml Outdated
Comment thread selene-sim/python/tests/test_build_classification.py
Comment thread selene-core/python/selene_core/build_utils/builtins/qir.py Outdated
@qartik
qartik force-pushed the ks-qir-qis-dev-dep-dynamic-load branch from e107cd2 to 8f5ed69 Compare April 22, 2026 21:11
return self.kind.digest(self.resource)


InputKind = TypeVar("InputKind", bound=ArtifactKind)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What is this change for?

A Kind is a meta description of a series of constraints and actions to be enacted upon an Any resource, but is not a resource in itself.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This came from fighting with mypy and a comment from Copilot at #164 (comment). Let me see if I can minimize the change while maintaining correct typing.

@qartik
qartik force-pushed the ks-qir-qis-dev-dep-dynamic-load branch from 3d1dc16 to e6c1edb Compare April 23, 2026 13:25
@qartik
qartik merged commit e52c0b2 into main Apr 23, 2026
10 checks passed
@qartik
qartik deleted the ks-qir-qis-dev-dep-dynamic-load branch April 23, 2026 13:37
jake-arkinstall pushed a commit that referenced this pull request Apr 28, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.2.9](selene-core-v0.2.8...selene-core-v0.2.9)
(2026-04-27)


### Bug Fixes

* make qir-qis optional and stabilize CI
([#164](#164))
([e52c0b2](e52c0b2))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
jake-arkinstall pushed a commit that referenced this pull request Apr 28, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.2.15](selene-sim-v0.2.14...selene-sim-v0.2.15)
(2026-04-28)


### Features

* Use SeleneStartupError for errors before shot_start
([#170](#170))
([85c2907](85c2907))


### Bug Fixes

* make qir-qis optional and stabilize CI
([#164](#164))
([e52c0b2](e52c0b2))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
jake-arkinstall pushed a commit that referenced this pull request Jun 12, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.3.0-alpha.1](selene-core-v0.3.0-alpha.0...selene-core-v0.3.0-alpha.1)
(2026-06-12)


### ⚠ BREAKING CHANGES

* Use struct exports for all plugin types, separate error model and
simulator ([#169](#169))
* Add handling for an additional gateset
([#119](#119))

### Features

* Add __version__ attributes
([#137](#137))
([379ae01](379ae01))
* Add handling for an additional gateset
([#119](#119))
([5180b80](5180b80))
* Add simulate_delay functionality
([#139](#139))
([cca97fa](cca97fa))
* Add support for object files provided as bytes
([#94](#94))
([c4cfac6](c4cfac6))
* add timing to builtin runtimes and batching options to softrz runtime
([#158](#158))
([049e123](049e123))
* Build improvements
([#142](#142))
([12f399b](12f399b))
* Interactive use of Selene from python
([#135](#135))
([db3028d](db3028d))
* Make interfaces shared, add ArgReader
([#171](#171))
([143e742](143e742))
* QIR support using QIR-QIS
([#114](#114))
([70ab294](70ab294))
* Result stream handling refactor
([#93](#93))
([607a55e](607a55e))
* Stim improvements (more ops + state printing)
([#115](#115))
([867d5e5](867d5e5))
* test on QIS instead of relying on the upper stack
([#150](#150))
([b80a9c4](b80a9c4))
* Traces for analytics
([#160](#160))
([24b9978](24b9978))
* Use mingw instead of msvc for windows wheels
([#143](#143))
([3d91514](3d91514))
* Use struct exports for all plugin types, separate error model and
simulator ([#169](#169))
([c44a5c9](c44a5c9))


### Bug Fixes

* add `___barrier` to Helios QIS for QIR emulation
([#136](#136))
([dfbc4c3](dfbc4c3))
* avoid using qir_major_version string for QIR detection
([#123](#123))
([deaa0dc](deaa0dc))
* classify lowered qir-qis bitcode as helios
([#157](#157))
([67fca60](67fca60))
* make qir-qis optional and stabilize CI
([#164](#164))
([e52c0b2](e52c0b2))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
jake-arkinstall added a commit that referenced this pull request Jun 12, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.3.0-alpha.1](selene-sim-v0.3.0-alpha.0...selene-sim-v0.3.0-alpha.1)
(2026-06-12)


### ⚠ BREAKING CHANGES

* Use struct exports for all plugin types, separate error model and
simulator ([#169](#169))
* Add handling for an additional gateset
([#119](#119))

### Features

* Add __version__ attributes
([#137](#137))
([379ae01](379ae01))
* Add event hook which records measurement results
([#104](#104))
([01300ee](01300ee)),
closes [#103](#103)
* Add handling for an additional gateset
([#119](#119))
([5180b80](5180b80))
* Add simulate_delay functionality
([#139](#139))
([cca97fa](cca97fa))
* Add support for object files provided as bytes
([#94](#94))
([c4cfac6](c4cfac6))
* add timing to builtin runtimes and batching options to softrz runtime
([#158](#158))
([049e123](049e123))
* Better exception handling for parse_shots=False
([#70](#70))
([3caf530](3caf530))
* Build improvements
([#142](#142))
([12f399b](12f399b))
* Bump selene-core dependency and relax guppylang testing dependency
([#120](#120))
([6375791](6375791))
* Cleanup error'd processes before log collection
([#98](#98))
([77e698e](77e698e))
* **compiler:** Bump tket version; add wasm + gpu to the hugr-qis
registry
([c69155d](c69155d))
* correct shot end strategy and error processing
([#91](#91))
([93eaeb0](93eaeb0))
* Emit a nicer error when trying to emulate unsupported pytket ops
([#72](#72))
([d88a28a](d88a28a))
* Fine-grained timeout configuration
([#69](#69))
([072842e](072842e))
* Interactive use of Selene from python
([#135](#135))
([db3028d](db3028d))
* Make interfaces shared, add ArgReader
([#171](#171))
([143e742](143e742))
* QIR support using QIR-QIS
([#114](#114))
([70ab294](70ab294))
* Quest performance improvements
([#133](#133))
([af640e9](af640e9))
* random_advance ([#55](#55))
([974b496](974b496))
* Record simulated delays in event hooks
([#154](#154))
([608884a](608884a))
* Result stream handling refactor
([#93](#93))
([607a55e](607a55e))
* Stim improvements (more ops + state printing)
([#115](#115))
([867d5e5](867d5e5))
* Support state-dump passthrough on quantum replay simulator
([#108](#108))
([1b01a01](1b01a01))
* test on QIS instead of relying on the upper stack
([#150](#150))
([b80a9c4](b80a9c4))
* Test on QIS snapshots
([#134](#134))
([c4d58ab](c4d58ab))
* Traces for analytics
([#160](#160))
([24b9978](24b9978))
* update to tket-qsystem 0.20
([#66](#66))
([7191b07](7191b07))
* Use mingw instead of msvc for windows wheels
([#143](#143))
([3d91514](3d91514))
* Use SeleneStartupError for errors before shot_start
([#170](#170))
([85c2907](85c2907))
* Use struct exports for all plugin types, separate error model and
simulator ([#169](#169))
([c44a5c9](c44a5c9))


### Bug Fixes

* add `___barrier` to Helios QIS for QIR emulation
([#136](#136))
([dfbc4c3](dfbc4c3))
* Add ENDING to allowed shot state on receiving meta information
([#100](#100))
([fc4d673](fc4d673))
* Add numpy dependency back
([#127](#127))
([c9a01eb](c9a01eb))
* avoid using qir_major_version string for QIR detection
([#123](#123))
([deaa0dc](deaa0dc))
* classify lowered qir-qis bitcode as helios
([#157](#157))
([67fca60](67fca60))
* **compiler:** error when entrypoint has arguments
([#84](#84))
([604b131](604b131))
* **compiler:** update tket-qystem to fix CZ bug
([#78](#78))
([3991f11](3991f11))
* correct post_runtime duration metric
([#74](#74))
([0bef66a](0bef66a))
* make qir-qis optional and stabilize CI
([#164](#164))
([e52c0b2](e52c0b2))


### Documentation

* add repository citation guidance and metadata
([#146](#146))
([880a58b](880a58b)),
closes [#145](#145)
* Correct URL to guppy repository
([#121](#121))
([27ded00](27ded00))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: Jake Arkinstall <65358059+jake-arkinstall@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants