
    z	i                         S r SSKJrJr  SSKJrJrJr  SSKJ	r	  SSK
Jr  \" S\\\	4   S	9r\" S
5      r " S S\\\\4   5      rg)z#
Primitive job abstract base class
    )ABCabstractmethod)GenericTypeVarUnion   )PrimitiveResult   )_BasePrimitiveResultV1ResultT)boundStatusTc                       \ rS rSrSrS\SS4S jrS\4S jr\S\	4S j5       r
\S\4S	 j5       r\S\4S
 j5       r\S\4S j5       r\S\4S j5       r\S\4S j5       r\S 5       rSrg)BasePrimitiveJob   z"Primitive job abstract base class.job_idreturnNc                     Xl         X l        g)zInitializes the primitive job.

Args:
    job_id: A unique id in the context of the primitive used to run the job.
    kwargs: Any key value metadata to associate with this job.
N_job_idmetadata)selfr   kwargss      c/home/james-whalen/.local/lib/python3.13/site-packages/qiskit/primitives/base/base_primitive_job.py__init__BasePrimitiveJob.__init__   s         c                     U R                   $ )z'Return a unique id identifying the job.)r   r   s    r   r   BasePrimitiveJob.job_id'   s    ||r   c                     [        S5      e)zReturn the results of the job.z<Subclass of BasePrimitiveJob must implement `result` method.NotImplementedErrorr   s    r   resultBasePrimitiveJob.result+        ""`aar   c                     [        S5      e)zReturn the status of the job.z<Subclass of BasePrimitiveJob must implement `status` method.r"   r   s    r   statusBasePrimitiveJob.status0   r&   r   c                     [        S5      e)z,Return whether the job has successfully run.z:Subclass of BasePrimitiveJob must implement `done` method.r"   r   s    r   doneBasePrimitiveJob.done5   s     ""^__r   c                     [        S5      e)z+Return whether the job is actively running.z=Subclass of BasePrimitiveJob must implement `running` method.r"   r   s    r   runningBasePrimitiveJob.running:   s     ""abbr   c                     [        S5      e)z*Return whether the job has been cancelled.z?Subclass of BasePrimitiveJob must implement `cancelled` method.r"   r   s    r   	cancelledBasePrimitiveJob.cancelled?   s     ""cddr   c                     [        S5      e)zMReturn whether the job is in a final job state such as ``DONE`` or ``ERROR``.zDSubclass of BasePrimitiveJob must implement `is_final_state` method.r"   r   s    r   in_final_stateBasePrimitiveJob.in_final_stateD   s     "R
 	
r   c                     [        S5      e)zAttempt to cancel the job.z<Subclass of BasePrimitiveJob must implement `cancel` method.r"   r   s    r   cancelBasePrimitiveJob.cancelK   r&   r   r   )__name__
__module____qualname____firstlineno____doc__strr   r   r   r   r$   r   r(   boolr+   r.   r1   r4   r7   __static_attributes__ r   r   r   r      s    ,s    b b b b b b `d ` ` c c c e4 e e 
 
 
 b br   r   N)r=   abcr   r   typingr   r   r   
containersr	   base_result_v1r   r   r   r   rA   r   r   <module>rF      sV    $ * * ( 2
)5)?)P#Q
R
)
4bsGGW$45 4br   