pyqpanda.Visualization.bloch_plot

Module Contents

Classes

pauli

gate_node

PlotVector

Functions

count_pauli(i)

get_single_paulis(num_qubits, index)

plot_bloch_vector(bloch[, title, axis_obj, fig_size])

Draw a quantum state bloch view

plot_bloch_multivector(state[, title, fig_size])

Draw a quantum state bloch view

normalize(v[, tolerance])

bloch_plot_dict(frames_per_gate)

traversal_circuit(circuit)

plot_bloch_circuit(circuit[, trace, saveas, fps, ...])

Draw a quantum circuit bloch view , only support one qubit

pyqpanda.Visualization.bloch_plot.count_pauli(i)[source]
class pyqpanda.Visualization.bloch_plot.pauli(z, x)[source]

Bases: object

to_matrix()[source]
pyqpanda.Visualization.bloch_plot.get_single_paulis(num_qubits, index)[source]
pyqpanda.Visualization.bloch_plot.plot_bloch_vector(bloch, title='bloch', axis_obj=None, fig_size=None)[source]

Draw a quantum state bloch view

Args:

state : the quantum state title : the figure title fig_size : the figure size

Returns:

bloch figure shows quantum state

pyqpanda.Visualization.bloch_plot.plot_bloch_multivector(state, title='', fig_size=None)[source]

Draw a quantum state bloch view

Args:

state : the quantum state title : the figure title fig_size : the figure size

Returns:

bloch figure shows quantum state

pyqpanda.Visualization.bloch_plot.normalize(v, tolerance=1e-05)[source]
class pyqpanda.Visualization.bloch_plot.gate_node(name, theta)[source]

Bases: object

class pyqpanda.Visualization.bloch_plot.PlotVector[source]
static from_axisangle(theta, v)[source]
static from_value(value)[source]
get_conjugate()[source]
get_axisangle()[source]
tolist()[source]
vector_norm()[source]
pyqpanda.Visualization.bloch_plot.bloch_plot_dict(frames_per_gate)[source]
pyqpanda.Visualization.bloch_plot.traversal_circuit(circuit)[source]
pyqpanda.Visualization.bloch_plot.plot_bloch_circuit(circuit, trace=True, saveas=None, fps=20, secs_per_gate=1)[source]

Draw a quantum circuit bloch view , only support one qubit

Args:

circuit : the quantum circuit trace : whether shows the trace fps : flash fps

Returns:

bloch figure shows quantum circuit