quantumlib / Cirq

A Python framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.
Apache License 2.0
4.24k stars 1.01k forks source link

No longer support `create_calibration_program` and `create_batch_program` #6442

Closed senecameeks closed 7 months ago

senecameeks commented 7 months ago

This change removes support for engine type jobs FocusedCalibration and BatchProgram, but keeps the interface for backwards compatibility

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (33eea01) 97.82% compared to head (e440b57) 97.75%. Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #6442 +/- ## ========================================== - Coverage 97.82% 97.75% -0.07% ========================================== Files 1115 1105 -10 Lines 97390 94897 -2493 ========================================== - Hits 95267 92771 -2496 - Misses 2123 2126 +3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

senecameeks commented 7 months ago

Apologies, this PR kind of ballooned after tracing down all the dependencies for batch.proto and calibration.proto . This PR removes the interfaces for running calibrations and running batch programs. Consequently it removes some data objects related to calibration that are no longer used, although the main objective of this particular PR is removing the interfaces.

senecameeks commented 7 months ago

For more context: There are some idiosyncrasies that were done to remove all dependencies on removed code (e.g calibration_pb2.*) without further ballooning the PR (already 75 files changed), for example in class CalibrationResult I chose to only remove the field code whose object type was removed 'calibration_pb2.CalibrationLayerCode' instead of deleting the CalibrationResult. A followup CL will remove classes CalibrationResult, CalibrationLayer and Calibration from cirq-google/cirq_google/engine/ and the APIs which interface with those classes.

senecameeks commented 7 months ago

Ended up removing the idiosyncrasy noted above by changing the code field type in CalibrationResult to Any, which is a much cleaner handling, IMHO.

@wcourtney PTAL :)