qp.labs.estimator_beta.estimate_wires_from_resources

estimate_wires_from_resources(workflow, gate_set=None, config=None, zeroed=0, any_state=0)[source]

Determine the number of auxiliary qubits needed to decompose the operators in a Resources object into a specific gate_set with a given config.

Parameters:
  • workflow (Resources) – the collection of gates and counts to be further decomposed

  • gate_set (set[str] | None) – A set of names (strings) of the fundamental operators to count throughout the quantum workflow. If not provided, the default gate set will be used, i.e., {'Toffoli', 'T', 'CNOT', 'X', 'Y', 'Z', 'S', 'Hadamard'}.

  • config (LabsResourceConfig | None) – configurations for the resource estimation pipeline

  • zeroed (int) – The number of additional auxiliary wires, prepared in the zero state, that can be used as part of the decomposition.

  • any_state (int) – The number of additional auxiliary wires, prepared in any state, that can be used as part of the decomposition.

Returns:

The number of auxiliary qubits used as part of the decomposition. They are separated according to their quantum state at the end of the workflow (any_state, zeroed).

Return type:

tuple(int, int)

Raises:

ValueError – if more qubits were deallocated than initially allocated