-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
get jobs from IBM Q backend #501
Changes from 1 commit
bcac889
cd825f4
93aa378
3df6680
e00a1b5
a49ea94
5909a0d
f4e9898
5a77bd9
641becc
8284926
a72d9ec
f437e0a
3d5904e
c9fb95f
97abf82
0afb90d
7516e7a
674af67
2b79d6b
0cfd4cb
00cd596
d7d1a4f
10d0bc2
2e72457
49edb41
8581dcb
11d859b
a426d1b
c2d1033
cee799c
13274e6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -238,8 +238,6 @@ def test_job_id(self): | |
qobj = qiskit._compiler.compile(self._qc, backend) | ||
quantum_job = QuantumJob(qobj, backend, preformatted=True) | ||
job = backend.run(quantum_job) | ||
while job.status['status'] == JobStatus.INITIALIZING: | ||
time.sleep(0.1) | ||
self.log.info('job_id: %s', job.job_id) | ||
self.assertTrue(job.job_id is not None) | ||
|
||
|
@@ -261,12 +259,12 @@ def test_get_jobs_from_backend(self): | |
self.assertTrue(job_list) | ||
|
||
def test_retrieve_job(self): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would make a test for a Job with multiple circuits. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. test_run_simulator does this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok! |
||
backends = self._provider.available_backends({'simulator': False}) | ||
backend = lowest_pending_jobs(backends) | ||
job_list = backend.jobs(limit=1, skip=0) | ||
job_id = job_list[0].job_id | ||
job = backend.retrieve_job(job_id) | ||
self.assertTrue(job_id == job.job_id) | ||
backend = self._provider.get_backend('ibmq_qasm_simulator') | ||
qobj = qiskit._compiler.compile(self._qc, backend) | ||
quantum_job = QuantumJob(qobj, backend, preformatted=True) | ||
job = backend.run(quantum_job) | ||
rjob = backend.retrieve_job(job.job_id) | ||
self.assertTrue(job.job_id == rjob.job_id) | ||
|
||
def test_retrieve_job_error(self): | ||
backends = self._provider.available_backends({'simulator': False}) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_wait_for_submitting()
:)