def _get_dd_sequence_from_schema_name(schema: str) -> tuple[ops.Gate, ...]:
    """Gets dynamical decoupling sequence from a schema name."""
    match schema:
        case 'DEFAULT':
            return (ops.X, ops.Y, ops.X, ops.Y)
        case 'XX_PAIR':
            return (ops.X, ops.X)
        case 'X_XINV':
            return (ops.X, ops.X**-1)
        case 'YY_PAIR':
            return (ops.Y, ops.Y)
        case 'Y_YINV':
            return (ops.Y, ops.Y**-1)
        case _:
            raise ValueError('Invalid schema name.')
Gets dynamical decoupling sequence from a schema name.
cirq-core/cirq/transformers/dynamical_decoupling.py