qiboteam / qiboml

Quantum Machine Learning using Qibo
Apache License 2.0
7 stars 1 forks source link

Bloch sphere implementation #2

Open niccololaurora opened 4 months ago

niccololaurora commented 4 months ago

I added a visualization method which implements a Bloch Sphere. This tool could be useful to plot the final states of a classification task. Example:

state = np.array([1, 0], dtype="complex") b_sphere = Bloch() b_sphere.add_vector(state, mode="vector", color="black") b_sphere.save_plot("b_sphere.pdf") b_sphere.plot()