Repository navigation
Reuse released QDMI provider adapters with MQT Core 4.1 - #147
Conversation
|
Reviewed this with particular attention to the reservation and session handling, since #129, #130 and #131 landed in this file last week and the refactor removes most of what they touched. Confirming those invariants was the main thing I wanted to check, so leading with it. They hold, and the new tests pin them. A few other things I checked rather than took on trust:
ci-mock is red, and it is a one-line causeNow that the workflows have been approved,
Both fail with the same error, The cause is the test seam rather than the driver logic.
Neither file is in this PR's changed set, so the stubs are now bypassed and the real To be clear about the scope: this looks like a test-seam problem, not a production behaviour change. One thing worth changing in the driverSeparately from the CI failure, in This matters more than it looks, because Two questionsWhy The from-source MQT Core pin for the compiler venv ( Nothing else blocking from me beyond the CI failure. The structure is a clear improvement over the duplicated registration and session code. I have not done an image build or any site validation, which your description correctly lists as outstanding. |
|
The I checked rather than guessed: merging this branch's Nothing on your side needs changing. The two tests now call One entirely optional follow-up: there are three more The two other points from my earlier review still stand on their own: the |
|
Hi, @DougSO! Thanks a lot for the review. I'll update to MQT Core 4.1.1 later today and address your other points in the process! 🙂 |
Two mock tests stop the QDMI driver short of a real session by replacing _device(), the private accessor run_circuit reaches the session through. That couples them to an implementation detail, and the coupling has now cost something: openQSE#147 moves run_circuit onto _backend(), keeping _device() as a wrapper for the other callers, and these two tests stop intercepting. The real accessor then runs and resolves device access for real, so both fail on a runner with an empty credential DB with "QPU credential DB does not contain an enabled entitlement and API key for user 'runner'". The driver is behaving correctly; the stand-in simply stopped being in the way. Give the intention a name instead. stub_qdmi_session() in tests/mock/fakes sets both accessors, the one in use and the one that work moves to, and returns the device so a caller can still assert against it. A test says what it wants, a session that opens nothing, rather than which method to patch, and the next move of that seam does not reach the tests. Only the two files openQSE#147 does not touch are changed. The three other _device stubs live in test_braket_profile.py and test_qdmi_profiles.py, which openQSE#147 rewrites, so converting those here would only create conflicts. They can move to the helper afterwards. Tested in the container. On main the full mock suite is 626 passed and 4 skipped, unchanged, and ci-syntax is clean. On openQSE#147's head a5c9a75 the suite is 2 failed and 634 passed before this change, matching the CI failure exactly, and 636 passed and 4 skipped with it. So this closes that PR's ci-mock without touching its code. Signed-off-by: Doug Oucharek <dougso@me.com>
Assisted-by: GPT-6.1 Sol via Codex
Assisted-by: GPT-6.1 Sol via Codex
Assisted-by: GPT-6.1 Sol via Codex
Assisted-by: GPT-6.1 Sol via Codex
|
I already asked @marcelwa to have another look at the PR from our side and update its title and description. 🙂 |
|
Closing out the one question I left open, and passing on something the real device showed. The duration scale is right. I checked
The reason this settles it: the device declares Separately, something only the real device surfaced. Opening the q20 through
Nothing else outstanding from my side. Thanks for turning both review points round so quickly, and for the duration-scale fix nobody asked for. |
🤖 AI text below 🤖
Replace duplicated IQM and Amazon Braket device registration and session setup with their released MQT Core-backed Qiskit adapters. Pin MQT Core 4.1.1, Amazon Braket QDMI 1.3.0, and IQM QDMI 1.5.0 in setup/qdmi-requirements.txt.
Keep reservation-specific credentials and sessions, shot limits, deadlines, cancellation, and native job options in QFw. Reuse the Amazon Braket adapter’s gate aliases and serializer where possible, preserve the broader non-verbatim compiler vocabulary, and fix classical measurement mapping and ordered multi-qubit operation loci. Apply QDMI’s duration scale factor to exported coherence times and gate durations. Session creation requires a device representable by the provider’s Qiskit adapter.
Keep IQM circuit conversion and preserve Qiskit classical-bit ordering in Amazon Braket results. Submit jobs directly through QDMI so each resource’s configured S3 destination remains effective.