-
Notifications
You must be signed in to change notification settings - Fork 2
/
ibm_hardware.py
34 lines (27 loc) · 917 Bytes
/
ibm_hardware.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import qiskit
from qiskit import *
from qiskit import IBMQ
from qiskit.compiler import assemble, transpile
from qiskit.providers.fake_provider import FakeNairobiV2
from qiskit.providers.ibmq.managed import IBMQJobManager
"""
Get account/backend (REAL)
"""
#Token = User's ID
#IBMQ.enable_account(TOKEN, hub='ibm-q-community', group='mit-hackathon', project='main')
#provider = IBMQ.get_provider(hub='ibm-q-community', group='mit-hackathon', project='main')
#backend = provider.get_backend('ibm-q-community')
"""
Get account/backend (Fake)
"""
backend = FakeNairobiV2
"""
Retrieving Job
"""
#Jobs
circs = transpile([circuit], backend=backend)
job_manager = IBMQJobManager()
job_set = job_manager.run(circs, backend=backend, name='entangled-entities')
job_set_id = job_set.job_set_id()
retrieved_job_set = job_manager.retrieve_job_set(job_set_id=job_set_id, provider=provider)
print(retrieved_job_set.report())