qp.resource

The resource module provides classes and functionality to track the quantum resources (number of qubits, circuit depth, etc.) required to implement advanced quantum algorithms.

Circuit Resource Profiling

estimate(qnode[, level])

Provides a resource estimate of a quantum circuit with respect to the provided compilation target, via rapid analysis of decomposition pathways.

analyze(qnode[, level])

Provides a compile-time resource estimate of a quantum circuit, obtained by analyzing its intermediate representation at the specified compilation level.

track(qnode[, level])

Executes a quantum circuit and tracks the resources it uses.

specs(qnode[, level, compute_depth])

Provides the specifications of a quantum circuit.

Circuit Specification Classes and Utilities

CircuitSpecs([device_name, ...])

Class for storing specifications of a qnode.

Expression(data[, vars, _skip_copy, ...])

Internal class for representing symbolic expressions of resources.

Resources(*, counts[, extra])

Base class for storing resource information.

SpecsResources(*, counts[, extra, circuit_depth])

Class for storing resource information for a quantum circuit.

PBCSpecsResources(*, counts[, extra, ...])

Class for storing resource information for a quantum circuit with additional PBC (Pauli-Based Computation) information.

resources_from_tape(tape[, compute_depth])

Extracts the resource information from a quantum circuit (tape).

register_resource_extension(name, aggregate, ...)

Register aggregation and a report heading for a compiler resource extension.