Skip to content
This repository was archived by the owner on Aug 21, 2023. It is now read-only.

Commit d98659c

Browse files
committed
add jobs()
1 parent e8a7eae commit d98659c

1 file changed

Lines changed: 21 additions & 2 deletions

File tree

qiskit/fundamentals/3_the_ibmq_account.ipynb

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,6 +1102,25 @@
11021102
"print(\"This is the histogram data for experiment 15: {}\".format(results.get_counts(15)))"
11031103
]
11041104
},
1105+
{
1106+
"cell_type": "markdown",
1107+
"metadata": {},
1108+
"source": [
1109+
"You can use `job_set.jobs()` to retrieve a list of jobs within the job set. Note that an entry is `None` if that particular job could not be submitted."
1110+
]
1111+
},
1112+
{
1113+
"cell_type": "code",
1114+
"execution_count": 31,
1115+
"metadata": {},
1116+
"outputs": [],
1117+
"source": [
1118+
"jobs = job_set_bar.jobs() # Get a list of all jobs in the set.\n",
1119+
"job0 = jobs[0]\n",
1120+
"if job0 is None:\n",
1121+
" print(\"Job0 submit failed!\")"
1122+
]
1123+
},
11051124
{
11061125
"cell_type": "markdown",
11071126
"metadata": {},
@@ -1115,7 +1134,7 @@
11151134
},
11161135
{
11171136
"cell_type": "code",
1118-
"execution_count": 31,
1137+
"execution_count": 32,
11191138
"metadata": {},
11201139
"outputs": [],
11211140
"source": [
@@ -1131,7 +1150,7 @@
11311150
},
11321151
{
11331152
"cell_type": "code",
1134-
"execution_count": 32,
1153+
"execution_count": 33,
11351154
"metadata": {
11361155
"ExecuteTime": {
11371156
"end_time": "2019-08-10T11:28:28.529479Z",

0 commit comments

Comments
 (0)