QPanda3
0.1.0
Supported by OriginQ
|
Functions | |
draw_circuit_profile (Union[pq.QCircuit, pq.QProg] circuit, dict gate_times, bool is_show=False, str out_file=None) | |
Draw a profile of the quantum circuit's performance. | |
_find_layers (G) | |
draw_circuit_DAG (pq.QCircuit circuit, bool is_show=False, save_fn=None) | |
Draw the Directed Acyclic Graph (DAG) representation of the quantum circuit. | |
draw_circuit_features (Union[pq.QCircuit, pq.QProg] circuit, bool is_show=False, str save_fn=None, str title='') | |
Draws the features of a quantum circuit and visualizes them as a radar chart. | |
|
protected |
pyqpanda3.profiling.profiling.draw_circuit_DAG | ( | pq.QCircuit | circuit, |
bool | is_show = False, | ||
save_fn = None ) |
Draw the Directed Acyclic Graph (DAG) representation of the quantum circuit.
circuit | The quantum circuit object to be drawn, which contains the structure and details of the circuit. |
is_show | A boolean flag indicating whether to display the DAG graph after drawing. Defaults to False. |
save_fn | A function or method to save the generated DAG representation. If provided, the graph will be saved according to the specified function. If None, the graph will not be saved. |
pyqpanda3.profiling.profiling.draw_circuit_features | ( | Union[pq.QCircuit, pq.QProg] | circuit, |
bool | is_show = False, | ||
str | save_fn = None, | ||
str | title = '' ) |
Draws the features of a quantum circuit and visualizes them as a radar chart.
This function takes a quantum circuit or program as input, computes various features such as connectivity, liveness, parallelism, entanglement, and depth, and then plots these features in a radar chart.
circuit | The quantum circuit or program to analyze. This can be either an instance of pq.QCircuit or pq.QProg . |
is_show | A boolean flag indicating whether to display the plot. Defaults to False. |
save_fn | An optional string for the filename to save the plot. If None, the plot will not be saved. |
title | An optional title for the plot. Defaults to an empty string. |
pyqpanda3.profiling.profiling.draw_circuit_profile | ( | Union[pq.QCircuit, pq.QProg] | circuit, |
dict | gate_times, | ||
bool | is_show = False, | ||
str | out_file = None ) |
Draw a profile of the quantum circuit's performance.
circuit | The quantum circuit object to be drawn, containing the structure and information of the circuit. |
gate_times | A dictionary where the keys are the names of the quantum gates and the values are the execution times of each gate (units can be seconds or milliseconds). |
is_show | A boolean flag indicating whether to display the graph after drawing. Defaults to False. |
out_file | The path and filename to save the output. If provided, the graph will be saved to this file. If None, the graph will not be saved. |