def phased_fsim_angles_from_gate(gate: cirq.Gate) -> dict[str, cirq.TParamVal]:
    """For a given gate, return a dictionary mapping '{angle}_default' to its noiseless value
    for the five PhasedFSim angles."""
    defaults: dict[str, cirq.TParamVal] = {
        'theta_default': 0.0,
        'zeta_default': 0.0,
        'chi_default': 0.0,
        'gamma_default': 0.0,
        'phi_default': 0.0,
    }
    if gate == ops.SQRT_ISWAP:
        defaults['theta_default'] = -np.pi / 4
        return defaults
    if gate == ops.SQRT_ISWAP_INV:
        defaults['theta_default'] = np.pi / 4
        return defaults
    if isinstance(gate, ops.FSimGate):
        defaults['theta_default'] = gate.theta
        defaults['phi_default'] = gate.phi
        return defaults
    if isinstance(gate, ops.PhasedFSimGate):
        return {
            'theta_default': gate.theta,
            'zeta_default': gate.zeta,
            'chi_default': gate.chi,
            'gamma_default': gate.gamma,
            'phi_default': gate.phi,
        }

    # Handle all gates that can be represented using an FSimGate.
    from_unitary = _try_defaults_from_unitary(gate)
    if from_unitary is not None:
        return from_unitary

    raise ValueError(f"Unknown default angles for {gate}.")
For a given gate, return a dictionary mapping '{angle}_default' to its noiseless value
    for the five PhasedFSim angles.
cirq-core/cirq/experiments/xeb_fitting.py