SimulationResult

class SimulationResult(model, ts, time_evol_operator=None, time_evol_state=None, shot_noises=None)

Represent the results of the simulation.

Initialize a container that stores the results of a simulation.

Parameters:
  • model – Central-spin register model.

  • ts (List[float] | ndarray | Array) – Timestamps of the stored simulation data (in \(\mu\text{s}\)).

  • time_evol_operator (TimeEvolOperator | None) – Time evolution operator.

  • time_evol_state (TimeEvolState | None) – States corresponding the time evolution.

  • shot_noises (ndarray | Array | None) – Noise realizations of the simulation.

Methods

average_gate_fidelity([shot, basis, frame, ...])

Return the average gate fidelity.

expectation_value(operator[, shot, t_idx, ...])

Return the expectation values of a given operator or operators.

ideal_process_matrix([spin_names])

Return the process matrix corresponding to the ideal circuit.

leakage([shot, t_idx, basis])

Return the leakage from the qubit subspace.

plot_Bloch_vectors([spin_names, shot, ...])

Plot the Bloch vectors corresponding the spins.

plot_expectation_value(operator[, shot, ...])

Plot the expectation values of the operators corresponding the time evolved states from an initial state.

plot_ideal_process_matrix([spin_names, value])

Plot the ideal process matrix corresponding to the ideal circuit.

plot_process_matrix([spin_names, value, ...])

Plot the process matrix corresponding to the time evolution propagator.

process_matrix([spin_names, shot, t_idx, ...])

Return the process matrix corresponding to the time evolution operator.

Attributes

ideal

Ideal circuit for calculating the average gate fidelity.

ideal_unitary_matrix

Ideal unitary matrix, defined in the qubit subspace, to calculate the average gate fidelity.

initial_state

Initial state.

model

Spin model.

n_shots

Number of the shots.

n_ts

Number of the stored timestamps.

shot_noises

Shot noise realizations.

time_evol_operator

Time evolution operator.

time_evol_state

States corresponding to the time evolution of an initial state.

ts

Timestamps of the stored simulation data (in \(\mu\text{s}\)).