plot_sequences

qctrlvisualizer.plot_sequences(sequences: dict, *, figure: Optional[matplotlib.figure.Figure] = None)

Create 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 ‘offset’ instead of ‘duration’ and ‘rotation’ instead of ‘value’. 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. For example, the following sequences inputs would be valid

    sequences={
      'X': [
        {'offset': 0.0, 'rotation': 0.1},
        {'offset': 0.5, 'rotation': 0.3},
        {'offset': 1.5, 'rotation': 0.2},
        {'offset': 2.0, 'rotation': 0.4},
      ],
      'XY': [
        {'offset': 0.0, 'rotation': 0.5 + 0.5j},
        {'offset': 1.0, 'rotation': 0.3},
        {'offset': 2.0, 'rotation': 0.2 - 0.3j},
      ],
    }
    

  • figure (matplotlib.figure.Figure, optional) – A matplotlib Figure in which to place the plots. If passed, its dimensions and axes will be overridden.