def __init__(self, atol: float = 1e-8):
        """Create the Serializer.

        Args:
            atol: Absolute tolerance used in determining whether a gate with a float parameter
                should be serialized as a gate rounded to that parameter. Defaults to 1e-8.
        """
        self.atol = atol
        self._dispatch: dict[type[cirq.Gate], Callable] = {
            cirq.XPowGate: self._serialize_x_pow_gate,
            cirq.YPowGate: self._serialize_y_pow_gate,
            cirq.ZPowGate: self._serialize_z_pow_gate,
            cirq.XXPowGate: self._serialize_xx_pow_gate,
            cirq.YYPowGate: self._serialize_yy_pow_gate,
            cirq.ZZPowGate: self._serialize_zz_pow_gate,
            cirq.CNotPowGate: self._serialize_cnot_pow_gate,
            cirq.HPowGate: self._serialize_h_pow_gate,
            cirq.SwapPowGate: self._serialize_swap_gate,
            cirq.MeasurementGate: self._serialize_measurement_gate,
            # These gates can't be used with any of the non-measurement gates above
            # Rather than validating this here, we rely on the IonQ API to report failure.
            GPIGate: self._serialize_gpi_gate,
            GPI2Gate: self._serialize_gpi2_gate,
            MSGate: self._serialize_ms_gate,
            ZZGate: self._serialize_zz_gate,
        }
Create the Serializer.

        Args:
            atol: Absolute tolerance used in determining whether a gate with a float parameter
                should be serialized as a gate rounded to that parameter. Defaults to 1e-8.
        
cirq-ionq/cirq_ionq/serializer.py