Closed
Description
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