def _render_op(
            self, identifier, hs=None, dagger=False, args=None, superop=False):
        """Render an operator

        Args:
            identifier (str or SymbolicLabelBase): The identifier (name/symbol)
                of the operator. May include a subscript, denoted by '_'.
            hs (HilbertSpace): The Hilbert space in which the operator is
                defined
            dagger (bool): Whether the operator should be daggered
            args (list): A list of expressions that will be rendered with
                :meth:`doprint`, joined with commas, enclosed in parenthesis
            superop (bool): Whether the operator is a super-operator
        """
        hs_label = None
        if hs is not None and self._settings['show_hs_label']:
            hs_label = self._render_hs_label(hs)
        name, total_subscript, total_superscript, args_str \
            = self._split_op(identifier, hs_label, dagger, args)
        if self._settings['unicode_op_hats'] and len(name) == 1:
            if superop:
                res = name
            else:
                res = modifier_dict['hat'](name)
        else:
            res = name
        res = render_unicode_sub_super(
            res, [total_subscript], [total_superscript], sub_first=True,
            translate_symbols=True,
            unicode_sub_super=self._settings['unicode_sub_super'])
        res += args_str
        return res
def _render_op ( self , identifier , hs = None , dagger = False , args = None , superop = False ) : hs_label = None if hs is not None and self . _settings [ 'show_hs_label' ] : hs_label = self . _render_hs_label ( hs ) name , total_subscript , total_superscript , args_str = self . _split_op ( identifier , hs_label , dagger , args ) if self . _settings [ 'unicode_op_hats' ] and len ( name ) == 1 : if superop : res = name else : res = modifier_dict [ 'hat' ] ( name ) else : res = name res = render_unicode_sub_super ( res , [ total_subscript ] , [ total_superscript ] , sub_first = True , translate_symbols = True , unicode_sub_super = self . _settings [ 'unicode_sub_super' ] ) res += args_str return res
Render an operator

        Args:
            identifier (str or SymbolicLabelBase): The identifier (name/symbol)
                of the operator. May include a subscript, denoted by '_'.
            hs (HilbertSpace): The Hilbert space in which the operator is
                defined
            dagger (bool): Whether the operator should be daggered
            args (list): A list of expressions that will be rendered with
                :meth:`doprint`, joined with commas, enclosed in parenthesis
            superop (bool): Whether the operator is a super-operator