(label, inits={})
return r'$|%s\rangle$' % label
Slightly more flexible way to render labels.

    >>> from sympy.physics.quantum.circuitplot import render_label
    >>> render_label('q0')
    '$|q0\\\\rangle$'
    >>> render_label('q0', {'q0':'0'})
    '$|q0\\\\rangle=|0\\\\rangle$'
Slightly more flexible way to render labels.
Slightly more flexible way to render labels .
def render_label(label, inits={}):
    """Slightly more flexible way to render labels.

    >>> from sympy.physics.quantum.circuitplot import render_label
    >>> render_label('q0')
    '$|q0\\\\rangle$'
    >>> render_label('q0', {'q0':'0'})
    '$|q0\\\\rangle=|0\\\\rangle$'
    """
    init = inits.get(label)
    if init:
        return r'$|%s\rangle=|%s\rangle$' % (label, init)
    return r'$|%s\rangle$' % label
def render_label ( label , inits = { } ) : init = inits . get ( label ) if init : return r'$|%s\rangle=|%s\rangle$' % ( label , init ) return r'$|%s\rangle$' % label