Add some v0.3.0 API testing in daily integration tests - #1358
Add some v0.3.0 API testing in daily integration tests#1358bharat-thotakura wants to merge 82 commits into
v0.3.0 API testing in daily integration tests#1358Conversation
Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
0c0dab8 to
c1688ba
Compare
Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
Presently, the daily integration test workflow uses only 2 workers from `pytest-xdist` and generally can take a while to finish, waiting on some slower tests relative to others. Anticipating #1358, which [will slow down](https://github.com/Infleqtion/client-superstaq/actions/runs/22884111478) the workflow even more, this PR adds `pytest-split` to break up the (current) total of 44 unit tests from the `css` and `qss` integration tests combined into 4 concurrent workflows, each using 2 workers. (Note: the tests are split up evenly across the 4 workflows (called 'groups'), but `pytest-split` can unevenly group time-consuming tests if given `pytest` timing info) Additionally, on a more speculative & hopeful note, this PR also applies `pytest-split` on the three notebook checks in the regular CI to continue to mitigate against #1129 (with the idea being that each concurrent workflow should now only assign 1 notebook per worker (of course, subject to change if new notebooks are added)). In [initial testing](https://github.com/Infleqtion/client-superstaq/actions/runs/22887601930/job/66403774452), this did not seem to offer much in time reduction due to the small number of notebooks being tested to begin with (& the worker overhead perhaps), but this approach might still be worth experimenting with. Lastly, to confer any potential speed benefits, this PR also updates all relevant CI jobs to use Python 3.14 from the previous Python 3.13 --------- Signed-off-by: Bharath <bharath.thotakura@infleqtion.com> Co-authored-by: richrines1 <85512171+richrines1@users.noreply.github.com>
Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
This reverts commit a1851b7.
|
An example integration test workflow against this branch can be found here |
Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
v0.3.0 API testing in daily integration testsv0.3.0 API testing in daily integration tests
Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Suppressed comments (8)
qiskit-superstaq/qiskit_superstaq/daily_integration_test.py:80
_get_validated_list_compiled_circuitscallsout.compiled_circuits(idx)for every index and then callsout.compiled_circuits()again. This is redundant and can increase job polling/refresh overhead; retrieving the list once and validating it is sufficient.
assert isinstance(out, qss.SuperstaqJobV3)
assert all(
isinstance(out.compiled_circuits(idx), qiskit.QuantumCircuit)
for idx in range(num_circuits)
)
compiled_circuits = out.compiled_circuits()
cirq-superstaq/cirq_superstaq/daily_integration_test.py:82
_get_validated_list_compiled_circuitscallsout.compiled_circuits(idx)for each index and then callsout.compiled_circuits()again. Fetch the list once and validate its contents/length to avoid redundant job refresh/polling calls.
assert isinstance(out, css.JobV3)
assert all(
isinstance(out.compiled_circuits(idx), cirq.Circuit) for idx in range(num_circuits)
)
compiled_circuits = out.compiled_circuits()
qiskit-superstaq/qiskit_superstaq/daily_integration_test.py:60
- In the JobV3 path,
compiled_circuits()/compiled_circuits(0)are called multiple times; even if cached, this adds redundant work and makes debugging failures harder. Cache the result once and assert on it.
This issue also appears on line 75 of the same file.
assert isinstance(out, qss.SuperstaqJobV3)
assert isinstance(out.compiled_circuits(), list)
assert len(out.compiled_circuits()) == 1
assert isinstance(out.compiled_circuits(0), qiskit.QuantumCircuit)
return out.compiled_circuits(0)
qiskit-superstaq/qiskit_superstaq/daily_integration_test.py:47
providerfixture assumesrequest.paramis always set; if a future test uses the fixture without indirect parametrization this will raise at collection/runtime. Consider providing a default API version (e.g., the existing v0.2.0 behavior) to make the fixture safer to reuse.
api_version = request.param
return qss.SuperstaqProvider(api_version=api_version)
qiskit-superstaq/qiskit_superstaq/daily_integration_test.py:122
- This hard-coded exclusion list will be easy to forget and could mask regressions for these targets. Add a TODO describing the removal condition (and ideally link to a tracking issue) so it’s clear when this should be deleted.
# Temporary filtering of targets without target info:
if backend.name not in ("aqt_demo_qpu", "aqt_iqm20q_qpu"):
assert backend.target_info().get("target") == backend.name
assert backend.target.num_qubits is not None
cirq-superstaq/cirq_superstaq/daily_integration_test.py:49
servicefixture unconditionally readsrequest.param; if another test later uses this fixture without indirect parametrization it will fail. Consider defaulting to v0.2.0 so the fixture remains usable without extra decorators.
api_version = request.param
return css.Service(api_version=api_version)
cirq-superstaq/cirq_superstaq/daily_integration_test.py:62
- In the JobV3 path,
compiled_circuits()/compiled_circuits(0)are called repeatedly. Cache the list once and validate against it to avoid redundant work and make failures clearer.
This issue also appears on line 77 of the same file.
assert isinstance(out, css.JobV3)
assert isinstance(out.compiled_circuits(), list)
assert len(out.compiled_circuits()) == 1
assert isinstance(out.compiled_circuits(0), cirq.Circuit)
return out.compiled_circuits(0)
cirq-superstaq/cirq_superstaq/daily_integration_test.py:283
- This hard-coded target exclusion can easily linger and hide regressions for those targets. Add a TODO describing when it can be removed (and ideally a tracking issue link).
# Temporary filtering of targets without target info:
if target_name not in ("aqt_demo_qpu", "aqt_iqm20q_qpu"):
assert service.target_info(target_name).get("target") == target_name
|
Integration test passing against latest commits |
Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
|
Note: update some tests to be less brittle against failures seen in workflows like this |
Closes #1354