circuit_knitting.cutting.cutqc.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.

Deprecated since version 0.7.0: The function circuit_knitting.cutting.cutqc.wire_cutting.cut_circuit_wires() is deprecated as of circuit-knitting-toolbox 0.7.0. It will be removed no sooner than CKT v0.8.0. Use the wire cutting or automated cut-finding functionality in the circuit_knitting.cutting package.

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

  • subcircuit_vertices (Sequence[Sequence[int]] | None) – 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 (int | None) – Max number of qubits in each subcircuit

  • max_cuts (int | None) – Max total number of cuts allowed

  • num_subcircuits (Sequence[int] | None) – List of number of subcircuits to try

  • max_subcircuit_cuts (int | None) – Max number of cuts for a subcircuit

  • max_subcircuit_size (int | None) – Max number of gates in a subcircuit

  • verbose (bool) – Flag for printing output of cutting

Return type:

dict[str, Any]

Returns:

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

Raises:

ValueError – The input method does not match the other provided arguments