def _merge_single_qubit_ops_to_phxz(
    q: ops.Qid, operations: tuple[ops.Operation, ...]
) -> ops.Operation:
    """Merges [op1, op2, ...] and returns an equivalent op"""
    if len(operations) == 1:
        return operations[0]
    matrices = [unitary_protocol.unitary(op) for op in reversed(operations)]
    product = reduce(np.matmul, matrices)
    gate = single_qubit_decompositions.single_qubit_matrix_to_phxz(product) or ops.I
    return gate.on(q)
Merges [op1, op2, ...] and returns an equivalent op
cirq-core/cirq/transformers/dynamical_decoupling.py