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

Allow increasing job timeout #731

Open
dowusu-antwi opened this issue Sep 7, 2023 · 6 comments
Open

Allow increasing job timeout #731

dowusu-antwi opened this issue Sep 7, 2023 · 6 comments

Comments

@dowusu-antwi
Copy link
Contributor

What is happening?

@ColinCampbellCQ would like to run IRB jobs on lagos, and so will need to wait for a while in the queue. Thus, perhaps we should allow increasing / overriding the timeout client-side (maybe restricted by role).

What are the current alternatives?

Come up with some other framework for submitting jobs like IRB, QAOA/VQE, etc. that take a while (Runtime will help, but we'll still need to handle the timeout issue on top of this).

Any additional context?

No response

@vtomole
Copy link
Member

vtomole commented Sep 14, 2023

@vtomole Find out what is timing out exactly.

@vtomole
Copy link
Member

vtomole commented Oct 5, 2023

@ColinCampbellCQ is calling IRB via .block_for_results(). This might not be necessary. He's looking into it.

@ColinCampbellCQ
Copy link
Contributor

image
This is the jupyter notebook I use to submit to IBMQ. To my knowledge, it will wait indefinitely, but even if the notebook kernel dies, I can recover two ibm job ids from the account page.

@vtomole
Copy link
Member

vtomole commented Oct 6, 2023

Can you paste the code instead of the image of the code? That will make it so i can just copy-paste instead of rewriting what's in the image to try to reproduce.

@ColinCampbellCQ
Copy link
Contributor

Ok, here's just the code:

from qiskit import IBMQ
from qiskit_experiments.library import InterleavedRB
from qiskit_experiments.framework.experiment_data import ExperimentData
from qiskit.circuit.library import CXGate
import numpy as np
import qiskit_superstaq as qss

IBMQ.load_account()
provider = IBMQ.get_provider(hub='ibm-q')
backend = provider.get_backend("ibm_lagos")

print(backend.configuration().basis_gates)
print(backend.configuration().coupling_map)

lengths = np.arange(1, 100, 15)
num_samples = 10
qubits = [3, 5]
irb_experiment = InterleavedRB(CXGate(), qubits=qubits, lengths=lengths, num_samples=num_samples)

irb_experiment_data = irb_experiment.run(backend, **{"shots": 1000}).block_for_results()
irb_experiment_results = irb_experiment_data.analysis_results()
display(irb_experiment_results.figure(0))

@ColinCampbellCQ
Copy link
Contributor

Amendment

from qiskit import IBMQ
from qiskit_experiments.library import InterleavedRB
from qiskit_experiments.framework.experiment_data import ExperimentData
from qiskit.circuit.library import CXGate
import numpy as np
import qiskit_superstaq as qss

IBMQ.load_account()
provider = IBMQ.get_provider(hub='ibm-q')
backend = provider.get_backend("ibm_lagos")

print(backend.configuration().basis_gates)
print(backend.configuration().coupling_map)

lengths = np.arange(1, 100, 15)
num_samples = 10
qubits = [3, 5]
irb_experiment = InterleavedRB(CXGate(), qubits=qubits, lengths=lengths, num_samples=num_samples)

irb_experiment_data = irb_experiment.run(backend, **{"shots": 1000}).block_for_results()
irb_experiment_results = irb_experiment_data.analysis_results()
display(irb_experiment_data.figure(0))

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

3 participants