§
    º³Ùgð  ã                   ój   — d Z ddlmZ ej                             d¦  «        d„ ¦   «         Zh d£Zd„ ZdS )zCommon visualization utilities.é    )Ú	optionalszthe latex circuit drawerc                 óF  — ddl }|j                             | j        | j        |                      d¦  «        ¦  «        }|j                             | |¦  «        }|j                             ||dd¦  «        }| 	                    ¦   «         }|r|  
                    |¦  «        } | S )z(Trim a PIL image and remove white space.r   N)r   r   g       @iœÿÿÿ)ÚPILÚImageÚnewÚmodeÚsizeÚgetpixelÚ
ImageChopsÚ
differenceÚaddÚgetbboxÚcrop)Úimager   Ú
backgroundÚdiffÚbboxs        úP/granary/edev/quantum/lib/python3.11/site-packages/qiskit/visualization/utils.pyÚ_trimr      s‘   € ð €J€J€Jà”—’˜uœz¨5¬:°u·~²~ÀfÑ7MÔ7MÑNÔN€JØŒ>×$Ò$ U¨JÑ7Ô7€DØŒ>×Ò˜d D¨#¨tÑ4Ô4€DØ�<Š<‰>Œ>€DØð !Ø—
’
˜4Ñ Ô ˆØ€Ló    >   ú'module://ipykernel.pylab.backend_inlineú)module://matplotlib_inline.backend_inlineÚnbAggc                 ó|   — ddl }|                     ¦   «         t          v r|j                             | ¦  «         dS dS )ae  Close the given matplotlib figure if the backend in use draws figures inline.

    If the backend does not draw figures inline, this does nothing.  This function is to prevent
    duplicate images appearing; the inline backends will capture the figure in preparation and
    display it as well, whereas the drawers want to return the figure to be displayed.r   N)Úmatplotlib.pyplotÚget_backendÚMATPLOTLIB_INLINE_BACKENDSÚpyplotÚclose)ÚfigureÚ
matplotlibs     r   Úmatplotlib_close_if_inliner"   '   sM   € ð ÐÐÐà×ÒÑÔÕ#=Ð=Ð=ØÔ×Ò Ñ'Ô'Ð'Ð'Ð'ð >Ð=r   N)	Ú__doc__Úqiskit.utilsr   Ú
_optionalsÚHAS_PILÚrequire_in_callr   r   r"   © r   r   ú<module>r)      sy   ðð &Ð %à 0Ð 0Ð 0Ð 0Ð 0Ð 0ð Ô×#Ò#Ð$>Ñ?Ô?ð
ð 
ñ @Ô?ð
ðð ð Ð ð
(ð 
(ð 
(ð 
(ð 
(r   