bloqade.visual.animation.animate.animate_qpu_state
← Module overview
function
source
functionanimate_qpu_state¶source
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
| Name | Type | Default | Description |
|---|---|---|---|
state | QPUStateABC | required | The QPU state to animate |
display_fov | Optional[FieldOfView] | None | The field of view to display. Defaults to None. If None, it will use the QPU's field of view. |
dilation_rate | float | 0.05 | The rate at which to dilate the time. Defaults to 0.05. |
fps | int | 30 | The frames per second. Defaults to 30. |
gate_display_dilation | float | 1.0 | The rate at which to dilate the gate display. Defaults to 1.0. |
fig_args | dict | {} | The arguments to pass to the matplotlib.pyplot.figure. Defaults to {}. |
save_mpeg | bool | False | Whether to save the animation as an mpeg. Defaults to False. |
filename | str | 'vqpu_animation' | The filename to save the mpeg as. Defaults to "vqpu_animation". |
start_block | int | 0 | The block to start the animation at. Defaults to 0. |
n_blocks | int | None | None | The number of blocks to animate. Defaults to None. If None, it will animate all blocks after `start_block`. |