Skip to content

Classical Control: Loops/Branches/Conditions #3234

@balopat

Description

@balopat

Problem: Cirq currently only supports a single unrolled circuit. In Feedforward above a simple example of a flow control primitive, a simple conditional is considered. This feature is to expand the set of flow control primitives. Examples of these primitives could be count-controlled loops (for loops), condition-controlled loops (while blocks), collection-controlled loops (for loops for collections), early exit from loops, skipping from loops, case statements. In addition to the flow controls themselves, specification of what can be done with the data that is consumed and produced by these flow controls needs to be specified.

Depends on feature: Classical data (#3231)

Rough requirements:

  • Allow users to use flow control statements in their programs
  • Specify how execution unrolls.
  • Support serialization of the specification of flow control.
  • Fit in with the specification of data in the Classical Data feature

Metadata

Metadata

Labels

area/classicalroadmapfor 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