qml.drawer.use_style

use_style(style: str)[source]

Set a style setting. Reset to default style using plt.style.use('default')

Parameters

style (str) – A style specification.

Current styles:

  • 'default'

  • 'black_white'

  • 'black_white_dark'

Example:

qml.drawer.use_style('black_white')

@qml.qnode(qml.device('lightning.qubit', wires=(0,1,2,3)))
def circuit(x, z):
    qml.QFT(wires=(0,1,2,3))
    qml.Toffoli(wires=(0,1,2))
    qml.CSWAP(wires=(0,2,3))
    qml.RX(x, wires=0)
    qml.CRZ(z, wires=(3,0))
    return qml.expval(qml.PauliZ(0))


fig, ax = qml.draw_mpl(circuit)(1.2345,1.2345)
fig.show()
../../_images/black_white_style3.png