From 25e8fa7f70a62a6a6470fbe80dd916a3fc67c9ab Mon Sep 17 00:00:00 2001 From: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com> Date: Mon, 11 Nov 2024 08:26:05 -0500 Subject: [PATCH 1/4] Make save-jobs notebook resilient to no successful jobs --- docs/guides/save-jobs.ipynb | 12 ++++++++---- scripts/js/lib/links/ignores.ts | 1 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/guides/save-jobs.ipynb b/docs/guides/save-jobs.ipynb index 137452a1077..f735471781e 100644 --- a/docs/guides/save-jobs.ipynb +++ b/docs/guides/save-jobs.ipynb @@ -121,10 +121,14 @@ ], "source": [ "# Get ID of most recent successful job for demonstration.\n", - "# This will not work if you've never successfully run a job.\n", - "successful_job = next(j for j in service.jobs() if j.status().name == \"DONE\")\n", - "job_id = successful_job.job_id()\n", - "print(job_id)" + "successful_job = next(\n", + " (j for j in service.jobs() if j.status().name == \"DONE\"), None\n", + ")\n", + "if successful_job is None:\n", + " print(\"No successful jobs run yet!\")\n", + "else:\n", + " job_id = successful_job.job_id()\n", + " print(job_id)" ] }, { diff --git a/scripts/js/lib/links/ignores.ts b/scripts/js/lib/links/ignores.ts index deb24874ca5..65728f07462 100644 --- a/scripts/js/lib/links/ignores.ts +++ b/scripts/js/lib/links/ignores.ts @@ -59,6 +59,7 @@ const ALWAYS_IGNORED_URLS__EXPECTED = [ "https://journals.aps.org/pra/abstract/10.1103/PhysRevA.94.052325", "https://journals.aps.org/prapplied/abstract/10.1103/PhysRevApplied.20.064027", "https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.131.210601", + "https://journals.aps.org/pra/abstract/10.1103/PhysRevA.92.042303", "https://journals.aps.org/prresearch/abstract/10.1103/PhysRevResearch.5.033154", "https://www.cs.bham.ac.uk/~xin/papers/published_tec_sep00_constraint.pdf", "https://https://arxiv.org/abs/quant-ph/0403071", From a0b340d189c50c6895c217f71ef6ba58673abbf4 Mon Sep 17 00:00:00 2001 From: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com> Date: Mon, 11 Nov 2024 12:22:31 -0500 Subject: [PATCH 2/4] Revert "Make save-jobs notebook resilient to no successful jobs" This reverts commit 25e8fa7f70a62a6a6470fbe80dd916a3fc67c9ab. --- docs/guides/save-jobs.ipynb | 12 ++++-------- scripts/js/lib/links/ignores.ts | 1 - 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/docs/guides/save-jobs.ipynb b/docs/guides/save-jobs.ipynb index f735471781e..137452a1077 100644 --- a/docs/guides/save-jobs.ipynb +++ b/docs/guides/save-jobs.ipynb @@ -121,14 +121,10 @@ ], "source": [ "# Get ID of most recent successful job for demonstration.\n", - "successful_job = next(\n", - " (j for j in service.jobs() if j.status().name == \"DONE\"), None\n", - ")\n", - "if successful_job is None:\n", - " print(\"No successful jobs run yet!\")\n", - "else:\n", - " job_id = successful_job.job_id()\n", - " print(job_id)" + "# This will not work if you've never successfully run a job.\n", + "successful_job = next(j for j in service.jobs() if j.status().name == \"DONE\")\n", + "job_id = successful_job.job_id()\n", + "print(job_id)" ] }, { diff --git a/scripts/js/lib/links/ignores.ts b/scripts/js/lib/links/ignores.ts index 65728f07462..deb24874ca5 100644 --- a/scripts/js/lib/links/ignores.ts +++ b/scripts/js/lib/links/ignores.ts @@ -59,7 +59,6 @@ const ALWAYS_IGNORED_URLS__EXPECTED = [ "https://journals.aps.org/pra/abstract/10.1103/PhysRevA.94.052325", "https://journals.aps.org/prapplied/abstract/10.1103/PhysRevApplied.20.064027", "https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.131.210601", - "https://journals.aps.org/pra/abstract/10.1103/PhysRevA.92.042303", "https://journals.aps.org/prresearch/abstract/10.1103/PhysRevResearch.5.033154", "https://www.cs.bham.ac.uk/~xin/papers/published_tec_sep00_constraint.pdf", "https://https://arxiv.org/abs/quant-ph/0403071", From 3f84ae8ef02ee8c3f4747a87b56d3a996cb1a63c Mon Sep 17 00:00:00 2001 From: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com> Date: Mon, 11 Nov 2024 12:23:11 -0500 Subject: [PATCH 3/4] Exclude notebook for now --- scripts/config/notebook-testing.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/config/notebook-testing.toml b/scripts/config/notebook-testing.toml index d3881612138..18cdd53ad92 100644 --- a/scripts/config/notebook-testing.toml +++ b/scripts/config/notebook-testing.toml @@ -9,7 +9,6 @@ notebooks_normal_test = [ "docs/guides/save-circuits.ipynb", "docs/guides/dynamic-circuits-considerations.ipynb", "docs/guides/get-qpu-information.ipynb", - "docs/guides/save-jobs.ipynb", "docs/guides/visualize-results.ipynb", "docs/guides/common-parameters.ipynb", "docs/guides/create-transpiler-plugin.ipynb", @@ -46,6 +45,7 @@ notebooks_exclude = [ "docs/guides/ibm-circuit-function.ipynb", "docs/guides/qiskit-addons-sqd-get-started.ipynb", "docs/guides/fractional-gates.ipynb", + "docs/guides/save-jobs.ipynb", ] # The following notebooks submit jobs that can be mocked with a simulator From 741285c5c93239217eb1ce4598cbe5eae0c22998 Mon Sep 17 00:00:00 2001 From: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com> Date: Mon, 11 Nov 2024 12:24:25 -0500 Subject: [PATCH 4/4] Add back link ignore --- scripts/js/lib/links/ignores.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/js/lib/links/ignores.ts b/scripts/js/lib/links/ignores.ts index deb24874ca5..fdd72b5d0d8 100644 --- a/scripts/js/lib/links/ignores.ts +++ b/scripts/js/lib/links/ignores.ts @@ -60,6 +60,7 @@ const ALWAYS_IGNORED_URLS__EXPECTED = [ "https://journals.aps.org/prapplied/abstract/10.1103/PhysRevApplied.20.064027", "https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.131.210601", "https://journals.aps.org/prresearch/abstract/10.1103/PhysRevResearch.5.033154", + "https://journals.aps.org/pra/abstract/10.1103/PhysRevA.92.042303", "https://www.cs.bham.ac.uk/~xin/papers/published_tec_sep00_constraint.pdf", "https://https://arxiv.org/abs/quant-ph/0403071", "https://doi.org/10.1103/PhysRevApplied.5.034007",