Skip to content

馃悰 Keep Git Qiskit in the nox test process - #1055

Merged
burgholzer merged 1 commit into
mainfrom
fix/qiskit-nox-version
Oct 25, 2026
Merged

burgholzer merged 1 commit into
mainfrom
fix/qiskit-nox-version

Conversation

@burgholzer

@burgholzer burgholzer commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

馃 AI text below 馃

Description

The Git-Qiskit session installed Qiskit main, but its following uv run synchronized the project and restored the locked release before pytest started. Use a uv run --with overlay for the requested Git dependency. Retain the native MQT DDSIM build setup and normal/minimum sessions; remove the unused command hook and the base-environment version report.

Validation on Python 3.12:

  • The actual Git session passed all 119 DDSIM tests plus a dependency-provenance assertion, using Qiskit 2.7.0.dev0 at 73aa14d2b8b423335a72cb1b8f940249029cb7df.
  • The same provenance assertion failed with the original noxfile: pytest imported release 2.6.1 after the Git install. The project lock remained unchanged.
  • The normal tests-3.12 session passed all 119 tests independently.
  • All lint hooks passed with Python 3.14 selected for Python hooks. The default local hook selection used Python 3.15, where existing cmake-format fails in re.Scanner on unchanged CMake files. No hooks were skipped or repository settings changed.

The session-specific assertion was run from a temporary test file; it does not belong in the normal package suite, where release Qiskit is expected:

import json
from importlib.metadata import distribution


def test_git_qiskit_loaded():
    info = json.loads(distribution("qiskit").read_text("direct_url.json") or "{}")
    assert info.get("url") == "https://github.com/Qiskit/qiskit.git"
    assert info.get("vcs_info", {}).get("vcs") == "git"

Run it with uvx nox -s qiskit-3.12 -- /path/to/test_qiskit_git.py -o addopts=''.

This is a developer-test correction with no package API, dependency-range or migration change. The session docstring describes the overlay. AI assistance: Codex prepared, reviewed and tested the patch; maintainer review is pending.

Checklist

  • The pull request only contains commits that are focused and relevant to this change.
  • I have added appropriate tests that cover the new/changed functionality.
  • I have updated the documentation to reflect these changes.
  • I have added entries to the changelog for any noteworthy additions, changes, fixes, or removals.
  • I have added migration instructions to the upgrade guide (if needed).
  • The changes follow the project's style guidelines and introduce no new warnings.
  • The changes are fully tested and pass the CI checks.
  • I have reviewed my own code changes.

If PR contains AI-assisted content:

  • Any agent that created, edited, or submitted GitHub content was explicitly authorized for that scope, as required by our AI Usage Guidelines.
  • Every agent-authored or agent-edited public text body begins with the visible disclosure 馃 *AI text below* 馃 (titles are exempt).
  • I have disclosed AI assistance in the PR description.
  • I confirm that I have personally reviewed and understood all AI-generated content, and accept full responsibility for it.

馃 *AI text below* 馃

Use a uv run overlay so project synchronization cannot replace the Git
Qiskit build with the locked release before pytest starts. Keep the native
MQT DDSIM build setup and normal test sessions unchanged.

Remove the unused command hook, lockfile move and base-environment package
report. Validate the imported Git provenance inside the test process.

Assisted-by: Codex
@burgholzer burgholzer added fix Anything related to bugfixes python:uv Pull requests that update python:uv code tooling Any issue or PR related to project tooling labels Oct 25, 2026
@burgholzer burgholzer self-assigned this Oct 25, 2026
@github-project-automation github-project-automation Bot moved this to In Progress in MQT Simulation Oct 25, 2026

@burgholzer burgholzer left a comment

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.

@denialhaag Found this randomly while iterating on something else.
This feels very clean, and apparently also more correct. Would you mind rolling this out elsewhere?

@denialhaag

Copy link
Copy Markdown
Member

@denialhaag Found this randomly while iterating on something else. This feels very clean, and apparently also more correct. Would you mind rolling this out elsewhere?

I'll add it to the list!

@burgholzer
burgholzer enabled auto-merge (squash) October 25, 2026 14:42
@burgholzer
burgholzer merged commit 498a50a into main Oct 25, 2026
20 checks passed
@burgholzer
burgholzer deleted the fix/qiskit-nox-version branch October 25, 2026 14:48
@github-project-automation github-project-automation Bot moved this from In Progress to Done in MQT Simulation Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Anything related to bugfixes python:uv Pull requests that update python:uv code tooling Any issue or PR related to project tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants