quantumlib / Qualtran

Qᴜᴀʟᴛʀᴀɴ is a Python library for expressing and analyzing Fault Tolerant Quantum algorithms.
https://qualtran.readthedocs.io/en/latest/
Apache License 2.0
132 stars 35 forks source link

Recursive `build_call_graph` does not work #1063

Closed matthagan15 closed 3 weeks ago

matthagan15 commented 3 weeks ago

A "nice to have" feature would be the ability for a recursive build_call_graph decomposition to solve for symbolic recurrence relations if solvable.

fdmalone commented 3 weeks ago

the argument for show_call_graph is not a bloq, it's the graph returned by bloq.call_graph (e.g. https://qualtran.readthedocs.io/en/latest/bloqs/qft/two_bit_ffft.html#call-graph), if that helps.

fdmalone commented 3 weeks ago

Although I'm fairly certain this still won't work as written.

matthagan15 commented 3 weeks ago

Thanks that was the issue, managed to get it working even with symbolics. @tanujkhattar had mentioned it might be possible to use sympy's symbolic solvers to try and see if a recurrence relation could be solved to give an estimate for the resources used if the recurrence is solvable.

fdmalone commented 3 weeks ago

cool