
    z	i                    .    S r SSKJr  SSKrSSKrSrS rg)z*
Depository for generic utility snippets.
    )annotationsNgư>c                   Sn[        U 5      [        U5      :  a  [        X-
  5      U:  a  g[        U 5      [        U5      :  a!  [        X-   5      U:  a  [        R                  $ [        R                  " 5          [        R
                  " S[        S9  [        R                  " X-  5      sSSS5        $ ! , (       d  f       g= f)zD
Computes arccos(n/d) with different (better?) numerical stability.
g{Gzt?g        ignore)categoryN)absnppiwarningscatch_warningsfilterwarningsRuntimeWarningarccos)	numeratordenominator	thresholds      k/home/james-whalen/.local/lib/python3.13/site-packages/qiskit/synthesis/two_qubit/xx_decompose/utilities.pysafe_arccosr      s     I
9~K((S1H-II-U	Y#k*	*s93J/Ki/Wuu$$&##H~F99Y45 '&&s   ;1B66
C)__doc__
__future__r   r
   numpyr   EPSILONr        r   <module>r      s!    #   6r   