-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Should _resolve_value pass None through? #4029
Copy link
Copy link
Closed
Labels
area/parametersparameter resolution, parameterized gates, operationsparameter resolution, parameterized gates, operationskind/design-issueA conversation around designA conversation around designtriage/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
Metadata
Metadata
Assignees
Labels
area/parametersparameter resolution, parameterized gates, operationsparameter resolution, parameterized gates, operationskind/design-issueA conversation around designA conversation around designtriage/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
Is your design idea/issue related to a use case or problem? Please describe.
In some cases, we'd like to be able to resolve a parameter to
Noneto signal that the gate should use "default behavior". Previously,Nonewas being used to signal recursion in the parameter resolution code, but this is no longer the case, so it seems like we should be able to do this.Describe your design idea/issue
This would be relatively simple change. In _resolve_value:
Cirq/cirq/study/resolver.py
Line 240 in 47f5908
is Noneand pass that on through. What I'm not sure about is, are we relying onNonenot being pass through anywhere else in Cirq? For example, is there code which assumes that, if the value isNone, don't resolve it?