|
36913 | 36913 | "outputs": [], |
36914 | 36914 | "source": [ |
36915 | 36915 | "def run_on_backend(backend, circuit, shots: int, maps=None, use_cached=True) -> qiskit.result.Result:\n", |
36916 | | - " assets_path = Path.cwd().parent / \"assets\"\n", |
36917 | | - " if not assets_path.exists():\n", |
36918 | | - " assets_path.mkdir()\n", |
| 36916 | + " assets_path = Path.cwd().parent / \"assets\" / \"jobs\"\n", |
| 36917 | + " assets_path.mkdir(parents=True, exist_ok=True)\n", |
36919 | 36918 | " if not assets_path.is_dir():\n", |
36920 | 36919 | " raise TypeError(f\"is not a directory: {assets_path}\")\n", |
36921 | 36920 | "\n", |
|
39590 | 39589 | "ibm_shots_arr = sorted(\n", |
39591 | 39590 | " {\n", |
39592 | 39591 | " int(m.group(1))\n", |
39593 | | - " for item in (Path.cwd().parent / \"assets\").iterdir()\n", |
| 39592 | + " for item in (Path.cwd().parent / \"assets\" / \"jobs\").iterdir()\n", |
39594 | 39593 | " if (m := re.match(pattern, str(item.name)))\n", |
39595 | 39594 | " }\n", |
39596 | 39595 | ") # ibm_shots_arr = np.linspace(2e3, 1.7e4, 16).astype(int)\n", |
|
42251 | 42250 | "ibm_shots_arr = sorted(\n", |
42252 | 42251 | " {\n", |
42253 | 42252 | " int(m.group(1))\n", |
42254 | | - " for item in (Path.cwd().parent / \"assets\").iterdir()\n", |
| 42253 | + " for item in (Path.cwd().parent / \"assets\" / \"jobs\").iterdir()\n", |
42255 | 42254 | " if (m := re.match(pattern, str(item.name)))\n", |
42256 | 42255 | " }\n", |
42257 | 42256 | ")\n", |
|
0 commit comments