qilisdk.utils.visualization.schedule_renderers
Classes
Render a Schedule using matplotlib, with theme support. |
|
Render the eigenvalues Schedule using matplotlib, with theme support. |
Module Contents
- class MatplotlibScheduleRenderer(schedule: qilisdk.analog.schedule.Schedule, ax: matplotlib.pyplot.Axes | None = None, *, style: qilisdk.utils.visualization.style.ScheduleStyle | None = None)[source]
Render a Schedule using matplotlib, with theme support.
- schedule[source]
- style[source]
- ax[source]
- setup_axes() None[source]
- static hex_to_rgb(hex_color: str) tuple[int, Ellipsis][source]
- static rgb_to_hex(rgb: tuple[int, Ellipsis]) str[source]
- gradient_colors(start_hex: str, end_hex: str, n: int) list[str][source]
- plot(ax: matplotlib.pyplot.Axes | None = None) None[source]
Plot the schedule coefficients for each Hamiltonian over time. :param ax: The matplotlib axes to plot on. Default is None. :type ax:
plt.Axes | None
- save(filename: str) None[source]
Save current figure to disk.
- Parameters:
filename – Path to save the figure (e.g., ‘circuit.png’).
- show() None[source]
Show the current figure.
- class MatplotlibEigenvalueRenderer(schedule: qilisdk.analog.schedule.Schedule, ax: matplotlib.pyplot.Axes | None = None, *, style: qilisdk.utils.visualization.style.ScheduleStyle | None = None, levels: int = 2, intermediate_states: list[qilisdk.core.QTensor] | None = None, show_overlaps: bool = True)[source]
Bases:
MatplotlibScheduleRendererRender the eigenvalues Schedule using matplotlib, with theme support.
- schedule: qilisdk.analog.schedule.Schedule[source]
- style[source]
- ax[source]
- levels = 2[source]
- intermediate_states = None[source]
- show_overlaps = True[source]
- plot(ax: matplotlib.pyplot.Axes | None = None) None[source]
Plot the schedule coefficients for each Hamiltonian over time.
- Parameters:
ax (
plt.Axes | None) – The matplotlib axes to plot on. Default is None.- Raises:
ValueError – If the full Hamiltonian cannot be constructed or is not a Hamiltonian instance.