combine_slices

combine_slices(slices, include_barriers=False)[source]

Combine N-qubit slices of a circuit into a single circuit.

Parameters:
  • slices (Sequence[QuantumCircuit]) – The N-qubit circuit slices.

  • include_barriers (bool) – If True, place barriers between each slice.

Returns:

A QuantumCircuit with the slices appended in sequential order.

Raises:

ValueError – Two input slices were defined on different numbers of qubits.

Return type:

QuantumCircuit | None