def create_combination_circuits(
    circuit_templates: Sequence[cirq.Circuit],
    combinations_by_layer: Sequence[rqcg.CircuitLibraryCombination],
    target: _CANONICAL_TARGET_T,
) -> Sequence[XEBWideCircuitInfo]:
    """Zips two-qubit circuits into a single wide circuit for each of the given combinations.

    Args:
        circuit_templates: A sequence of narrow circuits.
        combinations_by_layer: A sequence of combinations.
        target: The target 2Q operation.

    Returns:
        A sequence of XEBWideCircuitInfo representing the wide circuits.
    """
    wide_circuits_info = []
    for layer_comb in combinations_by_layer:
        pairs = layer_comb.pairs
        if isinstance(target, dict):
            pairs = [pair for pair in pairs if pair in target]
            assert pairs
        for comb in layer_comb.combinations:
            wide_circuits_info.append(
                XEBWideCircuitInfo.from_narrow_circuits(
                    circuit_templates,
                    permutation=comb,
                    pairs=layer_comb.pairs,  # type: ignore[arg-type]
                    target=target,
                )
            )
    return wide_circuits_info
Zips two-qubit circuits into a single wide circuit for each of the given combinations.

    Args:
        circuit_templates: A sequence of narrow circuits.
        combinations_by_layer: A sequence of combinations.
        target: The target 2Q operation.

    Returns:
        A sequence of XEBWideCircuitInfo representing the wide circuits.
    
cirq-core/cirq/experiments/benchmarking/parallel_xeb.py