cirq-core 1.7.0.dev20251027162822__py3-none-any.whl → 1.7.0.dev20251027232108__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of cirq-core might be problematic. Click here for more details.

cirq/_version.py CHANGED
@@ -28,4 +28,4 @@ if sys.version_info < (3, 11, 0): # pragma: no cover
28
28
  'of Cirq (e.g. "python -m pip install cirq==1.5.0")'
29
29
  )
30
30
 
31
- __version__ = "1.7.0.dev20251027162822"
31
+ __version__ = "1.7.0.dev20251027232108"
cirq/_version_test.py CHANGED
@@ -3,4 +3,4 @@ import cirq
3
3
 
4
4
 
5
5
  def test_version() -> None:
6
- assert cirq.__version__ == "1.7.0.dev20251027162822"
6
+ assert cirq.__version__ == "1.7.0.dev20251027232108"
cirq/value/digits.py CHANGED
@@ -168,6 +168,11 @@ def big_endian_int_to_digits(
168
168
  >>> cirq.big_endian_int_to_digits(11, base=[2, 3, 4])
169
169
  [0, 2, 3]
170
170
  """
171
+ if digit_count and base == 2:
172
+ binary_chars = bin(val).removeprefix('0b')
173
+ zeros_count = digit_count - len(binary_chars)
174
+ if zeros_count >= 0:
175
+ return [0] * zeros_count + [1 if c == "1" else 0 for c in binary_chars]
171
176
  if isinstance(base, int):
172
177
  if digit_count is None:
173
178
  raise ValueError('No digit count. Provide `digit_count` when base is an int.')
@@ -192,4 +197,5 @@ def big_endian_int_to_digits(
192
197
  f'left behind {val!r} instead of 0.'
193
198
  )
194
199
 
195
- return result[::-1]
200
+ result.reverse()
201
+ return result
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cirq-core
3
- Version: 1.7.0.dev20251027162822
3
+ Version: 1.7.0.dev20251027232108
4
4
  Summary: A framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.
5
5
  Home-page: http://github.com/quantumlib/cirq
6
6
  Author: The Cirq Developers
@@ -4,8 +4,8 @@ cirq/_compat_test.py,sha256=emXpdD5ZvwLRlFAoQB8YatmZyU3b4e9jg6FppMTUhkU,33900
4
4
  cirq/_doc.py,sha256=28ZskY9ZtZ_4GS1oXPUgklKnJqmAE-rkUfzcsJ0--nA,2941
5
5
  cirq/_import.py,sha256=ixBu4EyGl46Ram2cP3p5eZVEFDW5L2DS-VyTjz4N9iw,8429
6
6
  cirq/_import_test.py,sha256=oF4izzOVZLc7NZ0aZHFcGv-r01eiFFt_JORx_x7_D4s,1089
7
- cirq/_version.py,sha256=YZ3K61lLuudNMig01mU6UkTsKc6TqlsguO2zINYEkzc,1206
8
- cirq/_version_test.py,sha256=r6YOhfLk1Z0beBDJUSyFgnLG2qBwGdEQWGRP84Kz7ig,155
7
+ cirq/_version.py,sha256=g7O1Eq5OuZdNfYZAn8zHkbwkz3LGcCxJV9msTNsf_x4,1206
8
+ cirq/_version_test.py,sha256=t2WylwznRLxqUzopJbbY4CLd39vYN-pd1k3vQAGnfUU,155
9
9
  cirq/conftest.py,sha256=wSDKNdIQRDfLnXvOCWD3erheOw8JHRhdfQ53EyTUIXg,1239
10
10
  cirq/json_resolver_cache.py,sha256=A5DIgFAY1hUNt9vai_C3-gGBv24116CJMzQxMcXOax4,13726
11
11
  cirq/py.typed,sha256=VFSlmh_lNwnaXzwY-ZuW-C2Ws5PkuDoVgBdNCs0jXJE,63
@@ -1195,7 +1195,7 @@ cirq/value/classical_data.py,sha256=SIxyyJyM0BavQxJJVnRN_ktFvv5QFEPPEewsr0muLVk,
1195
1195
  cirq/value/classical_data_test.py,sha256=q1QMT17E-X9kcaPw1oQqx3Hwnq3hyht24HaK3z7Udpo,5332
1196
1196
  cirq/value/condition.py,sha256=lJJcFiqG-r68DhhS01DS6HhQw0pDwbNq71bvH1Famec,11916
1197
1197
  cirq/value/condition_test.py,sha256=oEdim5nOYYY8UPU91H2xhb9MH8EC2WbMXTQ_DruHVO0,12949
1198
- cirq/value/digits.py,sha256=-3HTHqEQqy5evUz8aLE6ruw0NV3ncuPrc5asRMQ-sQ4,6063
1198
+ cirq/value/digits.py,sha256=5hHOYTM4A7yhz-7RLlv3KTB3VPPfbx-gRp7M_pAVAd4,6330
1199
1199
  cirq/value/digits_test.py,sha256=WDeUQTnDqZXh4JjWu_qEkzCFAtd8x1UlN9I2yjdDV3g,3848
1200
1200
  cirq/value/duration.py,sha256=4K-eiCoFfzm2SM3K1OhV__YrW1GmzgA7QSkBpxOkTp8,10402
1201
1201
  cirq/value/duration_test.py,sha256=xQd5-dE8zZddsZru1P6ClV3PoeJncqLAQr3ivgZIXdQ,8281
@@ -1246,8 +1246,8 @@ cirq/work/sampler.py,sha256=rxbMWvrhu3gfNSBjZKozw28lLKVvBAS_1EGyPdYe8Xg,19041
1246
1246
  cirq/work/sampler_test.py,sha256=SsMrRvLDYELyOAWLKISjkdEfrBwLYWRsT6D8WrsLM3Q,13533
1247
1247
  cirq/work/zeros_sampler.py,sha256=Fs2JWwq0n9zv7_G5Rm-9vPeHUag7uctcMOHg0JTkZpc,2371
1248
1248
  cirq/work/zeros_sampler_test.py,sha256=lQLgQDGBLtfImryys2HzQ2jOSGxHgc7-koVBUhv8qYk,3345
1249
- cirq_core-1.7.0.dev20251027162822.dist-info/licenses/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1250
- cirq_core-1.7.0.dev20251027162822.dist-info/METADATA,sha256=pGOHSQeanOrfJ2F_5kUKqWqpp7DfcS2FXmQQLx0HT0c,4757
1251
- cirq_core-1.7.0.dev20251027162822.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
1252
- cirq_core-1.7.0.dev20251027162822.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1253
- cirq_core-1.7.0.dev20251027162822.dist-info/RECORD,,
1249
+ cirq_core-1.7.0.dev20251027232108.dist-info/licenses/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1250
+ cirq_core-1.7.0.dev20251027232108.dist-info/METADATA,sha256=ic6wyvba6WdjMpxKLPUy8-9HORuJ46ZglP_G_gokOow,4757
1251
+ cirq_core-1.7.0.dev20251027232108.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
1252
+ cirq_core-1.7.0.dev20251027232108.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1253
+ cirq_core-1.7.0.dev20251027232108.dist-info/RECORD,,