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

Dump the running time or outcome of "each shot" in an experiment. #1622

Open
alan23273850 opened this issue Apr 12, 2024 · 4 comments
Open

Comments

@alan23273850
Copy link

What should we add?

Dump the running time or outcome of "each shot" in an experiment. The current version of Qiskit seems not to have this feature. A former version with option "memory=True" can only dump outcomes but not running times. Thank you everyone!

@jakelishman
Copy link
Member

This is a question that's beyond the scope of base Qiskit's interfaces, but would be special-case access that certain backends might be able to provide, based on how they function underneath. Exposing the raw data can sometimes be very expensive in terms of data transfer for backends, which might explain why people want to drop support for it.

For IBM backends in particular, you might want to look at what options are available to you through the V2 primitives for IBM hardware, which may give you what you need - the exact details are a bit outside my wheelhouse sorry. Beyond that, you'll probably be better off asking on https://github.com/Qiskit/qiskit-ibm-runtime, which is the repository for the frontend to the IBM hardware.

@1ucian0 1ucian0 transferred this issue from Qiskit/qiskit Apr 16, 2024
@ihincks
Copy link
Collaborator

ihincks commented Apr 16, 2024

I'm not familiar with this feature. What format would this timing information be specified in, and what exactly is it timing? Like a timestamp for each shot?

@alan23273850
Copy link
Author

My timing means the total running time of a quantum circuit in each shot. I've participated in some talk where the speaker claims that if this information can be printed, then it would be very helpful to his research. Is it possible for IBM backends? Thanks again!

@jyu00
Copy link
Collaborator

jyu00 commented Apr 16, 2024

Exactly what kind of per-shot running time are you looking for? If it's just gate time (i.e. time needed to process all the gates), then you can already calculate that number using the gate & readout lengths from backend properties. If you want to start the timing from when the quantum program is loaded into control electronics, then there isn't really a "per shot" time since some operations (like load) only happens once.

By the way, in case it wasn't obvious, SamplerV2 already gives you per shot measurement (similar to the old memory=True).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants