-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Should _resolve_value pass None through? #4029
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This seems reasonable to me. I think basically all "primitive" values should get passed through |
I'm not aware of anything like that. My current expectation is that something like If the requirement isn't specifically for |
Marking as triage/accepted based on comments. |
I will go ahead and take this on since there hasn't been movement on this in two months. Please let me know if anyone has already started on this. |
- pass through None as a parameter if set. Fixes: quantumlib#4029
- pass through None as a parameter if set. Technically a breaking change, since this used to silently drop parameters that were set as None. Fixes: #4029
- pass through None as a parameter if set. Technically a breaking change, since this used to silently drop parameters that were set as None. Fixes: quantumlib#4029
- pass through None as a parameter if set. Technically a breaking change, since this used to silently drop parameters that were set as None. Fixes: quantumlib#4029
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
None
to signal that the gate should use "default behavior". Previously,None
was 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 None
and pass that on through. What I'm not sure about is, are we relying onNone
not being pass through anywhere else in Cirq? For example, is there code which assumes that, if the value isNone
, don't resolve it?The text was updated successfully, but these errors were encountered: