Skip to content

Refactor CompilerOutput & consolidate into gss - #1432

Open
bharat-thotakura wants to merge 18 commits into
mainfrom
bt/refactor-compiler-output
Open

Refactor CompilerOutput & consolidate into gss#1432
bharat-thotakura wants to merge 18 commits into
mainfrom
bt/refactor-compiler-output

Conversation

@bharat-thotakura

Copy link
Copy Markdown
Contributor

Factors out independent changes from #1387 and follows up on #1383 (comment)

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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 support num_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.

Comment thread general-superstaq/general_superstaq/compiler_output.py Outdated
bharat-thotakura and others added 10 commits July 31, 2026 18:01
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>
@CLAassistant

CLAassistant commented Aug 26, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

bharat-thotakura and others added 3 commits August 27, 2026 14:34
Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
@dowusu-antwi
dowusu-antwi self-requested a review September 9, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants