Skip to content

Simulation --> Fetching needs safety step #13

Description

@maxzanner

In the file simulate the lines

job = qmm.simulate(config, program, simulation_config)
# Plot the simulated sample
samples = job.get_simulated_samples()

are directly after one another. This leads to problems in some cases when the simulation is not finished and it starts fetching beforehand. One easy fix could be to wrap the fetching into a try/except statement.

fetched_data = False
while fetched_data is False:
        try:
            samples = job.get_simulated_samples()
            fetched_data = True
        except:
            plt.pause(3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions