Cirq
Cirq copied to clipboard
Consider adding numpy number types to TParamVal
Current we define
TParamVal = Union[float, sympy.Expr]
for parameter values (like exponents in cirq.EigenGates). However in general these also work for numpy types like np.double.
We should consider adding support for these numpy types
Also consider moving Scalar type from linear_dict.py to type_alias.py.
If we do the above then cirq.value.Scalar won't work anymore. We need to decide whether or not that qualifies as a breaking change.
xref https://github.com/quantumlib/Cirq/issues/5745