Closed
Description
The reason is that values can be resolved into instances of sympy.Basic. For instance, repr(cirq.ParamResolver({'a': sympy.Symbol('b') + 1}))
evaluates to "cirq.ParamResolver({'a': b + 1})"
where the b
is not a defined expression.
This is currently blocking JSON serialization of ParamResolver because the serialization test insists that the repr be evaluatable. Should we drop this requirement for ParamResolver? Or should we actually try to get an evaluatable repr for arbitrary sympy.Basic instances? As @mpharrigan mentioned in #2014 we could maybe use sympy.srepr
.
Metadata
Metadata
Assignees
Labels
No labels