Skip to main content
IBM Quantum Platform

qiskit_noise_learning.visualizations.fidelity_index_math_label

qiskit_noise_learning.visualizations.fidelity_index_math_label(gate_set: GateSet, fidelity_index: FidelityIndex, style: Literal['transition', 'formula'] = 'transition', noise_site: Mapping[str, Literal['before', 'after']] | None = None, qubit_labels: Mapping[int, str] | None = None) → str

GitHub

Return a math-mode LaTeX label for a fidelity index.

Parameters

  • gate_set – The gate set the fidelity index belongs to, used to look up the gate’s math_label.
  • fidelity_index – The fidelity index to label.
  • style – Either "transition" (shows input →\to output Pauli) or "formula" (shows the index data pauli alongside the ZZ exponents xx and yy, displayed as the qubit indices on which they are non-zero, i.e. in_z_idxs and out_z_idxs).
  • noise_site – An optional mapping from gate name to "before" or "after", indicating the gate noise is modelled as a Pauli-channel occuring either before or after the gate. This simplifies the style="formula" label to only display the Pauli passing through the Pauli channel.
  • qubit_labels – An optional mapping from qubit index to a display symbol, used to relabel the qubit subscripts (e.g. {25: "i", 26: "j"} renders X_{25} as X_{i}). Indices absent from the mapping render as their integer value.

Returns

A math-mode LaTeX label.

Raises

ValueError – If style is not "transition" or "formula".

Was this page helpful?
Report a bug, typo, or request content on GitHub.