Bengali
Languages
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

qiskit.quantum_info.DensityMatrix.draw

DensityMatrix.draw(output=None, **drawer_args)[source]

Return a visualization of the Statevector.

repr: ASCII TextMatrix of the state's __repr__.

text: ASCII TextMatrix that can be printed in the console.

latex: An IPython Latex object for displaying in Jupyter Notebooks.

latex_source: Raw, uncompiled ASCII source to generate array using LaTeX.

qsphere: Matplotlib figure, rendering of density matrix using plot_state_qsphere().

hinton: Matplotlib figure, rendering of density matrix using plot_state_hinton().

bloch: Matplotlib figure, rendering of density matrix using plot_bloch_multivector().

প্যারামিটার
  • output (str) -- Select the output method to use for drawing the state. Valid choices are repr, text, latex, latex_source, qsphere, hinton, or bloch. Default is repr. Default can be changed by adding the line state_drawer = <default> to ~/.qiskit/settings.conf under [default].

  • drawer_args -- Arguments to be passed directly to the relevant drawing function or constructor (TextMatrix(), array_to_latex(), plot_state_qsphere(), plot_state_hinton() or plot_bloch_multivector()). See the relevant function under qiskit.visualization for that function's documentation.

রিটার্নস

matplotlib.Figure or str or TextMatrix or IPython.display.Latex: Drawing of the Statevector.

রেইজেস

ValueError -- when an invalid output method is selected.