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
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 output Pauli) or"formula"(shows the index datapaulialongside the exponents and , displayed as the qubit indices on which they are non-zero, i.e.in_z_idxsandout_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 thestyle="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"}rendersX_{25}asX_{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.