Qualtran icon indicating copy to clipboard operation
Qualtran copied to clipboard

Remove _t_complexity_ overrides where `build_call_graph` exists.

Open mpharrigan opened this issue 9 months ago • 0 comments

The t_complexity protocol can quickly use the call graph protocol to derive accurate t counts from subbloqs. This handles meta-bloqs like Adjoint correctly.

For bloqs where build_call_graph is implemented and correct -- the _t_complexity_ override should be removed. If "leaf values" are provided by the _t_complexity_ override, they should be moved to a unit test.

This is of extreme importance for the places where the _t_complexity_(self, adjoint: bool) method has been hacked to accept an adjoint parameter.

mpharrigan avatar Apr 29 '24 21:04 mpharrigan