Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cirq_google.run_calibrations should work with SimulatedLocalEngines #5978

Closed
augustehirth opened this issue Jan 5, 2023 · 2 comments
Closed
Assignees
Labels
area/calibration area/google kind/feature-request Describes new functionality triage/accepted A consensus emerged that this bug report, feature request, or other action should be worked on

Comments

@augustehirth
Copy link
Collaborator

Floquet calibration is a notebook that was designed to use the currently offline QCS to demonstrate how to calibrate a circuit to compensate for the errors that would arise by running it on a (QCS) device.

Without supplying QCS credentials, the notebook defaults to using a

class SimulatedLocalEngine(AbstractLocalEngine):
per this line:
engine = create_noiseless_virtual_engine_from_latest_templates()

The notebook later fails because SimulatedLocalProcessor's run_calibration_async function is NotImplemented:

async def run_calibration_async(self, *args, **kwargs):
raise NotImplementedError

Note: For now, you need to set processor_id to weber to get past the first bug in this notebook.

For reference, EngineProcessor has an implementation:

async def run_calibration_async(

that calls Engine's implementation:
async def run_calibration_async(

that calls EngineProgram's implementation:
async def run_calibration_async(

that actually creates the job.


It would be useful to be able to run calibrations on simulated engines, for the sake of:

  1. Testing workflows with simulated engines before slotting in a hardware-backed engine.
  2. Teaching how calibration works and demonstrating it's effects without access to hardware.
  3. Experimenting with modified and new calibration procedures without access to hardware.

Specifically, let's implement cirq_google.simulated_local_processor.SimulatedLocalProcessor.run_calibration_async to have the same effective functionality as cirq_google.engine_processor.EngineProcessor.run_calibration_async. It should be able to handle the same input and produce the same output, with the caveat that any circuit executions are instead performed by the simulated processor.

I'm not sure what the scope of this request is, since SimulatedLocalProcessor and EngineProcessor seem to be relatively parallel constructs, and there seems to be a decent amount of complexity in handling protobuf'd requests.

Tentative priority: P2?

@augustehirth augustehirth added the kind/feature-request Describes new functionality label Jan 5, 2023
@augustehirth
Copy link
Collaborator Author

@dstrain115 @tanujkhattar

@tanujkhattar tanujkhattar added the triage/accepted A consensus emerged that this bug report, feature request, or other action should be worked on label Jan 18, 2023
@dstrain115
Copy link
Collaborator

This is no longer relevant after #6442 removed this functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/calibration area/google kind/feature-request Describes new functionality triage/accepted A consensus emerged that this bug report, feature request, or other action should be worked on
Projects
None yet
Development

No branches or pull requests

4 participants