def _get_combinations_by_layer_for_isolated_xeb(
    circuits: Sequence[cirq.Circuit],
) -> tuple[list[CircuitLibraryCombination], list[cirq.Circuit]]:
    """Helper function used in `sample_2q_xeb_circuits`.

    This creates a CircuitLibraryCombination object for isolated XEB. First, the qubits
    are extracted from the lists of circuits and used to define one pair. Instead of using
    `combinations` to shuffle the circuits for each pair, we just use each circuit (in order)
    for the one pair.
    """
    q0, q1 = _verify_and_get_two_qubits_from_circuits(circuits)
    circuits = [
        circuit.transform_qubits(lambda q: {q0: devices.LineQubit(0), q1: devices.LineQubit(1)}[q])
        for circuit in circuits
    ]
    return [
        CircuitLibraryCombination(
            layer=None, combinations=np.arange(len(circuits))[:, np.newaxis], pairs=[(q0, q1)]
        )
    ], circuits
Helper function used in `sample_2q_xeb_circuits`.

    This creates a CircuitLibraryCombination object for isolated XEB. First, the qubits
    are extracted from the lists of circuits and used to define one pair. Instead of using
    `combinations` to shuffle the circuits for each pair, we just use each circuit (in order)
    for the one pair.
    
cirq-core/cirq/experiments/xeb_sampling.py