Docs improvements from @jyu00 and rename Latest updates to Changelog#4964
Open
Docs improvements from @jyu00 and rename Latest updates to Changelog#4964
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Contributor
|
One or more of the following people are relevant to this code:
|
jyu00
reviewed
Apr 9, 2026
Collaborator
jyu00
left a comment
There was a problem hiding this comment.
Some minor adjustment because I didn't test the code first 🙈
Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>
jyu00
reviewed
Apr 10, 2026
Collaborator
There was a problem hiding this comment.
We also need to initialize the duration & sum it up in the loop:
# Schedule the circuit to get more accurate timing
pm = generate_preset_pass_manager(
target=backend.target,
optimization_level=0,
scheduling_method="alap"
)
scheduled_circuits = pm.run(isa_circuits)
init_duration = backend.target["reset"][(0,)].duration
rep_delay = sampler.options.execution.rep_delay or backend.default_rep_delay
circuit_duration = 0
for circuit in scheduled_circuits:
# Estimate circuit length
circuit_duration += circuit.estimate_duration(backend.target)
# Add INIT time
if sampler.options.execution.init_qubits:
circuit_duration += init_duration
# Add rep_delay
circuit_duration += rep_delay
total_time = 2 + (circuit_duration*shots)
print(f"Total estimated usage is {math.ceil(total_time)} seconds")Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>
Collaborator
Author
|
@jyu00 there were a couple small discrepancies between the recent code block you shared and the recent commits you suggested, so I chose the code block as the source of truth - lmk if I should have done otherwise :D |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4937
Closes #4938
Closes #4680
Closes #4959