Skip to content

bloqade.visual.animation.animate.animate_qpu_state

← Module overview

functionanimate_qpu_statesource

bloqade.visual.animation.animate.animate_qpu_state

Signature
def animate_qpu_state(state: QPUStateABC, display_fov: Optional[FieldOfView] = None, dilation_rate: float = 0.05, fps: int = 30, gate_display_dilation: float = 1.0, fig_args={}, save_mpeg: bool = False, filename: str = 'vqpu_animation', start_block: int = 0, n_blocks: int | None = None)

Generate an animation from the QPU state

Parameters

NameTypeDefaultDescription
stateQPUStateABCrequiredThe QPU state to animate
display_fovOptional[FieldOfView]NoneThe field of view to display. Defaults to None. If None, it will use the QPU's field of view.
dilation_ratefloat0.05The rate at which to dilate the time. Defaults to 0.05.
fpsint30The frames per second. Defaults to 30.
gate_display_dilationfloat1.0The rate at which to dilate the gate display. Defaults to 1.0.
fig_argsdict{}The arguments to pass to the matplotlib.pyplot.figure. Defaults to {}.
save_mpegboolFalseWhether to save the animation as an mpeg. Defaults to False.
filenamestr'vqpu_animation'The filename to save the mpeg as. Defaults to "vqpu_animation".
start_blockint0The block to start the animation at. Defaults to 0.
n_blocksint | NoneNoneThe number of blocks to animate. Defaults to None. If None, it will animate all blocks after `start_block`.
source