diff --git a/examples/Quantinuum_hseries_queue_visibility.ipynb b/examples/Quantinuum_hseries_queue_visibility.ipynb index 5098767c..736a8dd9 100644 --- a/examples/Quantinuum_hseries_queue_visibility.ipynb +++ b/examples/Quantinuum_hseries_queue_visibility.ipynb @@ -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", + " )" ] }, { @@ -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", + " )" ] }, {