cutting#
Circuit cutting
Functions
|
Mutate operators to combine barriers with common names into a single barrier. |
|
Decompose the observables with respect to qubit partition labels. |
|
Replace all nonlocal gates belonging to more than one partition with two-qubit QPD gates. |
|
Generate a list of operators for each partition of the circuit. |
|
Generate a qubit map given a qubit partitioning. |
|
Generate partition labels from the connectivity of a quantum circuit. |
|
Separate the circuit and observables. |
|
Separate the circuit into its disconnected components. |
|
Mutate operators to split barriers into single-qubit barriers. |
|
Transform |
- combine_barriers(operators: Sequential) Sequential[source]#
Mutate operators to combine barriers with common names into a single barrier.
- decompose_observables(observables: ModuleList | None, qubit_labels: Sequence[Hashable]) dict | None[source]#
Decompose the observables with respect to qubit partition labels.
- get_qpd_operators(operators: Sequential, qubit_labels: Sequence[Hashable]) Sequential[source]#
Replace all nonlocal gates belonging to more than one partition with two-qubit QPD gates.
- label_operators(operators: Sequential, qubit_map: Sequence[tuple]) dict[Hashable, list][source]#
Generate a list of operators for each partition of the circuit.
- map_qubit(qubit_labels: Sequence[Hashable]) tuple[list[tuple], dict[Hashable, list]][source]#
Generate a qubit map given a qubit partitioning.
- partition_labels(operators: Sequential, ignore: Callable = <function <lambda>>, keep_idle_wires: bool = False) list[int | None][source]#
Generate partition labels from the connectivity of a quantum circuit.
- partition_problem(operators: Sequential, qubit_labels: Sequence[Hashable] | None = None, observables: ModuleList | None = None) tuple[dict, dict | None][source]#
Separate the circuit and observables.
- separate_operators(operators: Sequential, qubit_labels: Sequence[Hashable] | None = None) dict[source]#
Separate the circuit into its disconnected components.