quantumlib / Cirq

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

Migration of optimizers in vendor packages to new transformers infrastructure. #5028

Closed tanujkhattar closed 1 year ago

tanujkhattar commented 2 years ago

Summarize the task After https://github.com/quantumlib/Cirq/issues/4722, all optimizers in cirq-core have been migrated to the new transformer API https://github.com/quantumlib/Cirq/issues/4483, re-implemented using new moment-preserving transformer primitives and support no-compile tags.

This issue is to track the migration of all optimizers in cirq's vendor packages to the new transformer infrastructure.

Acceptance criteria - when is the task considered done? When the following optimizers have been migrated to new transformer infrastructure.

cirq-google

cirq-ionq

cirq-pasqal

cirq-core/ion

cirq-core/neutral-atoms

cirq-corq/contrib

Note that most of the Convert* type optimizers can be replaced with the newly added cirq.optimize_for_target_gateset transformer. To do the migration, user would just need to create a new target gateset that can be used as an argument to the above transformer. The new gateset can be simply created by deriving from cirq.TwoQubitCompilationTargetGateset. See https://github.com/quantumlib/Cirq/pull/5007 for a sample migration PR.

Part of roadmap: https://github.com/quantumlib/Cirq/issues/3238

dstrain115 commented 2 years ago

I updated Pasqal and neutral atoms, which are now converted.

@tanujkhattar Can you update this list? optimize_for_xmon is now replaced by optimize_for_target_gateset, right? Are any of the other optimizers completed?

tanujkhattar commented 1 year ago

This is now complete.