flamingpy.utils.viz¶
Helper functions to draw various graphs and generate plots using Matplotlib.
Plots are configured via the plot_params
dictionary. These parameters
are associated with Matplolib’s rc settings and are modified within the
plotting functions using the rc_context
context manager. This approach
avoids having to modify the global Matplotlib rc_params
.
To modify the plot parameters use, for example,
from flamingpy.utils.viz import plot_params as fp_plot_params
fp_plot_params["font.size"] = 20
Classes
|
Formatter for axis-ticks containing multiples of sqrt(pi)/2. |
Functions
|
Plot the recovery. |
|
Draw an EGraph using either matplotlib or plotly as backend. |
|
Draw the graph state represented by the EGraph. |
|
Draw the graph state represented by the EGraph with plotly. |
|
Draw curved edges using matplotlib directly instead of networkx. |
|
Draw a stabilizer or matching graph with a color legend. |
|
Draw the stabilizer and matching graphs, and the plot the syndrome. |
|
Plot binned real numbers mod alpha. |
|
Plot conditional phase probabilities for GKP states. |
|
Plot the fractional part of real numbers mod alpha. |
|
Plot the integer part of real numbers mod alpha. |
|
Plot the heat map of a matrix. |
|
Draw the syndrome plot for a code. |
|
Convert x, a multiple of sqrt(pi)/2, to a pretty string. |