show_call_graph#

Display a graph representation of the call graph.

item

Either a networkx graph or a bloq. If a networkx graph, it should be a “call graph” which is passed verbatim to the graph drawer and the additional arguments to this function are ignored. If it is a bloq, the factory method GraphvizCallGraph.from_bloq() is used to construct the call graph, compute relevant costs, and display the call graph annotated with the costs.

max_depth

The maximum depth (from the root bloq) of the call graph to draw. Note that the cost computations will walk the whole call graph, but only the nodes within this depth will be drawn.

agg_gate_counts

One of ‘factored’, ‘total_t’, ‘t_and_ccz’, or ‘beverland’ to (optionally) aggregate the gate counts. If not specified, the ‘factored’ approach is used where each type of gate is counted individually.