
    i                        S r SSKJr  SSKrSSKrSSKrSSKJr  SSKJ	r	J
r
  SSKJr  SSKJr  SS	KJr  \" S
S9 " S S5      5       rg)z7Runtime options that control the execution environment.    )annotationsN)	dataclass)OptionalList)Backend   )IBMInputValueError)validate_job_tagsF)initc                      \ rS rSr% SrSrS\S'   SrS\S'   SrS\S'   Sr	S\S	'   Sr
S
\S'   SrS\S'   SrS\S'   SrS\S'           S                 SS jjrSS jrSS jrSrg)RuntimeOptions   zF(DEPRECATED) Class for representing generic runtime execution options.NOptional[str | Backend]backendOptional[str]image	log_levelinstanceOptional[List[str]]job_tagsOptional[int]max_execution_timesession_timeFOptional[bool]privatec	                    [         R                  " S[        SS9  Xl        X l        X0l        X@l        XPl        X`l        Xpl	        Xl
        g)a  RuntimeOptions constructor.

Args:
    backend: target backend to run on.
    image: the runtime image used to execute the primitive, specified in
        the form of ``image_name:tag``. Not all accounts are
        authorized to select a different image.
    log_level: logging level to set in the execution environment. The valid
        log levels are: ``DEBUG``, ``INFO``, ``WARNING``, ``ERROR``, and ``CRITICAL``.
        The default level is ``WARNING``.
    instance: This is only supported on the new IBM Quantum Platform.
    job_tags: Tags to be assigned to the job. The tags can subsequently be used
        as a filter in the :meth:`jobs()` function call.
    max_execution_time: Maximum execution time in seconds, which is based
        on system execution time (not wall clock time). System execution time is the
        amount of time that the system is dedicated to processing your job. If a job exceeds
        this time limit, it is forcibly cancelled. Simulator jobs continue to use wall
        clock time.
    session_time: Length of session in seconds.
    private: Boolean that indicates whether the job is marked as private. When set to true,
        input parameters are not returned, and the results can only be read once.
        After the job is completed, input parameters are deleted from the service.
        After the results are read, these are also deleted from the service.
        When set to false, the input parameters and results follow the
        standard retention behavior of the API.
zThe RuntimeOptions class is deprecated. This class was originally only used to support custom programs, it should not import imported externally.   )
stacklevelN)warningswarnDeprecationWarningr   r   r   r   r   r   r   r   )	selfr   r   r   r   r   r   r   r   s	            \/home/james-whalen/.local/lib/python3.13/site-packages/qiskit_ibm_runtime/runtime_options.py__init__RuntimeOptions.__init__*   sI    L 	I		
 
"  "4(    c                   U R                   (       a1  [        R                  " SU R                   5      (       d  [        S5      eU R                  (       aY  [        [        R                  " U R                  R                  5       5      [        5      (       d  [        U R                   S35      eU R                  (       a  [        U R                  5        gg)zwValidate options.

Args:
    channel: channel type.

Raises:
    IBMInputValueError: If one or more option is invalid.
zE[a-zA-Z0-9]+([/.\-_][a-zA-Z0-9]+)*:[a-zA-Z0-9]+([.\-_][a-zA-Z0-9]+)*$z-"image" needs to be in form of image_name:tagzi is not a valid log level. The valid log levels are: `DEBUG`, `INFO`, `WARNING`, `ERROR`, and `CRITICAL`.N)r   rematchr	   r   
isinstancelogginggetLevelNameupperintr   r
   )r"   channels     r#   validateRuntimeOptions.validate_   s     ::bhhUJJ
 
 %%TUU>>*W-A-A$..BVBVBX-Y[^"_"_$>>" #> ? 
 ==dmm, r&   c                   [        U R                  [        5      (       a  U R                  $ U R                  (       aJ  U R                  R                  S:X  a  U R                  R                  $ U R                  R	                  5       $ g)zGet backend name.r   N)r*   r   strversionname)r"   s    r#   get_backend_nameRuntimeOptions.get_backend_namex   sZ    dllC((<<<<(,(<(<(A4<<$$Zt||GXGXGZZr&   )r   r   r   r   r   r   r   r   )NNNNNNNF)r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   returnNone)r/   r3   r8   r9   )r8   r3   )__name__
__module____qualname____firstlineno____doc__r   __annotations__r   r   r   r   r   r   r   r$   r0   r6   __static_attributes__ r&   r#   r   r      s    P'+G$+E=#I}#"Hm"$(H!((,,"&L-&#G^# ,0##'"&(,,0&*"'3(3 3 !	3
  3 &3 *3 $3  3 
3j-2r&   r   )r>   
__future__r   r(   r+   r   dataclassesr   typingr   r   qiskit.providers.backendr   
exceptionsr	   utilsr
   r   rA   r&   r#   <module>rH      sF    > " 	   ! ! , * $ ` ` `r&   