qudit_sim.visualization.print_components

qudit_sim.visualization.print_components(components, uncertainties=None, symbol=None, precision=3, threshold=1.e-3, lhs_label=None, scale=FrequencyScale.auto)

Compose a LaTeX expression of the effective Hamiltonian from the Pauli components.

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

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

  • symbol (Optional[str]) – Symbol to use instead of \(\lambda\) for the matrices.

  • precision (int) – Number of digits below the decimal point to show.

  • 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).

  • lhs_label (Optional[str]) – Left-hand-side label.

  • 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\).

Return type

str

Returns

A representation object for a LaTeX expression or an expression string for the effective Hamiltonian.