
    z	ic              
      l   S r SSKJr  SSKrSSKJr  SSKJrJr  SSK	J
r
  SS jrSS	 jrSS
 jrSS jrSS jr\R                   R"                  \\R                   R$                  \\R                   R&                  \\R                   R(                  \\R                   R*                  \0r " S S\
5      rg)zThe 'Store' operation.    )annotationsN   )CircuitError)exprtypes)Instructionc                   X4$ )N lvaluervalues     N/home/james-whalen/.local/lib/python3.13/site-packages/qiskit/circuit/store.py_handle_equal_typesr      s
    >    c               D    U [         R                  " XR                  SS94$ )NT)implicit)r   Casttyper   s     r   _handle_implicit_castr      s    499V[[4@@@r   c               N    [        SUR                   SU R                   S35      e)N#an explicit cast is required from '' to ''r   r   r   s     r   _requires_lossless_castr       s)    
<V[[MPVP[P[}\]^
__r   c               N    [        SUR                   SU R                   S35      e)Nr   r   z', which may be lossyr   r   s     r   _requires_dangerous_castr   $   s*    

-fkk]&Mbc r   c                N    [        SUR                   SU R                   S35      e)Nzno cast is possible from 'r   r   r   r   s     r   _no_cast_possibler   *   s&    
3FKK=v{{mSTU
VVr   c                  T   ^  \ rS rSrSrSrSU 4S jjr\S 5       r\S 5       r	Sr
U =r$ )	Store7   a  A manual storage of some classical value to a classical memory location.

This is a low-level primitive of the classical-expression handling (similar to how
:class:`~.circuit.Measure` is a primitive for quantum measurement), and is not safe for
subclassing.Tc                6  > [         R                  " U5      (       d  [        SU S35      e[        R                  " UR
                  UR
                  5      n[        R                  U5      =nc  [        SU 35      eU" X5      u  p[        TU ])  SSSX/5        g)zj
Args:
    lvalue: the memory location being stored into.
    rvalue: the expression result being stored.
r   z' is not an l-valueNzunhandled cast kind required: storer   )r   	is_lvaluer   r   	cast_kindr   _HANDLE_CASTgetRuntimeErrorsuper__init__)selfr   r   r&   handler	__class__s        r   r+   Store.__init__A   s     ~~f%%6(*=>??OOFKK=	#''	22G;!?	{KLL 0!Q(89r   c                     U R                   S   $ )zBGet the l-value :class:`~.expr.Expr` node that is being stored to.r   paramsr,   s    r   r   Store.lvalueQ        {{1~r   c                     U R                   S   $ )zQGet the r-value :class:`~.expr.Expr` node that is being written into the l-value.r   r1   r3   s    r   r   Store.rvalueV   r5   r   r
   )r   	expr.Exprr   r8   )__name__
__module____qualname____firstlineno____doc__
_directiver+   propertyr   r   __static_attributes____classcell__)r.   s   @r   r!   r!   7   s<     J:     r   r!   )r   r8   r   r8   returnztuple[expr.Expr, expr.Expr])r   r8   r   r8   rB   ztyping.NoReturn)r=   
__future__r   typing
exceptionsr   	classicalr   r   instructionr   r   r   r   r   r   CastKindEQUALIMPLICITLOSSLESS	DANGEROUSNONEr'   r!   r
   r   r   <module>rN      s     "  $ " $A`W
 
NN-	NN2	NN4	NN6	NN*"K "r   