-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
area/circuitsarea/deviceskind/deprecationkind/feature-requestDescribes new functionalityDescribes new functionalitytriage/acceptedA consensus emerged that this bug report, feature request, or other action should be worked onA consensus emerged that this bug report, feature request, or other action should be worked on
Description
Currently, each and every cirq.Circuit
has a device
attribute which defaults to UnconstrainedDevice
. I think the original idea was that validation of device constraints would happen during circuit construction.
- This strikes me as strange. It makes more sense to me to have a device validate a circuit.
- Separating validation from circuit construction would permit more useful validation functionality. For example: instead of erroring out at the first bad gate, you could return a list of all the problems found and/or suggestions on how to fix problems identified
- In my experience, no one uses
cirq.Circuit.device
. You could argue that this attribute is a good marker for how the circuit has been compiled (i.e. what it's targeted at) but the provided compilers / circuit transformers don't set this property on the resultant circuit.
xref #3244
Metadata
Metadata
Assignees
Labels
area/circuitsarea/deviceskind/deprecationkind/feature-requestDescribes new functionalityDescribes new functionalitytriage/acceptedA consensus emerged that this bug report, feature request, or other action should be worked onA consensus emerged that this bug report, feature request, or other action should be worked on