Cirq icon indicating copy to clipboard operation
Cirq copied to clipboard

Consider adding numpy number types to TParamVal

Open dabacon opened this issue 3 years ago • 4 comments

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

dabacon avatar Jul 13 '22 21:07 dabacon

Also consider moving Scalar type from linear_dict.py to type_alias.py.

tanujkhattar avatar Jul 27 '22 18:07 tanujkhattar

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

vtomole avatar Jul 27 '22 19:07 vtomole