qudit_sim.visualization.plot_components

qudit_sim.visualization.plot_components(components, uncertainties=None, threshold=1.e-2, scale=FrequencyScale.auto, ignore_identity=True)

Plot the Hamiltonian components as a bar graph in the decreasing order in the absolute value.

Parameters
  • components (numpy.ndarray) – Array of Pauli components returned by find_heff.

  • uncertainties (Optional[numpy.ndarray]) – Array of component uncertainties.

  • threshold (float) – Ignore terms with absolute components below this value relative to the given scale (if >0) or to the maximum absolute component (if <0).

  • scale (Union[FrequencyScale, str, None]) – Normalize the components with the frequency scale. If None, components are taken to be dimensionless. If FrequencyScale.auto, scale is found from the maximum absolute value of the components. String ‘pi’ is also allowed, in which case the components are normalized by \(\pi\).

  • ignore_identity (bool) – Ignore the identity term.

Return type

Figure

Returns

A Figure object containing the bar graph.