Skip to content

🐛 Use valid OpenQASM in DDSIM status test - #2345

Closed
simon1hofmann wants to merge 1 commit into
mainfrom
codex/fix-ddsim-device-status
Closed

🐛 Use valid OpenQASM in DDSIM status test#2345
simon1hofmann wants to merge 1 commit into
mainfrom
codex/fix-ddsim-device-status

Conversation

@simon1hofmann

@simon1hofmann simon1hofmann commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

🤖 AI text below 🤖

Description

Use valid OpenQASM 3 in the DDSIM device-status test fixture:

  • branch on the scalar bit c[0] instead of comparing a bit register with an integer;
  • remove the redundant second full-register measurement, which is ill-typed after indexed access in the current frontend;
  • preserve the test's dynamic-circuit workload and BUSY-to-IDLE status coverage.

Validation

  • 20/20 repeated DDSIM QDMI submissions observed BUSY, completed with the requested shot count, and returned to IDLE
  • repository pre-commit hooks
  • git diff --check

Checklist

  • The pull request only contains commits that are focused and relevant to this change.
  • I have added or updated appropriate tests that cover the changed functionality.
  • Documentation changes are not required for this test-only correction.
  • A changelog entry is not required for this test-only correction.
  • Migration instructions are not required because the public API is unchanged.
  • 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.

Use a scalar bit condition and avoid a redundant register remeasurement that is ill-typed after indexed access.

Assisted-by: GPT-5.6 via Codex
@simon1hofmann simon1hofmann added fix Fix for something that isn't working c++ Anything related to C++ code OpenQASM Anything related to OpenQASM QDMI Anything related to QDMI DD Anything related to the DD package and removed DD Anything related to the DD package OpenQASM Anything related to OpenQASM labels Sep 3, 2026
@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

// Measure all qubits
c = measure q;
// Add dynamic component
if (c == 3) {

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.

This is valid OpenQASM 3, is it not?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes you're right and this should be fixed by #2181. Closing this workaround for now.

@simon1hofmann simon1hofmann self-assigned this Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Anything related to C++ code fix Fix for something that isn't working QDMI Anything related to QDMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants