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

Compiling: Circuit Transformers API #4483

Closed
vcatherine opened this issue Sep 3, 2021 · 2 comments
Closed

Compiling: Circuit Transformers API #4483

vcatherine opened this issue Sep 3, 2021 · 2 comments
Assignees
Labels
kind/roadmap-item for higher level roadmap items to capture conversations and feedback (not for project tracking)

Comments

@vcatherine
Copy link
Collaborator

vcatherine commented Sep 3, 2021

Circuit transformers in Cirq are currently implemented as either a PointOptimizer or independent classes with no common API. The Circuit Transformers API will introduce a common interface for all transformers in Cirq and migrate the existing transformers to this new Interface.

Requirements:

  • Transformer passes should have a uniform API for consistency across the codebase.
  • Transformers should be easily composable s.t. multiple individual transformer passes can be bundled together to form a transformation chain / graph which can be applied to a circuit using a single API call.
  • All Transformers should support a verbose logging mode for easier inspection and understanding of the action of a transformer on the input circuits.

Related

Related issues: Circuit transformer patterns #3237 Circuit transformer organization #3238

@vcatherine vcatherine added the kind/roadmap-item for higher level roadmap items to capture conversations and feedback (not for project tracking) label Sep 3, 2021
@tanujkhattar
Copy link
Collaborator

Commenting again here for reference.

RFC: https://tinyurl.com/cirq-circuit-transformers-api

CirqBot pushed a commit that referenced this issue Jan 21, 2022
Defines `TRANSFORMER_TYPE` and Implements the `@transformer` decorator, as proposed in https://tinyurl.com/cirq-circuit-transformers-api

All existing transformers will be rewritten to follow the new API once this is checked-in. 
Implementation of `TransformerStatsLoggerBase` will follow in a separate PR. 

Part of #4483

cc @maffoo PTAL at all the mypy magic.
MichaelBroughton pushed a commit to MichaelBroughton/Cirq that referenced this issue Jan 22, 2022
…tumlib#4797)

Defines `TRANSFORMER_TYPE` and Implements the `@transformer` decorator, as proposed in https://tinyurl.com/cirq-circuit-transformers-api

All existing transformers will be rewritten to follow the new API once this is checked-in. 
Implementation of `TransformerStatsLoggerBase` will follow in a separate PR. 

Part of quantumlib#4483

cc @maffoo PTAL at all the mypy magic.
CirqBot pushed a commit that referenced this issue Jan 31, 2022
…ronizeTerminalMeasurements` (#4911)

- Part of #4722
- Follows the new Transformer API #4483
- Supports no compile tags NoCompile Tag for optimizers #4253
- Fixes #4907
CirqBot pushed a commit that referenced this issue Mar 14, 2022
…es` (#5054)

- Part of #5028
- Follows the new Transformer API #4483
- Supports no compile tags NoCompile Tag for optimizers #4253
@tanujkhattar
Copy link
Collaborator

Migration of optimizers in vendor packages is being tracked as part of roadmap item #3238

The work on transformer API is now complete, including addition of new docs. I'll mark this as closed.

rht pushed a commit to rht/Cirq that referenced this issue May 1, 2023
…tumlib#4797)

Defines `TRANSFORMER_TYPE` and Implements the `@transformer` decorator, as proposed in https://tinyurl.com/cirq-circuit-transformers-api

All existing transformers will be rewritten to follow the new API once this is checked-in. 
Implementation of `TransformerStatsLoggerBase` will follow in a separate PR. 

Part of quantumlib#4483

cc @maffoo PTAL at all the mypy magic.
rht pushed a commit to rht/Cirq that referenced this issue May 1, 2023
…ronizeTerminalMeasurements` (quantumlib#4911)

- Part of quantumlib#4722
- Follows the new Transformer API quantumlib#4483
- Supports no compile tags NoCompile Tag for optimizers quantumlib#4253
- Fixes quantumlib#4907
rht pushed a commit to rht/Cirq that referenced this issue May 1, 2023
…es` (quantumlib#5054)

- Part of quantumlib#5028
- Follows the new Transformer API quantumlib#4483
- Supports no compile tags NoCompile Tag for optimizers quantumlib#4253
harry-phasecraft pushed a commit to PhaseCraft/Cirq that referenced this issue Oct 31, 2024
…tumlib#4797)

Defines `TRANSFORMER_TYPE` and Implements the `@transformer` decorator, as proposed in https://tinyurl.com/cirq-circuit-transformers-api

All existing transformers will be rewritten to follow the new API once this is checked-in. 
Implementation of `TransformerStatsLoggerBase` will follow in a separate PR. 

Part of quantumlib#4483

cc @maffoo PTAL at all the mypy magic.
harry-phasecraft pushed a commit to PhaseCraft/Cirq that referenced this issue Oct 31, 2024
…ronizeTerminalMeasurements` (quantumlib#4911)

- Part of quantumlib#4722
- Follows the new Transformer API quantumlib#4483
- Supports no compile tags NoCompile Tag for optimizers quantumlib#4253
- Fixes quantumlib#4907
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/roadmap-item for higher level roadmap items to capture conversations and feedback (not for project tracking)
Projects
None yet
Development

No branches or pull requests

3 participants