Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] Reduce the frequency that job status is printed for IonQ Cloud simulations #216

Closed
MPCoons opened this issue Sep 19, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@MPCoons
Copy link
Collaborator

MPCoons commented Sep 19, 2022

Issue: Feature Request

What problem does this feature request help you overcome? Please describe.
Thousands of lines of Job info ID:: JOB_ID status :: ready are printed after submitting a job to a QPU on IonQ Cloud while it waits to be executed. The information is redundant and adds an extra step to processing and analyzing the data.

Describe the solution you'd like
The job_status = ready really only needs to be printed one time. This can be accomplished by modifying the job_results and job_status functions in tangelo/linq/qpu_connection/ionq_connection.py.

Describe alternatives you've considered
Instead of only printing once, the duration of time.sleep() in job_results could be increased to several minutes, hours, days, etc.

@ValentinS4t1qbit
Copy link
Collaborator

Thank you Marc !

It indeed seems unnecessary to always print something when job status has been called, and I agree that the frequency at which the IonQ platform in pinged is too high. This must be a remnant of when we did the initial testing on their simulator.

I think:

  • job_status should not print anything. It's role is just to return the job status.
  • job_result can ping IonQ at a lower frequency (once every minute?) and should only print something if the job status has changed since the previous query, to indicate meaningful updates. We could even turn this on/off as a verbose mode.

Any comment about this suggestion ?

@MPCoons
Copy link
Collaborator Author

MPCoons commented Sep 20, 2022

I agree with this suggestion -- I also thought suppressing printing in job_status might be a good way to address this issue.

I think using a verbose mode to switch the printing on/off is a good idea.

The frequency should be more than a minute in my opinion. For example, one output file had 1001 lines of job status printed, and others I recall seeing had nearly 10 000. That was for a print frequency of 5 seconds, so 60 seconds would still be 83 lines of redundant information. Maybe in the range of 5-10 minutes might be better.

Edit: I take that back. Pinging every minute should be good if something is printed only if the job status changes. That seems best.

@alexfleury-sb
Copy link
Collaborator

Closed with #225

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants