pygsti.protocols.freeformsim.ModelFreeformSimulator#
- class ModelFreeformSimulator(models)#
Bases:
FreeformDataSimulatorA base class for data simulators that utilize models (probably most of them!).
Holds a dictionary of models and provides basic functionality for computing probabilities, final states, and process matrices corresponding to circuits which make implementing
compute_freeform_data()easier.- Parameters:
models (dict) – A dictionary whose keys are string labels and values are
Modelobjects, specifying the models used to compute “simulated” data.
Methods
__init__(models)apply(df)Apply this data simulator to a data frame having a Circuit column.
apply_fn(series)compute_circuit_probabilities(model, circuit)compute_final_state(model, circuit[, ...])compute_final_states(circuit[, ...])compute_freeform_data(circuit)Computes the simulated free-form data for a single circuit.
compute_probabilities(circuit[, ...])compute_process_matrices(circuit[, ...])compute_process_matrix(model, circuit[, ...])run(edesign[, memlimit, comm])Run this data simulator on an experiment design.
- apply(df)#
Apply this data simulator to a data frame having a Circuit column.
- Parameters:
df (pandas.DataFrame) – The data frame to apply to.
- Return type:
pandas.DataFrame
- compute_freeform_data(circuit)#
Computes the simulated free-form data for a single circuit.
- Parameters:
circuit (Circuit) – The circuit to compute data for.
- Return type:
dict
- run(edesign, memlimit=None, comm=None)#
Run this data simulator on an experiment design.
- Parameters:
edesign (ExperimentDesign) – The input experiment design.
memlimit (int, optional) – A rough per-processor memory limit in bytes.
comm (mpi4py.MPI.Comm, optional) – When not
None, an MPI communicator used to run this data simulator in parallel.
- Return type: