qml.drawer.use_style¶
-
use_style
(style)[source]¶ Set a style setting. Reset to default style using
use_style('black_white')
- Parameters
style (str) – A style specification.
Current styles:
'default'
'black_white'
'black_white_dark'
'sketch'
'pennylane'
'pennylane_sketch'
'sketch_dark'
'solarized_light'
'solarized_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.Z(0)) fig, ax = qml.draw_mpl(circuit)(1.2345,1.2345) fig.show()
code/api/pennylane.drawer.use_style
Download Python script
Download Notebook
View on GitHub