Closed peterse closed 3 years ago
Is there a reason we shouldn't just flatten for users? User has original parameters and circuits with formulas. We calculate new parameters where there are no formulas. Use that for simulation or execution. All user cares about is associating original parameters with these results, or am I missing something?
Discussed at Cirq Cynque:
Yea its worth checking whether flattening makes as much of a difference after #3205
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days
Issue closed due to inactivity.
Would it make sense for a param resolver containing many sympy expressions to warn the user of potential slowdowns and point the user towards the flattening utilities?
Looking at @dstrain115's fix in #1899 (comment) a user can potentially improve the simulation time of circuits containing symbols by orders of magnitude using flattening utilities from study.flatten_expressions. I was unaware of this until recently, and I imagine general users may be puzzled by the slowdown incurred by (un-flattened) sympy parameterization.