Skip to content

Commit 9c04224

Browse files
authored
Merge branch 'master' into mh-fix-291
2 parents 85abf14 + c647128 commit 9c04224

File tree

7 files changed

+24
-10
lines changed

7 files changed

+24
-10
lines changed

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
# ignore compiled python files
216
__pycache__
317
*.pyc
@@ -39,3 +53,6 @@ docs/generated
3953

4054
# Default pycharm virtual env
4155
.venv/
56+
57+
# Ignore file generated by dev_tools/write-ci-requirements.py
58+
ci-requirements.txt

docs/otoc/otoc_example.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,6 @@
671671
"\n",
672672
" job = sampler.run_batch(\n",
673673
" programs=circuits_ic, \n",
674-
" params_list=[{} for _ in range(len(circuits_ic))], \n",
675674
" repetitions=int(2_000 + 10_000 * (c / max(cycles)) ** 3),\n",
676675
" )\n",
677676
"\n",

recirq/documentation_utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import inspect
1616
import io
1717
import os
18+
import pathlib
1819
import re
1920
import tarfile
2021
import urllib.request
@@ -63,7 +64,8 @@ def fetch_guide_data_collection_data(base_dir=None):
6364
if base_dir is None:
6465
from recirq.readout_scan.tasks import DEFAULT_BASE_DIR as base_dir
6566

66-
if os.path.exists(f'{base_dir}/2020-02-tutorial'):
67+
file_count = sum(1 for _ in pathlib.Path(base_dir).glob("2020-02-tutorial/Syc23-*/q-*/*.json"))
68+
if file_count >= 5:
6769
return
6870

6971
print("Downloading guide/data_collection data.")

recirq/otoc/otoc_example.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ def main():
9393
for c, circuits_ic in enumerate(circuits_i):
9494
print("Measuring circuit instance {}, cycle {}...".format(i, c))
9595
stats = int(2000 + 10000 * (c / max(cycles)) ** 3)
96-
params = [{} for _ in range(len(circuits_ic))]
97-
job = sampler.run_batch(programs=circuits_ic, params_list=params, repetitions=stats)
96+
job = sampler.run_batch(programs=circuits_ic, repetitions=stats)
9897
for d in range(num_qubits):
9998
p = np.mean(job[4 * d][0].measurements["z"])
10099
p -= np.mean(job[4 * d + 1][0].measurements["z"])

recirq/otoc/otoc_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ def test_build_otoc_circuits():
5656
circuits.extend(circs.butterfly_I)
5757

5858
results = []
59-
params = [{} for _ in range(len(circuits))]
60-
job = sampler.run_batch(programs=circuits, params_list=params, repetitions=2000)
59+
job = sampler.run_batch(programs=circuits, repetitions=2000)
6160
for d in range(len(circuits)):
6261
results.append(abs(np.mean(job[d][0].measurements["z"])))
6362

recirq/otoc/parallel_xeb_example.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ def main():
7575
sq_gates.append(sq_gate_indices_i)
7676
for c in circuits:
7777
c.append(cirq.measure(*qubits, key="z"))
78-
sweep_params = [{} for _ in range(len(circuits))]
79-
job = sampler.run_batch(programs=circuits, params_list=sweep_params, repetitions=5000)
78+
job = sampler.run_batch(programs=circuits, repetitions=5000)
8079
bits.append([job[j][0].measurements["z"] for j in range(num_cycles)])
8180
all_bits.append(bits)
8281
all_sq_gates.append(sq_gates)

recirq/otoc/parallel_xeb_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ def test_parallel_xeb_fidelities() -> None:
4747
sq_gates.append(sq_gate_indices_i)
4848
for c in circuits:
4949
c.append(cirq.measure(*qubits, key="z"))
50-
sweep_params = [{} for _ in range(len(circuits))]
51-
job = sampler.run_batch(programs=circuits, params_list=sweep_params, repetitions=5000)
50+
job = sampler.run_batch(programs=circuits, repetitions=5000)
5251
bits.append([job[j][0].measurements["z"] for j in range(num_cycles)])
5352
all_bits.append(bits)
5453
all_sq_gates.append(sq_gates)

0 commit comments

Comments
 (0)