plot_sequences
qctrlvisualizer.plot_sequences(sequences, *, figure=None)
Create a plot of dynamical decoupling sequences.
Parameters
- sequences (dict) – The dictionary of sequences to plot. Works the same as the dictionary for plot_controls, but takes ‘offsets’ instead of ‘durations’, and ‘rotations’ instead of ‘values’. Rotations can be around any axis in the XY plane. Information about this axis is encoded in the complex argument of the rotation. For example, a pi X-rotation is represented by the complex number 3.14+0.j, whereas a pi Y-rotation is 0.+3.14j. The argument of the complex number is plotted separately as the azimuthal angle.
- figure (matplotlib.figure.Figure or None , optional) – A matplotlib Figure in which to place the plots. If passed, its dimensions and axes will be overridden.
Examples
Plot a sequence of gates and a sequence of and gates.
from qctrlvisualizer import plot_sequences
sequences = {
"X": {
"offsets": [0.0, 0.5, 1.5, 2.0],
"rotations": [0.1, 0.3, 0.2, 0.4],
},
"XY": {
"offsets": [0.0, 1.0, 2.0],
"rotations": [0.5 + 0.5j, 0.3, 0.2 - 0.3j],
},
}
plot_sequences(sequences=sequences)