Skip to content

Compiling: heuristic for compiling 2 qubits gates to the native gateset #4362

@tanujkhattar

Description

@tanujkhattar

Is your feature request related to a use case or problem? Please describe.
Approximate compilation to arbitrary target gatesets is a useful compilation primitive for the NISQ era. Currently, cirq only has GateTabulation method in cirq_google which supports approximate compilation to arbitrary target gatesets. However, being in cirq_google, GateTabulation is not very easily discoverable.

There are also other nice approximate compilation techniques like https://arxiv.org/pdf/2106.15490.pdf which should exist in cirq_core.

Describe the solution you'd like
Implement approximate compilation routine based on NuOps and bring GateTabulation to Cirq core

  • The GateTabulation compilation technique is not specific to cirq_google and should exist in cirq_core. There have also been requests in the past to implement a generic optimizer based on GateTabulation (Add a generic Optimizer that makes use of GateTabulation #4059), which should also exist in cirq_core.
  • The NuOps compilation method described https://arxiv.org/pdf/2106.15490.pdf is very similar to GateTabulation, but smarter in the sense that instead of first trying to tabulate the weyl chamber by generating random single qubit unitaries it rather considers the rotation angles of single qubit unitaries as optimization parameters and uses a numerical optimizer to find those angles for a given target unitary. This removes the heavy precomputation stage needed for GateTabulation and should potentially also improve the accuracy. It also allows for noise adoptability during gate compilation by enabling compilation to different base gates for different target unitaries (which is still possible by GateTabulation but would need a precomputation stage for each different base gate).

What is the urgency from your perspective for this issue? Is it blocking important work?
This work should be done as part of the gate compiling roadmap item (#3239) and we should eventually aim for a suit of approximate compilation methods similar to the various exact kak based analytical gate synthesis methods that exist today.

P2 - we should do it in the next couple of quarters

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/gate-compilationcomplexity/highintroduces/modifies 6+ concepts or touches Cirq core concepts or > 1 month for an expertgood for learningFor beginners in QC, this will help picking up some knowledge. Bit harder than "good first issues"kind/feature-requestDescribes new functionalitytriage/acceptedA consensus emerged that this bug report, feature request, or other action should be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions