Refactor CompilerOutput & consolidate into gss - #1432
Open
bharat-thotakura wants to merge 18 commits into
Open
Conversation
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>
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors compiler output parsing to centralize shared JSON-to-output logic in general_superstaq, reducing duplicated parsing/deserialization code across the Cirq and Qiskit client libraries while preserving v0.2 vs v0.3 behavior.
Changes:
- Replace per-client “legacy parser” lambdas with
CompilerOutput.read_json(...)calls (and supportnum_eca_circuits) in Cirq/Qiskit mapping helpers. - Move/centralize Qiskit pulse-gate-circuit deserialization helper into
general_superstaq.serialization. - Update tests to assert on output attributes rather than object equality where structure varies (single vs plural circuit attributes).
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| qiskit-superstaq/qiskit_superstaq/superstaq_provider.py | Updates compile-result mapping to use CompilerOutput.read_json for v0.2 responses. |
| qiskit-superstaq/qiskit_superstaq/superstaq_provider_test.py | Adjusts provider tests to validate returned output fields/shape. |
| qiskit-superstaq/qiskit_superstaq/superstaq_backend.py | Removes legacy parser lambdas and passes circuits_is_list / num_eca_circuits. |
| qiskit-superstaq/qiskit_superstaq/superstaq_backend_test.py | Updates backend compile tests to assert on output attributes. |
| qiskit-superstaq/qiskit_superstaq/compiler_output.py | Removes standalone JSON reader functions; relies on shared base parsing flow with Qiskit-specific deserialization hook. |
| qiskit-superstaq/qiskit_superstaq/compiler_output_test.py | Migrates tests to CompilerOutput.read_json and removes v0.3-specific parsing test. |
| general-superstaq/general_superstaq/service.py | Switches Jaqal compile output parsing to CompilerOutput.read_json_jaqal. |
| general-superstaq/general_superstaq/serialization.py | Introduces shared deserialize_qiskit_circuits helper (with warnings when unavailable). |
| general-superstaq/general_superstaq/compiler_output.py | Adds shared read_json + helpers on BaseCompilerOutput and moves Jaqal parsing into classmethod. |
| general-superstaq/general_superstaq/compiler_output_test.py | Adds/expands tests for the generalized JSON readers, including pulse-gate-circuit paths. |
| cirq-superstaq/cirq_superstaq/service.py | Updates compile-result mapping to use CompilerOutput.read_json for v0.2 responses and support ECA formatting. |
| cirq-superstaq/cirq_superstaq/serialization.py | Removes duplicated Qiskit pulse-gate-circuit deserialization helper (now in general_superstaq). |
| cirq-superstaq/cirq_superstaq/job.py | Routes pulse-gate-circuit deserialization through general_superstaq.serialization. |
| cirq-superstaq/cirq_superstaq/compiler_output.py | Removes standalone JSON reader functions; relies on shared base parsing flow with Cirq-specific deserialization hook. |
| cirq-superstaq/cirq_superstaq/compiler_output_test.py | Migrates tests to CompilerOutput.read_json and keeps behavior checks for pulse/aqt/qscout cases. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.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>
dowusu-antwi
self-requested a review
September 9, 2026 15:38
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.
Factors out independent changes from #1387 and follows up on #1383 (comment)