circuit_knitting_toolbox.circuit_cutting.wire_cutting.cut_circuit_wires

cut_circuit_wires(circuit, method, subcircuit_vertices=None, max_subcircuit_width=None, max_subcircuit_cuts=None, max_subcircuit_size=None, max_cuts=None, num_subcircuits=None, verbose=True)[source]

Decompose the circuit into a collection of subcircuits.

Parameters:
  • method (-) – whether to have the cuts be ‘automatically’ found, in a provably optimal way, or whether to ‘manually’ specify the cuts

  • subcircuit_vertices (-) – the vertices to be used in the subcircuits. Note that these are not the indices of the qubits, but the nodes in the circuit DAG

  • max_subcircuit_width (-) – max number of qubits in each subcircuit

  • max_cuts (-) – max total number of cuts allowed

  • num_subcircuits (-) – list of number of subcircuits to try

  • max_subcircuit_cuts (-) – max number of cuts for a subcircuit

  • max_subcircuit_size (-) – max number of gates in a subcircuit

  • verbose (-) – flag for printing output of cutting

Returns:

A dictionary containing information on the cuts, including the subcircuits themselves (key: ‘subcircuits’)

Return type:

(Dict[str, Any])

Raises:

- ValueError – if the input method does not match the other provided arguments