Simulation result
QuEraSimulationResult
dataclass
QuEraSimulationResult(
flair_visual_version: str,
counts: dict[str, int],
logs: DataFrame,
atom_animation_state: AnimateQPUState,
noise_model: NoiseModel,
)
Results of the QuEra hardware model simulation.
Fields
flair_visual_version (str): The version of the Flair Visual package used to generate the simulation result. counts (dict[str, int]): The measurement bitstrings of the simulation. logs (DataFrame): Grainular logs events of what happened to each atom during the simulation. atom_animation_state (vis_qpustate.AnimateQPUState): Object used to play back atom trajectories and events during the simulation. noise_model (NoiseModel): The noise model used in the simulation.
animate
animate(
dilation_rate: float = 0.05,
fps: int = 30,
gate_display_dilation: float = 1.0,
save_mpeg: bool = False,
filename: str = "vqpu_animation",
start_block: int = 0,
n_blocks: Optional[int] = None,
)
animate the qpu state
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dilation_rate
|
float
|
Conversion factor from the qpu time to animation time units. when dilation_rate=1.0, 1 (us) of qpu exec time corresponds to 1 second of animation time. |
0.05
|
fps
|
int
|
frame per second. Defaults to 30. |
30
|
gate_display_dilation
|
float
|
relative dilation rate of a gate event. Defaults to 1. When setting higher value, the gate event will be displayed longer. |
1.0
|
save_mpeg
|
bool
|
Save as mpeg. Defaults to False. |
False
|
filename
|
str
|
The file name of saved mpeg file. Defaults to "vqpu_animation". When |
'vqpu_animation'
|
start_block
|
int
|
The start block to animate. Defaults to 0. |
0
|
n_blocks
|
int
|
number of blocks to animate. Defaults to None. When None, animate all blocks after |
None
|
Returns: ani: matplotlib animation object
Source code in .venv/lib/python3.12/site-packages/bloqade/qbraid/simulation_result.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
|
from_json
classmethod
from_json(json: dict) -> QuEraSimulationResult
deserialize the object from a JSON serializable dictionary.
Source code in .venv/lib/python3.12/site-packages/bloqade/qbraid/simulation_result.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
|
to_json
to_json() -> Dict[str, Any]
Turn the object into a JSON serializable dictionary.
Source code in .venv/lib/python3.12/site-packages/bloqade/qbraid/simulation_result.py
54 55 56 57 58 59 60 61 62 |
|