o
    ª3Ih  ã                   @   s¼   d Z ddlmZ ddlmZmZ g d¢ZG dd„ deƒZeƒ ZG dd„ deƒZ	e	ƒ Z
dd	lmZ G d
d„ deƒZeƒ Zej ee¡dd„ ƒZej ee	¡dd„ ƒZej ee¡dd„ ƒZdS )aÖ  Kinds for Operators, Bras, and Kets.

This module defines kinds for operators, bras, and kets. These are useful
in various places in ``sympy.physics.quantum`` as you often want to know
what the kind is of a compound expression. For example, if you multiply
an operator, bra, or ket by a number, you get back another operator, bra,
or ket - even though if you did an ``isinstance`` check you would find that
you have a ``Mul`` instead. The kind system is meant to give you a quick
way of determining how a compound expression behaves in terms of lower
level kinds.

The resolution calculation of kinds for compound expressions can be found
either in container classes or in functions that are registered with
kind dispatchers.
é    )ÚMul)ÚKindÚ_NumberKind)Ú_KetKindÚKetKindÚ_BraKindÚBraKindÚ_OperatorKindÚOperatorKindc                       ó(   e Zd ZdZ‡ fdd„Zdd„ Z‡  ZS )r   zA kind for quantum kets.c                    ó   t ƒ  | ¡}|S ©N©ÚsuperÚ__new__©ÚclsÚobj©Ú	__class__© úZ/home/air/sanwanet/gpt-api/venv/lib/python3.10/site-packages/sympy/physics/quantum/kind.pyr   "   ó   z_KetKind.__new__c                 C   ó   dS )Nr   r   ©Úselfr   r   r   Ú__repr__&   ó   z_KetKind.__repr__©Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   Ú__classcell__r   r   r   r   r      ó    r   c                       r   )r   zA kind for quantum bras.c                    r   r   r   r   r   r   r   r   0   r   z_BraKind.__new__c                 C   r   )Nr   r   r   r   r   r   r   4   r   z_BraKind.__repr__r   r   r   r   r   r   -   r$   r   )r   c                       r   )r	   zA kind for quantum operators.c                    r   r   r   r   r   r   r   r   @   r   z_OperatorKind.__new__c                 C   r   )Nr
   r   r   r   r   r   r   D   r   z_OperatorKind.__repr__r   r   r   r   r   r	   =   r$   r	   c                 C   ó   t S )z>Perform the kind calculation of NumberKind*KetKind -> KetKind.)r   ©ÚlhsÚrhsr   r   r   Ú_mul_number_ket_kindX   ó   r)   c                 C   r%   )z>Perform the kind calculation of NumberKind*BraKind -> BraKind.)r   r&   r   r   r   Ú_mul_number_bra_kind^   r*   r+   c                 C   r%   )zHPerform the kind calculation of NumberKind*OperatorKind -> OperatorKind.)r
   r&   r   r   r   Ú_mul_operator_kindd   r*   r,   N)r"   Úsympy.core.mulr   Úsympy.core.kindr   r   Ú__all__r   r   r   r   r	   r
   Ú_kind_dispatcherÚregisterr)   r+   r,   r   r   r   r   Ú<module>   s"    


