Skip to content

Commit

Permalink
Merge pull request #437 from CQCL/fix/unreliable-calendar-demo-in-exa…
Browse files Browse the repository at this point in the history
…mple

Fix unreliable calendar demo
  • Loading branch information
yao-cqc authored May 17, 2024
2 parents 0e56fc9 + 2a8b85d commit fc9a5e6
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions examples/Quantinuum_hseries_queue_visibility.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -841,12 +841,13 @@
"metadata": {},
"outputs": [],
"source": [
"print(\n",
" \"Time Range: \",\n",
" calendar[3].get(\"start-date\").strftime(\"%Y-%m-%d %H:%M %Z\"),\n",
" \"-\",\n",
" calendar[3].get(\"end-date\").strftime(\"%Y-%m-%d %H:%M %Z\"),\n",
")"
"if len(calendar) > 0:\n",
" print(\n",
" \"Time Range: \",\n",
" calendar[0].get(\"start-date\").strftime(\"%Y-%m-%d %H:%M %Z\"),\n",
" \"-\",\n",
" calendar[0].get(\"end-date\").strftime(\"%Y-%m-%d %H:%M %Z\"),\n",
" )"
]
},
{
Expand All @@ -863,13 +864,13 @@
"outputs": [],
"source": [
"calendar_utc = quantum_backend.get_calendar(start_date, end_date, localise=False)\n",
"\n",
"print(\n",
" \"Time Range:\",\n",
" calendar_utc[3].get(\"start-date\").strftime(\"%Y-%m-%d %H:%M %Z\"),\n",
" \"-\",\n",
" calendar_utc[3].get(\"end-date\").strftime(\"%Y-%m-%d %H:%M %Z\"),\n",
")"
"if len(calendar) > 0:\n",
" print(\n",
" \"Time Range:\",\n",
" calendar_utc[0].get(\"start-date\").strftime(\"%Y-%m-%d %H:%M %Z\"),\n",
" \"-\",\n",
" calendar_utc[0].get(\"end-date\").strftime(\"%Y-%m-%d %H:%M %Z\"),\n",
" )"
]
},
{
Expand Down

0 comments on commit fc9a5e6

Please sign in to comment.