K i pdZddlmZddlmZmZgdZGddeZeZGddeZ e Z dd lmZGd d eZ e Z ejjeed Zejjee d Zejjee dZy)aKinds 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)_KetKindKetKind_BraKindBraKind _OperatorKind OperatorKindc(eZdZdZfdZdZxZS)rzA kind for quantum kets.c&t||}|SNsuper__new__clsobj __class__s `/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/sympy/physics/quantum/kind.pyrz_KetKind.__new__"goc" cy)Nrselfs r__repr__z_KetKind.__repr__&r__name__ __module__ __qualname____doc__rr __classcell__rs@rrr"rrc(eZdZdZfdZdZxZS)rzA kind for quantum bras.c&t||}|Srrrs rrz_BraKind.__new__0rrcy)Nr rrs rrz_BraKind.__repr__4rrrr%s@rrr-r&rr)rc(eZdZdZfdZdZxZS)r zA kind for quantum operators.c&t||}|Srrrs rrz_OperatorKind.__new__@rrcy)Nr rrs rrz_OperatorKind.__repr__Dsrrr%s@rr r =s'rr ctS)z>Perform the kind calculation of NumberKind*KetKind -> KetKind.)rlhsrhss r_mul_number_ket_kindr1X  NrctS)z>Perform the kind calculation of NumberKind*BraKind -> BraKind.)r r.s r_mul_number_bra_kindr4^r2rctS)zHPerform the kind calculation of NumberKind*OperatorKind -> OperatorKind.)r r.s r_mul_operator_kindr6ds  rN)r#sympy.core.mulrsympy.core.kindrr__all__rrrr r r _kind_dispatcherregisterr1r4r6rrrr<s - t *t *!D {H56 {H56 {M:;r