rigetti / rigetti/qcs-sdk-rust

Fix stubtest errors

Open
#556 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
15
Forks
4
Avg merge
1h 9m
Merged PRs (30d)
1

Description

The generated type stubs in this repository are currently not correct, because the API uses PyO3-annotated Rust types from quil-rs and qcs-api-client-rust; in the type stubs, these types are imported from the PyO3 libraries generated in those repositories (quil and qcs_api_client_common), rather than from re-exports in the extension module in this repo. PyO3 types from different extension modules are inherently not the same type, so this makes the type stubs incorrect.

(In addition, as of 8/18/2026, there's an issue in pyo3-stub-gen that apparently prevents it from handling external imports correctly anyway; e.g. quil._quil.program.Program is used as program.Program, but the corresponding import is quil._quil.program.)


We have a bunch of stubtest errors in CI: https://github.com/rigetti/qcs-sdk-rust/actions/runs/18181235477/job/51757243866?pr=553#step:12:1233

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the stubtest errors in the linked CI job and the pyo3-stub-gen configuration or generated stubs. Trace how quil-rs and qcs-api-client-rust types are imported, including the external-import handling issue; done means the stubs reference this repository’s extension-module re-exports and the CI stubtest passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, rust
Domain
testing, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.