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

Add cirq.convert_to_target_gateset and implementations of CZ, SqrtIswap target gatesets. #5003

Closed

Conversation

tanujkhattar
Copy link
Collaborator

  • Adds a new interface for defining a compilation target gateset and gives implementation of two common compilation target gatesets:

    • cirq.CompilationTargetGateset : Interface (ABC) to create new compilation target gatesets.
    • cirq.TwoQubitAnalyticalCompilationTarget: Interface for creating two qubit compilation target gatesets with known analytical decompositions
    • cirq.CZTargetGateset, cirq.SqrtIswapTargetGateset : Implementations for CZ and SqrtIswap target gatesets.
  • Adds new transformer primitives for converting any given circuit to a given compilation target gateset.

    • cirq.decompose_operations_to_target_gateset : Attempts to locally convert each operation to target gateset.
    • cirq.convert_to_target_gateset: Also runs pre and post processing transformers before decomposing individual operations to target gateset.
  • Part of Organization (and deprecation) of cirq-core/optimizers in cirq-core/transformers #4722

  • Follows the new Transformer API Compiling: Circuit Transformers API #4483

  • Supports no compile tags NoCompile Tag for optimizers NoCompile Tag for optimizers #4253

TODO: Still need to add more tests. Putting this out there so people can take a look at the general design and give feedback.

cc @MichaelBroughton @dstrain115

@MichaelBroughton
Copy link
Collaborator

Can we close this Draft PR now ?

@tanujkhattar
Copy link
Collaborator Author

Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: L 250< lines changed <1000
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants