Skip to content

Reference: Resource Estimator

ResourceEstimator Class

psiqworkbench.resource_estimation.qre.ResourceEstimator

Bases: Protocol

Object providing resource estimates in various formats.

as_qref

as_qref(filename: str | None = None) -> dict[str, Any]

Return representation of this estimator as a dictionary with QREF v1 document.

Parameters:

Name Type Description Default
filename str or None

If provided, save to a YAML file with the given name.

None

as_bartiq

as_bartiq() -> CompiledRoutine[Expr]

Return representation of this estimator as a native Bartiq object.

The returned routine can be either compiled or uncompiled, depending on the internal state of the estimator.

as_resource_analyzer

as_resource_analyzer(filename: str | None = None) -> dict[str, Any]

Return Resource Analyzer graph representation of this estimator.

Parameters:

Name Type Description Default
filename str or None

If provided, save to a JSON file with the given name.

None

resources

resources(**kwargs: Any) -> dict[str, ExprOrNumber]

Return dictionary of top-level resources associated with this estimator.