qiskit_addon_cutting.find_cuts

find_cuts(circuit, optimization, constraints)[source]

Find cut locations in a circuit, given optimization parameters and cutting constraints.

Parameters:
  • circuit (QuantumCircuit) – The circuit to cut. The input circuit may not contain gates acting on more than two qubits.

  • optimization (OptimizationParameters) – Options for controlling optimizer behavior. Currently, the optimal cuts are chosen using Dijkstra’s best-first search algorithm.

  • constraints (DeviceConstraints) – Constraints on how the circuit may be partitioned

Return type:

tuple[QuantumCircuit, dict[str, float]]

Returns:

A circuit containing BaseQPDGate instances. The subcircuits resulting from cutting these gates will be runnable on the devices meeting the constraints.

A metadata dictionary:
  • cuts: A list of length-2 tuples describing each cut in the output circuit. The tuples are formatted as (cut_type: str, cut_id: int). The cut ID is the index of the cut gate or wire in the output circuit’s data field.

  • sampling_overhead: The sampling overhead incurred from cutting the specified gates and wires.

  • minimum_reached: A bool indicating whether or not the search conclusively found the minimum of cost function. minimum_reached = False could also mean that the cost returned was actually the lowest possible cost but that the search was not allowed to run long enough to prove that this was the case.

Raises:

ValueError – The input circuit contains a gate acting on more than 2 qubits.