def sample(self, gate: ops.Gate, prng: np.random.Generator) -> ConstantGauge:
        """Sample the 16 cphase gauges at random.

        Args:
            gate: The CZPowGate to transform.
            prng: The pseudorandom number generator.

        Returns:
            A ConstantGauge implementing the transformation.

        Raises:
            TypeError: if gate is not a CZPowGate
        """

        if not type(gate) == ops.CZPowGate:
            raise TypeError("gate must be a CZPowGate")  # pragma: no cover
        pre_q0, pre_q1 = prng.choice(np.array([ops.I, ops.X, ops.Y, ops.Z]), size=2, replace=True)
        return self._get_constant_gauge(gate, pre_q0, pre_q1)
Sample the 16 cphase gauges at random.

        Args:
            gate: The CZPowGate to transform.
            prng: The pseudorandom number generator.

        Returns:
            A ConstantGauge implementing the transformation.

        Raises:
            TypeError: if gate is not a CZPowGate
        
cirq-core/cirq/transformers/gauge_compiling/cphase_gauge.py