qp.labs.estimator_beta.mcx_many_clean_aux_resource_decomp

mcx_many_clean_aux_resource_decomp(num_ctrl_wires, num_zero_ctrl)[source]

Returns a list representing the resources of the operator.

Parameters:
  • num_ctrl_wires (int) – the number of qubits the operation is controlled on

  • num_zero_ctrl (int) – the number of control qubits, that are controlled when in the \(|0\rangle\) state

Resources:

The resources are obtained based on the unary iteration technique described in Babbush et al. (2018). Specifically, the resources are defined as the following rules:

  • If there are no control qubits, treat the operation as a X gate.

  • If there is only one control qubit, treat the resources as a CNOT gate.

  • If there are two control qubits, treat the resources as a Toffoli gate.

  • If there are three or more control qubits (\(n\)), the resources are obtained based on the unary iteration technique described in Babbush et al. (2018). Specifically, it requires \(n - 2\) clean qubits, and produces \(n - 2\) pairs of elbow gates and a single Toffoli.

Returns:

A list of GateCount objects, where each object represents a specific quantum gate and the number of times it appears in the decomposition.

Return type:

list[GateCount]