classify_t_count_by_bloq_type#
View source on GitHub
|
Classify (bin) the T count of a bloq’s call graph by type of operation.
qualtran.resource_counting.classify_bloqs.classify_t_count_by_bloq_type(
bloq: qualtran.Bloq,
bloq_classification: Optional[Dict[str, str]] = None,
generalizer: Optional[Union['GeneralizerT', Sequence['GeneralizerT']]] = None
) -> Dict[str, Union[int, sympy.Expr]]
Args
bloqthe bloq to classify.
bloq_classificationAn optional dictionary mapping bloq_classifications to bloq types.
generalizerIf provided, run this function on each (sub)bloq to replace attributes that do not affect resource estimates with generic sympy symbols. If the function returns
None, the bloq is omitted from the counts graph. If a sequence of generalizers is provided, each generalizer will be run in order.
Returns classified_bloqs: dictionary containing the T count for different types of bloqs.
View source on GitHub