#NEWLINE# def render_label( label , inits = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) : #NEWLINE# #INDENT# "Slightly more flexible way to render labels.\n\n    >>> from sympy.physics.quantum.circuitplot import render_label\n    >>> render_label('q0')\n    '$|q0\\\\rangle$'\n    >>> render_label('q0', {'q0':'0'})\n    '$|q0\\\\rangle=|0\\\\rangle$'\n    " #NEWLINE# init = inits . get ( label ) #NEWLINE# if inits : #NEWLINE# #INDENT# return ( '$|%s\\rangle=|%s\\rangle$' % ( label , init ) ) #NEWLINE# #UNINDENT# return ( '$|%s\\rangle$' % label )