def _single_qubit_clifford(rng: np.random.Generator) -> cirq.Gate:
    """Randomly generate a single-qubit Clifford rotation.

    Args:
        rng: Random number generator

    Returns:
        cirq gate
    """

    # there are 24 distinct single-qubit Clifford gates
    clifford_idx = rng.choice(np.arange(24))

    return SingleQubitCliffordGate.to_phased_xz_gate(
        SingleQubitCliffordGate.all_single_qubit_cliffords[clifford_idx]
    )
Randomly generate a single-qubit Clifford rotation.

    Args:
        rng: Random number generator

    Returns:
        cirq gate
    
cirq-core/cirq/transformers/randomized_measurements.py