get_cost_value#

Compute the specified cost of the provided bloq.

bloq

The bloq to compute the cost of.

cost_key

A CostKey that specifies which cost to compute.

costs_cache

If provided, use this dictionary of cached cost values. Values in this dictionary will be preferred over computed values (even if they disagree). This dictionary will be mutated by the function.

generalizer

If provided, run this function on each bloq in the call graph to dynamically modify attributes. If the function returns None, the bloq is ignored in the cost computation. If a sequence of generalizers is provided, each generalizer will be run in order.