Exploring the Quantum States

Let’s have a look at the qubit in action.

Qiskit uses Matplotlib to provide useful visualizations. A simple histogram will do. The result object provides the get_counts method to obtain the histogram data of an executed circuit in line 5.

The method plot_histogram returns a Matplotlib figure in line 8.

We have a 100%100\% chance of observing the value 1.

Get hands-on with 1400+ tech skills courses.