Skip to content

Compiling: Organize Gate Relationships #3242

Closed
@balopat

Description

@balopat

Problem: There are currently 40 different gates in Cirq. Many of these gates are related to each other. A common pattern here is that a gate exists which is a subset of a more generalized gate. This is particularly confusing when one attempts to use isinstance on gates. In addition many gates implement the decompose protocol, and so there is some hidden relationship between these gates when they are decomposed. This feature would be to define what is allowed for the relationship between gates and how decompose should be defaulted and documented. A further question to be resolved in this feature is whether some of this organization should be delegated to gate set concepts.

Rough requirements:

  • Catalog current gate relationships
  • Define allowed relationships between gates and implement
  • Decide how decompose should be used for Cirq gates. For example should decompose not be implemented for the base Cirq gates and only allowed for composite gates that do not define their own action?

Metadata

Metadata

Assignees

Labels

area/gatesroadmapfor higher level roadmap items to capture conversations and feedback (not for project tracking)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions