(cls, *args, **old_assumptions)
return inst
Construct a new quantum object.

        Parameters
        ==========

        args : tuple
            The list of numbers or parameters that uniquely specify the
            quantum object. For a state, this will be its symbol or its
            set of quantum numbers.

        Examples
        ========

        >>> from sympy.physics.quantum.qexpr import QExpr
        >>> q = QExpr(0)
        >>> q
        0
        >>> q.label
        (0,)
        >>> q.hilbert_space
        H
        >>> q.args
        (0,)
        >>> q.is_commutative
        False
Construct a new quantum object.
Construct a new quantum object .
def __new__(cls, *args, **old_assumptions):
        """Construct a new quantum object.

        Parameters
        ==========

        args : tuple
            The list of numbers or parameters that uniquely specify the
            quantum object. For a state, this will be its symbol or its
            set of quantum numbers.

        Examples
        ========

        >>> from sympy.physics.quantum.qexpr import QExpr
        >>> q = QExpr(0)
        >>> q
        0
        >>> q.label
        (0,)
        >>> q.hilbert_space
        H
        >>> q.args
        (0,)
        >>> q.is_commutative
        False
        """

        # First compute args and call Expr.__new__ to create the instance
        args = cls._eval_args(args)
        if len(args) == 0:
            args = cls._eval_args(tuple(cls.default_args()))
        inst = Expr.__new__(cls, *args, **old_assumptions)
        # Now set the slots on the instance
        inst.hilbert_space = cls._eval_hilbert_space(args)
        return inst
def __new__ ( cls , * args , * * old_assumptions ) : # First compute args and call Expr.__new__ to create the instance args = cls . _eval_args ( args ) if len ( args ) == 0 : args = cls . _eval_args ( tuple ( cls . default_args ( ) ) ) inst = Expr . __new__ ( cls , * args , * * old_assumptions ) # Now set the slots on the instance inst . hilbert_space = cls . _eval_hilbert_space ( args ) return inst