Skip to content

Devices: Separate concerns in devices #3244

@balopat

Description

@balopat

Problem: The device interface in Cirq defines constraints on the hardware (validation) and decomposition of gates. Many actual device instantiations also support duration_of from when Cirq had schedules. These provide three separate functionalities, validation, mutation, and information. Durations are particularly problematic because it is not true that there is a map from a set of gates to a duration in the hardware, sometimes compilation will behave differently across a single gate type. These should be separated out. Devices can be containers that contain these separate concerns, but it should be possible for users to swap in and out different versions of these functionalities (we should prefer delegation to subclassing, instead of an interface that does each three, there should be three different interfaces each of which can be specified).

Rough requirements

  • Define interfaces for separate concerns, validation, compiling to native gate sets, and information

Metadata

Metadata

Labels

area/devicesroadmapfor higher level roadmap items to capture conversations and feedback (not for project tracking)status/needs-agreed-designWe want to do this, but it needs an agreed upon design before implementationtriage/acceptedA consensus emerged that this bug report, feature request, or other action should be worked on

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions