§
    ¹³Ùgˆ  ã                   óZ   — d Z ddlZddlZddlmZmZ d„ Zddœdefd„Zd	e	fd
„Z
d„ Zd„ ZdS )zF
Deprecation functions for Qiskit Pulse. To be removed in Qiskit 2.0.
é    N)Údeprecate_funcÚdeprecate_argc                 ó:   —  t          dddd¬¦  «        | ¦  «        S )z-Deprecation message for functions and classesú1.3ÚQiskitúin Qiskit 2.0zœThe entire Qiskit Pulse package is being deprecated and will be moved to the Qiskit Dynamics repository: https://github.com/qiskit-community/qiskit-dynamics©ÚsinceÚpackage_nameÚremoval_timelineÚadditional_msg)r   )Úfuncs    úR/granary/edev/quantum/lib/python3.11/site-packages/qiskit/utils/deprecate_pulse.pyÚdeprecate_pulse_funcr      s:   € ð�>ØØØ(ð>ð	ñ ô ð ñô ð ó    F)Úmoving_to_dynamicsr   c                 ó<   ‡ ‡— ˆˆ fd„}|r ||d         ¦  «        S |S )aŠ  Deprecation message for functions and classes which use or depend on Pulse

    Args:
        moving_to_dynamics: set to True if the dependency is moving to Qiskit Dynamics. This affects
            the deprecation message being printed, namely saying explicitly whether the dependency will
            be moved to Qiskit Dynamics or whether it will just be removed without an alternative.
    c           	      óþ   •— t          | j        › d| j        › �¦  «        }d|v r|d d…         }n	d‰vr|dz  }d‰rt          d|› d�¦  «        nt          d	|› d
�¦  «        z   } t          dddd|dœ‰¤Ž| ¦  «        }|S )Nú.z	.__init__i÷ÿÿÿÚis_propertyz()z�The entire Qiskit Pulse package is being deprecated and will be moved to the Qiskit Dynamics repository: https://github.com/qiskit-community/qiskit-dynamics.z Note that ``z`` will be moved as well.z Note that once removed, ``z&`` will have no alternative in Qiskit.r   r   r   r	   © )ÚformatÚ
__module__Ú__qualname__r   )r   Úfully_qual_nameÚmessageÚ	decoratorÚkwargsr   s       €€r   Úmsg_handlerz/deprecate_pulse_dependency.<locals>.msg_handler-   së   ø€ Ý  D¤OÐ!IÐ!I°dÔ6GÐ!IÐ!IÑJÔJˆØ˜/Ð)Ð)Ø-¨c¨r¨cÔ2ˆOˆOØ &Ð(Ð(Ø˜tÑ#ˆOðXð &ð•ÐQ ÐQÐQÐQÑRÔRÐRåØi°/ÐiÐiÐiñô ñð 	ð
•Nð 
ØØ!Ø,Ø"ð	
ð 
ð
 ð
ð 
ð ñô ˆ	ð Ðr   r   r   )r   Úargsr   r   s   ` ` r   Údeprecate_pulse_dependencyr!   #   sG   øø€ ðð ð ð ð ð ð@ ð $Øˆ{˜4 œ7Ñ#Ô#Ð#ØÐr   Úarg_namec           	      ó&   — t          d| dddddœ|¤ŽS )z2Deprecation message for arguments related to Pulser   r   r   zgThe entire Qiskit Pulse package is being deprecated and this argument uses a dependency on the package.)Únamer
   r   r   r   r   )r   )r"   r   s     r   Údeprecate_pulse_argr%   R   s9   € åð ØØØØ(ð>ðð ð ðð ð r   c                 óF   ‡ — t          j        ‰ ¦  «        ˆ fd„¦   «         }|S )z:Ignore deprecation warnings emitted from the pulse packagec                  ó¦   •— t          j        ¦   «         5  t          j        dt          d¬¦  «          ‰| i |¤Žcd d d ¦  «         S # 1 swxY w Y   d S )NÚignorezThe (.*) ``qiskit.pulse)Úcategoryr   )ÚwarningsÚcatch_warningsÚfilterwarningsÚDeprecationWarning)r    r   r   s     €r   Úwrapperz2ignore_pulse_deprecation_warnings.<locals>.wrapperb   s­   ø€ åÔ$Ñ&Ô&ð 	)ð 	)ÝÔ#ØÕ#5Ð?Xðñ ô ð ð �4˜Ð( Ð(Ð(ð		)ð 	)ð 	)ð 	)ñ 	)ô 	)ð 	)ð 	)ð 	)ð 	)ð 	)ð 	)øøøð 	)ð 	)ð 	)ð 	)ð 	)ð 	)s   •$AÁA
ÁA
)Ú	functoolsÚwraps)r   r.   s   ` r   Ú!ignore_pulse_deprecation_warningsr1   _   s:   ø€ õ „_�TÑÔð)ð )ð )ð )ñ Ôð)ð €Nr   c                 ó   ‡ — ˆ fd„}|S )zWPut a given decorator on all the decorated class methods whose name starts with `test_`c                 ó  •— t          | ¦  «        D ]r}|                     d¦  «        r[t          t                               | |¦  «        ¦  «        r3t          | | ‰t                               | |¦  «        ¦  «        ¦  «         Œs| S )NÚtest_)ÚdirÚ
startswithÚcallableÚobjectÚ__getattribute__Úsetattr)ÚclsÚattrr   s     €r   Úcls_wrapperz*decorate_test_methods.<locals>.cls_wrapperp   s‚   ø€ Ý˜‘H”Hð 	Rð 	RˆDØ�Š˜wÑ'Ô'ð R­HµV×5LÒ5LÈSÐRVÑ5WÔ5WÑ,XÔ,Xð RÝ˜˜T 9 9­V×-DÒ-DÀSÈ$Ñ-OÔ-OÑ#PÔ#PÑQÔQÐQøàˆ
r   r   )r   r=   s   ` r   Údecorate_test_methodsr>   m   s$   ø€ ðð ð ð ð ð Ðr   )Ú__doc__r*   r/   Úqiskit.utils.deprecationr   r   r   Úboolr!   Ústrr%   r1   r>   r   r   r   ú<module>rC      s½   ððð ð €€€Ø Ð Ð Ð à BÐ BÐ BÐ BÐ BÐ BÐ BÐ Bð	ð 	ð 	ð BGð ,ð ,ð ,¸$ð ,ð ,ð ,ð ,ð^
 #ð 
ð 
ð 
ð 
ðð ð ð
ð 
ð 
ð 
ð 
r   