cirq-core 1.6.0.dev20250418235304__py3-none-any.whl → 1.6.0.dev20250423233500__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, 10, 0): # pragma: no cover
28
28
  'of cirq (e.g. "python -m pip install cirq==1.1.*")'
29
29
  )
30
30
 
31
- __version__ = "1.6.0.dev20250418235304"
31
+ __version__ = "1.6.0.dev20250423233500"
cirq/_version_test.py CHANGED
@@ -3,4 +3,4 @@ import cirq
3
3
 
4
4
 
5
5
  def test_version():
6
- assert cirq.__version__ == "1.6.0.dev20250418235304"
6
+ assert cirq.__version__ == "1.6.0.dev20250423233500"
cirq/ops/matrix_gates.py CHANGED
@@ -187,6 +187,9 @@ class MatrixGate(raw_types.Gate):
187
187
  self, args: 'cirq.CircuitDiagramInfoArgs'
188
188
  ) -> 'cirq.CircuitDiagramInfo':
189
189
  n_qubits = len(self._qid_shape)
190
+ # No diagram for zero-qubit gates; let fallback handle it
191
+ if n_qubits == 0:
192
+ return NotImplemented
190
193
  if self._name is not None:
191
194
  symbols = (
192
195
  [self._name] if n_qubits == 1 else [f'{self._name}[{i+1}]' for i in range(n_qubits)]
@@ -115,6 +115,13 @@ def test_circuit_diagram_info_pass_fail():
115
115
  assert cirq.circuit_diagram_info(E()) == cirq.CircuitDiagramInfo(('X',))
116
116
 
117
117
 
118
+ def test_controlled_1x1_matrixgate_diagram_error():
119
+ q = cirq.LineQubit(0)
120
+ g = cirq.MatrixGate(np.array([[1j]])).controlled()
121
+ c = cirq.Circuit(g(q))
122
+ assert str(c) == "0: ───C[[0.+1.j]]───"
123
+
124
+
118
125
  def test_circuit_diagram_info_args_eq():
119
126
  eq = cirq.testing.EqualsTester()
120
127
  eq.add_equality_group(cirq.CircuitDiagramInfoArgs.UNINFORMED_DEFAULT)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cirq-core
3
- Version: 1.6.0.dev20250418235304
3
+ Version: 1.6.0.dev20250423233500
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=0m3sYIyxRNv9jvAo6rzJ-cnbpny3KGnAByrbU7bApgQ,34720
4
4
  cirq/_doc.py,sha256=yDyWUD_2JDS0gShfGRb-rdqRt9-WeL7DhkqX7np0Nko,2879
5
5
  cirq/_import.py,sha256=cfocxtT1BJ4HkfZ-VO8YyIhPP-xfqHDkLrzz6eeO5U0,8421
6
6
  cirq/_import_test.py,sha256=6K_v0riZJXOXUphHNkGA8MY-JcmGlezFaGmvrNhm3OQ,1015
7
- cirq/_version.py,sha256=jsSpm5IxlVEc39C4FiYUOQn71j68EGjxj8ycf7Vcf6E,1206
8
- cirq/_version_test.py,sha256=F1zHzJqOYvuJpUZBQaYap77P97_m4tj6sVkI1iF9vRM,147
7
+ cirq/_version.py,sha256=zTDhJcrU7VxbbMpoej2ZPpYN8Z5hGHW8WGiVjpcN4hU,1206
8
+ cirq/_version_test.py,sha256=6aahIvsCawS-lbYQpB5PvDe58BVBx2c6vj0MwIWhpTU,147
9
9
  cirq/conftest.py,sha256=X7yLFL8GLhg2CjPw0hp5e_dGASfvHx1-QT03aUbhKJw,1168
10
10
  cirq/json_resolver_cache.py,sha256=-4KqEEYb6aps-seafnFTHTp3SZc0D8mr4O-pCKIajn8,13653
11
11
  cirq/py.typed,sha256=VFSlmh_lNwnaXzwY-ZuW-C2Ws5PkuDoVgBdNCs0jXJE,63
@@ -314,7 +314,7 @@ cirq/ops/kraus_channel.py,sha256=qX828mvPSFgEaG0I3Jhj04y5rD7dUjeEl2HYDn7_7j4,508
314
314
  cirq/ops/kraus_channel_test.py,sha256=-E6ExIO3P0y2T74Gx-RMu0kLpy1RWP9wH6UGDI21oFU,4820
315
315
  cirq/ops/linear_combinations.py,sha256=PE1o_mvpdnlg3o95iSn5ID18kuxwS2q3DGDuFnlNC90,39916
316
316
  cirq/ops/linear_combinations_test.py,sha256=ip-wN8T8nUQviD3ql42eet7k_MQ6DVUfIK8aX-_ygOs,67217
317
- cirq/ops/matrix_gates.py,sha256=PoaJuONeh7wFQ0iJUtMsN-OdvYW9wm_q8kFBLWu6I1k,10221
317
+ cirq/ops/matrix_gates.py,sha256=KbAo1jadyoNHuHCIOCswjB5J82x7nR_mZW0loT-JFmE,10347
318
318
  cirq/ops/matrix_gates_test.py,sha256=m5rMwq_sqVvsmkc5opVr3Ikd1ERuULmSRNAvGZUg7ds,14224
319
319
  cirq/ops/measure_util.py,sha256=ZaH1Lze4Yk3nYrojn7SILUeIN96p_khIoa25ixXLu6A,7390
320
320
  cirq/ops/measure_util_test.py,sha256=Yzlced4nb4DHO-0cM_a-QZGO_3R8oqExkpIALN_pG4A,5307
@@ -391,7 +391,7 @@ cirq/protocols/apply_unitary_protocol_test.py,sha256=ajjHvcBBv5n8Qh_hMPZkdsOvy1x
391
391
  cirq/protocols/approximate_equality_protocol.py,sha256=ZqnkoltD8vS1eQjV7Lw3RS49cdjZjGTF0LbdRUlBOCw,6257
392
392
  cirq/protocols/approximate_equality_protocol_test.py,sha256=HRjM3PVRGgJNM1cqq7NQ3cMlsiYwL6zEm-MN4y7t1_M,9176
393
393
  cirq/protocols/circuit_diagram_info_protocol.py,sha256=msCejCJx5QtvJHM-yro5gbyUfave7FNhqjr8bUw9BIg,16011
394
- cirq/protocols/circuit_diagram_info_protocol_test.py,sha256=dSvjaGEbMGuSrs4kpFen5Z-_dC1JzPvl27Dg47di4A0,10415
394
+ cirq/protocols/circuit_diagram_info_protocol_test.py,sha256=2RGVwyseCcOZ3lNMjEavQcAIb_0JEt_KCsUpQRI5j5A,10633
395
395
  cirq/protocols/commutes_protocol.py,sha256=n7EQYs2giG3_Kh0bVhOXYQD7we7vTwj8IklBqQdolgM,7394
396
396
  cirq/protocols/commutes_protocol_test.py,sha256=h0Lky4jrs7Hxrh4MeHxmxNciuofKGGZ2eC-ceWP8wKU,5849
397
397
  cirq/protocols/control_key_protocol.py,sha256=sq4CswLr5TDHPmviNMF1shlL14D6XXlPxt3P985Esy0,2614
@@ -1209,8 +1209,8 @@ cirq/work/sampler.py,sha256=sW0RhIelGABAKbqTM58shwyyCPgf86JIv9IGdJe__js,19186
1209
1209
  cirq/work/sampler_test.py,sha256=mdk1J-WrvbPUYhY41VhWf9_te4DnXr_XMPcugWwc4-I,13281
1210
1210
  cirq/work/zeros_sampler.py,sha256=8_Ne6dBkDANtTZuql7Eb0Qg_E_P3-_gu-ybFzxTbKAQ,2356
1211
1211
  cirq/work/zeros_sampler_test.py,sha256=JIkpBBFPJe5Ba4142vzogyWyboG1Q1ZAm0UVGgOoZn8,3279
1212
- cirq_core-1.6.0.dev20250418235304.dist-info/licenses/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1213
- cirq_core-1.6.0.dev20250418235304.dist-info/METADATA,sha256=kLZKnEJ8_Bw-ynMp9V0KRoK3cGwFhaegTJRld0LNGXE,4908
1214
- cirq_core-1.6.0.dev20250418235304.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
1215
- cirq_core-1.6.0.dev20250418235304.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1216
- cirq_core-1.6.0.dev20250418235304.dist-info/RECORD,,
1212
+ cirq_core-1.6.0.dev20250423233500.dist-info/licenses/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1213
+ cirq_core-1.6.0.dev20250423233500.dist-info/METADATA,sha256=6vEgQxrsn9FQGRkxNMkFuKngjTjns6R7ijv3274109U,4908
1214
+ cirq_core-1.6.0.dev20250423233500.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
1215
+ cirq_core-1.6.0.dev20250423233500.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1216
+ cirq_core-1.6.0.dev20250423233500.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (78.1.0)
2
+ Generator: setuptools (79.0.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5