value_of(value: Union[cirq.TParamKey, float]) → cirq.TParamVal¶
Attempt to resolve a parameter to its assigned value.Floats are returned without modification. Strings are resolved viathe parameter dictionary with exact match only. Otherwise, stringsare considered to be sympy.Symbols with the name as the input string.A sympy.Symbol is first checked for exact match in the parameterdictionary. Otherwise, it is treated as a sympy.Basic.
A sympy.Basic is resolved using sympy substitution.Note that passing a formula to this resolver can be slow due to theunderlying sympy library. For circuits relying on quick performance,it is recommended that all formulas are flattened before-hand usingcirq.flatten or other means so that formula resolution is avoided.If unable to resolve a sympy.Symbol, returns it unchanged.If unable to resolve a name, returns a sympy.Symbol with that name.
value – The parameter to try to resolve.
The value of the parameter as resolved by this resolver.