plot_xdata

qctrlvisualizer.plot_xdata(discriminator: Any, axs: numpy.ndarray, results: Any)

Adds the relevant IQ data from the Result, or list of results, to the given axes as a scatter plot.

Parameters
  • discriminator (BaseIQDiscriminator) – An arbitrary Q-CTRL discriminator that follows the defined interface and has fit and discriminate methods.

  • axs (Union[np.ndarray, axes]) – The axes to use for the plot. You must provide at least as many axes as the number of qubits.

  • results (Union[Result, List[Result]]) – The discriminators get_xdata will be used to retrieve the x data from the Result or list of Results.

Raises

ValueError – If you don’t provide enough axes. Requires one per qubit discriminated.