§
    º³Ùgf  ã                  óˆ   — d Z ddlmZ ddlZddlmZmZ ddlmZ ddlm	Z	 ddl
mZ ej        rddlmZ  G d	„ d
e¦  «        ZdS )zmPulses are descriptions of waveform envelopes. They can be transmitted by control electronics
to the device.
é    )ÚannotationsN)ÚABCÚabstractmethod)ÚAny)Údeprecate_pulse_func)ÚParameterExpression)ÚBackendc                  óð   — e Zd ZdZdZdZee	 	 d'd(d„¦   «         ¦   «         Ze	d)d„¦   «         Z
e	ed*d„¦   «         ¦   «         Zd+d„Z	 	 	 	 	 	 	 d,d-d!„Zed.d$„¦   «         Zed)d%„¦   «         Zed/d&„¦   «         ZdS )0ÚPulsez§The abstract superclass for pulses. Pulses are complex-valued waveform envelopes. The
    modulation phase and frequency are specified separately from ``Pulse``s.
    )ÚdurationÚnameÚ_limit_amplitudeTNr   úint | ParameterExpressionr   ú
str | NoneÚlimit_amplitudeúbool | Nonec                óL   — |€| j         j        }|| _        || _        || _        dS )a  Abstract base class for pulses
        Args:
            duration: Duration of the pulse
            name: Optional name for the pulse
            limit_amplitude: If ``True``, then limit the amplitude of the waveform to 1.
                             The default value of ``None`` causes the flag value to be
                             derived from :py:attr:`~limit_amplitude` which is ``True``
                             by default but may be set by the user to disable amplitude
                             checks globally.
        N)Ú	__class__r   r   r   r   )Úselfr   r   r   s       úP/granary/edev/quantum/lib/python3.11/site-packages/qiskit/pulse/library/pulse.pyÚ__init__zPulse.__init__'   s0   € ð$ Ð"Ø"œnÔ<ˆOà ˆŒØˆŒ	Ø /ˆÔÐÐó    ÚreturnÚintc                ó    — t          | ¦  «        S )z!Unique identifier for this pulse.)Úid©r   s    r   r   zPulse.id@   s   € õ �$‰xŒxˆr   údict[str, typing.Any]c                ó   — dS )z6Return a dictionary containing the pulse's parameters.N© r   s    r   Ú
parameterszPulse.parametersE   s	   € ð 	ˆr   Úboolc                ó   — t           ‚)z1Return True iff the instruction is parameterized.©ÚNotImplementedErrorr   s    r   Úis_parameterizedzPulse.is_parameterizedK   ó   € å!Ð!r   ÚdtÚmpl2dÚstyleúdict[str, Any] | NoneÚbackendúBackend | NoneÚ
time_rangeútuple[int, int] | NoneÚ	time_unitÚstrÚshow_waveform_infoÚplotterÚaxisú
Any | Nonec           
     ó4   — ddl m}  || |||||||¬¦  «        S )aí  Plot the interpolated envelope of pulse.

        Args:
            style: Stylesheet options. This can be dictionary or preset stylesheet classes. See
                :py:class:`~qiskit.visualization.pulse_v2.stylesheets.IQXStandard`,
                :py:class:`~qiskit.visualization.pulse_v2.stylesheets.IQXSimple`, and
                :py:class:`~qiskit.visualization.pulse_v2.stylesheets.IQXDebugging` for details of
                preset stylesheets.
            backend (Optional[BaseBackend]): Backend object to play the input pulse program.
                If provided, the plotter may use to make the visualization hardware aware.
            time_range: Set horizontal axis limit. Tuple ``(tmin, tmax)``.
            time_unit: The unit of specified time range either ``dt`` or ``ns``.
                The unit of ``ns`` is available only when ``backend`` object is provided.
            show_waveform_info: Show waveform annotations, i.e. name, of waveforms.
                Set ``True`` to show additional information about waveforms.
            plotter: Name of plotter API to generate an output image.
                One of following APIs should be specified::

                    mpl2d: Matplotlib API for 2D image generation.
                        Matplotlib API to generate 2D image. Charts are placed along y axis with
                        vertical offset. This API takes matplotlib.axes.Axes as `axis` input.

                `axis` and `style` kwargs may depend on the plotter.
            axis: Arbitrary object passed to the plotter. If this object is provided,
                the plotters use a given ``axis`` instead of internally initializing
                a figure object. This object format depends on the plotter.
                See plotter argument for details.

        Returns:
            Visualization output data.
            The returned data type depends on the ``plotter``.
            If matplotlib family is specified, this will be a ``matplotlib.pyplot.Figure`` data.
        r   )Úpulse_drawer)Úprogramr*   r,   r.   r0   r2   r3   r4   )Úqiskit.visualizationr7   )	r   r*   r,   r.   r0   r2   r3   r4   r7   s	            r   Údrawz
Pulse.drawO   sH   € ðX 	6Ð5Ð5Ð5Ð5Ð5àˆ|ØØØØ!ØØ1ØØð	
ñ 	
ô 	
ð 		
r   ÚotherÚobjectc                ót   — t          |t          ¦  «        st          S t          |t          | ¦  «        ¦  «        S ©N)Ú
isinstancer   ÚNotImplementedÚtype)r   r;   s     r   Ú__eq__zPulse.__eq__ˆ   s0   € å˜%¥Ñ'Ô'ð 	"Ý!Ð!Ý˜%¥ d¡¤Ñ,Ô,Ð,r   c                ó   — t           ‚r>   r$   r   s    r   Ú__hash__zPulse.__hash__Ž   r'   r   c                ó   — t           ‚r>   r$   r   s    r   Ú__repr__zPulse.__repr__’   r'   r   )NN)r   r   r   r   r   r   )r   r   )r   r   )r   r"   )NNNr(   Tr)   N)r*   r+   r,   r-   r.   r/   r0   r1   r2   r"   r3   r1   r4   r5   )r;   r<   r   r"   )r   r1   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__r   r   r   r   Úpropertyr   r!   r&   r:   rB   rD   rF   r    r   r   r   r      sO  € € € € € ðð ð 9€Ià€OàØð  Ø'+ð	0ð 0ð 0ð 0ñ Ôñ „^ð0ð. ðð ð ñ „Xðð Øðð ð ñ „^ñ „Xðð"ð "ð "ð "ð (,Ø"&Ø-1ØØ#'ØØð7
ð 7
ð 7
ð 7
ð 7
ðr ð-ð -ð -ñ „^ð-ð
 ð"ð "ð "ñ „^ð"ð ð"ð "ð "ñ „^ð"ð "ð "r   r   )rJ   Ú
__future__r   ÚtypingÚabcr   r   r   Úqiskit.utils.deprecate_pulser   Ú"qiskit.circuit.parameterexpressionr   ÚTYPE_CHECKINGÚqiskit.providersr	   r   r    r   r   ú<module>rT      s×   ððð ð #Ð "Ð "Ð "Ð "Ð "à €€€Ø #Ð #Ð #Ð #Ð #Ð #Ð #Ð #Ø Ð Ð Ð Ð Ð Ø =Ð =Ð =Ð =Ð =Ð =à BÐ BÐ BÐ BÐ BÐ Bð 
Ôð )Ø(Ð(Ð(Ð(Ð(Ð(ðv"ð v"ð v"ð v"ð v"ˆCñ v"ô v"ð v"ð v"ð v"r   