Skip to content

test(device_gateway): refactor ServerImpl tests for new plugin API#74

Draft
orangekame3 wants to merge 5 commits intodevelopfrom
test/qubex
Draft

test(device_gateway): refactor ServerImpl tests for new plugin API#74
orangekame3 wants to merge 5 commits intodevelopfrom
test/qubex

Conversation

@orangekame3
Copy link
Member

  • 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.

- 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.
@github-actions github-actions bot added the test Adding or correcting existing tests label Dec 9, 2025
- 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Adding or correcting existing tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant