test(device_gateway): refactor ServerImpl tests for new plugin API#74
Draft
orangekame3 wants to merge 5 commits intodevelopfrom
Draft
test(device_gateway): refactor ServerImpl tests for new plugin API#74orangekame3 wants to merge 5 commits intodevelopfrom
orangekame3 wants to merge 5 commits intodevelopfrom
Conversation
- Remove CircuitPluginManager usage; rely on backend-only manager - Update test config to new schema (plugin.name, device_info, paths) - Adjust DI in tests by setting _backend_manager post-init - Simplify unsupported-backend test to reflect new init behavior - .gitignore: ignore tmp/**/* while keeping tests/fixtures tracked - deps(pyproject): point qubex to branch chore/qubecalib-unused Why: Align tests and configs with the updated plugin architecture and config format in qubex; ensure CI uses compatible qubex changes and avoid committing temporary files while preserving test fixtures.
- Remap qubit physical_ids Q29–Q31 to Q00–Q02 and add Q03 - Update couplings to (0→1), add (0→2), (3→1), and (3→2) - Replace calib_note.json with CR parameter schema for Q00–Q03 pairs - Remove Q02A from box.yaml and normalize inline comment spacing - Aligns tests with latest device layout and calibration data for consistency
Replace "Q00"–"Q03" with 0–3 for qubits 0–3 in the test fixture. Aligns the fixture with the expected schema (integer physical_id), avoiding type mismatches and simplifying comparisons in tests.
- Introduce tests for QubexCircuit covering: - backend initialization - cx/sx gates with valid targets returning PulseSchedule - invalid qubits/pairs raising ValueError with specific messages - barrier returning expected string - delay on valid qubit returning PulseSchedule - compile of a simple QuantumCircuit returning PulseSchedule and setting classical_registers to ["Q01", "Q00"] - Add props.yaml fixture for Qubex device properties to support tests Motivation: improve coverage and ensure correct scheduling, register mapping, and error handling in the Qubex plugin to prevent regressions.
- Add bell_circuit pytest fixture in conftest creating a Bell state with RZ, SX, and CX gates (measured), and import QuantumCircuit there. - Update Qubex compile test to use the new fixture and rename to test_compile_bell_circuit; remove inline circuit creation and QuantumCircuit import. Why: centralizes circuit construction for reuse, aligns with the backend’s supported gate set (rz/sx/cx), and improves test realism and coverage of the compile path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why:
Align tests and configs with the updated plugin architecture and config
format in qubex; ensure CI uses compatible qubex changes and avoid
committing temporary files while preserving test fixtures.