bloqade.qbraid.simulation_result.QuEraSimulationResult
classQuEraSimulationResult¶source
bloqade.qbraid.simulation_result.QuEraSimulationResult
Results of the QuEra hardware model simulation.
Signature
class QuEraSimulationResult(flair_visual_version: str, counts: dict[str, int], logs: DataFrame, atom_animation_state: vis_qpustate.AnimateQPUState, noise_model: NoiseModel)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.
Parameters
| Name | Type | Description |
|---|---|---|
flair_visual_version | str | |
counts | dict[str, int] | |
logs | DataFrame | |
atom_animation_state | vis_qpustate.AnimateQPUState | |
noise_model | NoiseModel |
Attributes
| Name | Type | Description |
|---|---|---|
flair_visual_version | str | |
counts | dict[str, int] | |
logs | DataFrame | |
atom_animation_state | vis_qpustate.AnimateQPUState | |
noise_model | NoiseModel |
methodfrom_json¶source
bloqade.qbraid.simulation_result.QuEraSimulationResult.from_json
def from_json(json: dict) -> QuEraSimulationResultdeserialize the object from a JSON serializable dictionary.
Parameters
| Name | Type | Description |
|---|---|---|
json | dict |
Returns
QuEraSimulationResult
methodto_json¶source
bloqade.qbraid.simulation_result.QuEraSimulationResult.to_json
def to_json() -> Dict[str, Any]Turn the object into a JSON serializable dictionary.
Returns
Dict[str, Any]
methodanimate¶source
bloqade.qbraid.simulation_result.QuEraSimulationResult.animate
Signature
def 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
Returns: ani: matplotlib animation object
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
dilation_rate | float | 0.05 | 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. |
fps | int | 30 | frame per second. Defaults to 30. |
gate_display_dilation | float | 1.0 | relative dilation rate of a gate event. Defaults to 1. When setting higher value, the gate event will be displayed longer. |
save_mpeg | bool | False | Save as mpeg. Defaults to False. |
filename | str | 'vqpu_animation' | The file name of saved mpeg file. Defaults to "vqpu_animation". When `save_mpeg` is False, this argument is ignored. |
start_block | int | 0 | The start block to animate. Defaults to 0. |
n_blocks | Optional[int] | None | number of blocks to animate. Defaults to None. When None, animate all blocks after `start_block`. |