pyqpanda.Visualization.circuit_draw

Module Contents

Functions

draw_circuit_pic(prog, pic_name[, scale, verbose, fold])

draw_qprog(prog[, output, scale, fold, filename, ...])

Draw a quantum circuit to different formats (set by output parameter):

show_prog_info_count(prog)

pyqpanda.Visualization.circuit_draw.draw_circuit_pic(prog, pic_name, scale=0.7, verbose=False, fold=30)[源代码]
pyqpanda.Visualization.circuit_draw.draw_qprog(prog, output=None, scale=0.7, fold=30, filename=None, with_logo=False, line_length=100, NodeIter_first=None, NodeIter_second=None, console_encode_type='utf8')[源代码]

Draw a quantum circuit to different formats (set by output parameter):

text: ASCII art TextDrawing that can be printed in the console. text: ASCII art TextDrawing that can be printed in the console.

pic: images with color rendered purely in Python.

latex: latex source code of circuit

Args:

prog : the quantum circuit to draw scale (float): scale of image to draw (shrink if < 1). Only used by the pic outputs. flod (int): x_max_size of image to draw. dOnly used by the pic outputs. Default is 30. filename (str): file path to save image to NodeIter_first: circuit printing start position. NodeIter_second: circuit printing end position. console_encode_type(str): Target console encoding type.

Mismatching of encoding types may result in character confusion, 'utf8' and 'gbk' are supported. Only used by the pic outputs.

line_length (int): Sets the length of the lines generated by text output type.

Returns:

no return

pyqpanda.Visualization.circuit_draw.show_prog_info_count(prog)[源代码]