Module: resource_counting#
Analysis routines for computing costs and resource counts.
Modules#
classify_bloqs module
generalizers: Bloq counting generalizers.
t_counts_from_sigma module
Classes#
class SympySymbolAllocator: A class that allocates unique sympy symbols for integrating out bloq attributes.
class CostKey: Abstract base class for different types of costs.
class SuccessProb: The success probability of a bloq.
class QubitCount: A cost estimating the number of qubits required to implement a bloq.
class BloqCount: A cost which is the count of a specific set of bloqs forming a gateset.
class QECGatesCost: Counts specifically for ‘expensive’ gates in a surface code error correction scheme.
class GateCounts: A data class of counts of the typical target gates in a compilation.
Functions#
big_O(...): Helper to deal with CS-style big-O notation that takes the infinite limit by default.
build_cbloq_call_graph(...): Count all the subbloqs in a composite bloq.
format_call_graph_debug_text(...): Print the graph returned from get_bloq_counts_graph.
get_bloq_call_graph(...): Recursively build the bloq call graph and call totals.
get_bloq_callee_counts(...): Get the direct callees of a bloq and the number of times they are called.
get_cost_cache(...): Build a cache of cost values for the bloq and its callees.
get_cost_value(...): Compute the specified cost of the provided bloq.
query_costs(...): Compute a selection of costs for a bloq and its callees.