cirq-core 1.4.0.dev20240320235012__py3-none-any.whl → 1.4.0.dev20240322202929__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.
cirq/__init__.py CHANGED
@@ -509,6 +509,7 @@ from cirq.study import (
509
509
  to_sweeps,
510
510
  Result,
511
511
  UnitSweep,
512
+ UNIT_SWEEP,
512
513
  Zip,
513
514
  ZipLongest,
514
515
  )
cirq/_version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "1.4.0.dev20240320235012"
1
+ __version__ = "1.4.0.dev20240322202929"
@@ -92,16 +92,12 @@ class SupportsDecompose(Protocol):
92
92
  """An object that can be decomposed into simpler operations.
93
93
 
94
94
  All decomposition methods should ultimately terminate on basic 1-qubit and
95
- 2-qubit gates included by default in Cirq. Cirq does not make any guarantees
96
- about what the final gate set is. Currently, decompositions within Cirq
97
- happen to converge towards the X, Y, Z, CZ, PhasedX, specified-matrix gates,
98
- and others. This set will vary from release to release. Because of this
99
- variability, it is important for consumers of decomposition to look for
100
- generic properties of gates, such as "two qubit gate with a unitary matrix",
101
- instead of specific gate types such as CZ gates (though a consumer is
102
- of course free to handle CZ gates in a special way, and consumers can
103
- give an `intercepting_decomposer` to `cirq.decompose` that attempts to
104
- target a specific gate set).
95
+ 2-qubit gates included by default in Cirq. If a custom decomposition is not
96
+ specified, Cirq will decompose all operations to XPow/YPow/ZPow/CZPow/Measurement
97
+ + Global phase gateset. However, the default decomposition in Cirq should be a last resort
98
+ fallback and it is recommended for consumers of decomposition to either not depend
99
+ upon a specific target gateset, or give an `intercepting_decomposer` to `cirq.decompose`
100
+ that attempts to target a specific gate set.
105
101
 
106
102
  For example, `cirq.TOFFOLI` has a `_decompose_` method that returns a pair
107
103
  of Hadamard gates surrounding a `cirq.CCZ`. Although `cirq.CCZ` is not a
@@ -109,6 +109,7 @@ TestSpec = ModuleJsonTestSpec(
109
109
  'StateVectorStepResult',
110
110
  'StepResultBase',
111
111
  'UnitSweep',
112
+ 'UNIT_SWEEP',
112
113
  'NamedTopology',
113
114
  # protocols:
114
115
  'HasJSONNamespace',
cirq/study/__init__.py CHANGED
@@ -36,6 +36,7 @@ from cirq.study.sweeps import (
36
36
  Points,
37
37
  Product,
38
38
  Sweep,
39
+ UNIT_SWEEP,
39
40
  UnitSweep,
40
41
  Zip,
41
42
  ZipLongest,
cirq/study/sweeps.py CHANGED
@@ -205,6 +205,10 @@ class _Unit(Sweep):
205
205
  UnitSweep = _Unit()
206
206
  document(UnitSweep, """The singleton sweep with no parameters.""")
207
207
 
208
+ # Alternate name to designate as a constant.
209
+ UNIT_SWEEP = UnitSweep
210
+ document(UNIT_SWEEP, """The singleton sweep with no parameters.""")
211
+
208
212
 
209
213
  class Product(Sweep):
210
214
  """Cartesian product of one or more sweeps.
cirq/study/sweeps_test.py CHANGED
@@ -232,6 +232,9 @@ def test_equality():
232
232
 
233
233
  et.add_equality_group(cirq.UnitSweep, cirq.UnitSweep)
234
234
 
235
+ # Test singleton
236
+ assert cirq.UNIT_SWEEP is cirq.UnitSweep
237
+
235
238
  # Simple sweeps with the same key are equal to themselves, but different
236
239
  # from each other even if they happen to contain the same points.
237
240
  et.make_equality_group(lambda: cirq.Linspace('a', 0, 10, 11))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cirq-core
3
- Version: 1.4.0.dev20240320235012
3
+ Version: 1.4.0.dev20240322202929
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
@@ -1,10 +1,10 @@
1
- cirq/__init__.py,sha256=-me8ux2uyeDMA9bO17djZH-SbpSKixOsfrvotuAJRc8,15720
1
+ cirq/__init__.py,sha256=Pisx61VoUhqDdggQ31ch0Mx3uMwVtZ0q7Z69Ib4C92s,15736
2
2
  cirq/_compat.py,sha256=2tkJ50ID2PXzmMNuTfQrsZqqRSblTmfu3Y7g742gojs,29342
3
3
  cirq/_compat_test.py,sha256=Qq3ZcfgD-Nb81cEppQdJqhAyrVqXKtfXZYGXT0p-Wh0,34718
4
4
  cirq/_doc.py,sha256=yDyWUD_2JDS0gShfGRb-rdqRt9-WeL7DhkqX7np0Nko,2879
5
5
  cirq/_import.py,sha256=p9gMHJscbtDDkfHOaulvd3Aer0pwUF5AXpL89XR8dNw,8402
6
6
  cirq/_import_test.py,sha256=6K_v0riZJXOXUphHNkGA8MY-JcmGlezFaGmvrNhm3OQ,1015
7
- cirq/_version.py,sha256=Kf3dh7KBoeRmAqbmuYSZKevqC-2POzUS6uGPUdBiPiM,40
7
+ cirq/_version.py,sha256=1si7W9NCVsoRA9f5-aBVo77SyoOtmgxLlamn486N1dk,40
8
8
  cirq/_version_test.py,sha256=yYS6xm5-nuBRQJa9R3n41WdvFtVyY7Lb5Q8bea3VgBI,133
9
9
  cirq/conftest.py,sha256=X7yLFL8GLhg2CjPw0hp5e_dGASfvHx1-QT03aUbhKJw,1168
10
10
  cirq/json_resolver_cache.py,sha256=9g_JQMmfBzTuV-3s2flUbXIgcLjs4K7LjAFFgngdG1U,13204
@@ -389,7 +389,7 @@ cirq/protocols/commutes_protocol.py,sha256=KW849TNso6d_pzTlAN8SRN2pjz72LJ8uAhQSY
389
389
  cirq/protocols/commutes_protocol_test.py,sha256=h0Lky4jrs7Hxrh4MeHxmxNciuofKGGZ2eC-ceWP8wKU,5849
390
390
  cirq/protocols/control_key_protocol.py,sha256=S3b4XOvTIj6TxNbj0W33fjdvXiWSKOtflvfEGeruzWw,2630
391
391
  cirq/protocols/control_key_protocol_test.py,sha256=190gp4QBu5QpP2doMmzx9RkAkp6VZOOWGOXp0RIFgqc,970
392
- cirq/protocols/decompose_protocol.py,sha256=nzCnAAGHvEV6UQdC_CU-MPQuQBkHPB5AGIBHgqf7KxE,19156
392
+ cirq/protocols/decompose_protocol.py,sha256=0zDsymAFfTSo8mze516oNCvc2OmEUQAOaxoSyTQR0Cc,18919
393
393
  cirq/protocols/decompose_protocol_test.py,sha256=5L5lQN_FV9qtE3NHPsnxtdgUtY5uDEIfxZkBHbgDrGs,16025
394
394
  cirq/protocols/equal_up_to_global_phase_protocol.py,sha256=0a93790FDjID46cX94PVAlA9i9Fu7uN8cj6qT94NH9w,4101
395
395
  cirq/protocols/equal_up_to_global_phase_protocol_test.py,sha256=9H54KKkS3-_BrTSrEynDq1-sAcYfhLVmVqveLHieg24,5722
@@ -837,7 +837,7 @@ cirq/protocols/json_test_data/pandas.Index.json_inward,sha256=KENE3PlSxmtMdnikuJ
837
837
  cirq/protocols/json_test_data/pandas.Index.repr_inward,sha256=2YnQUO58RGFGvuVjmR57v25YIvPAnTgVYh0jeQYhXHo,52
838
838
  cirq/protocols/json_test_data/pandas.MultiIndex.json,sha256=pF6YdRE3Qjhsf8CeGEZQvX5AWHAWaMNQF6c661Sqrxg,233
839
839
  cirq/protocols/json_test_data/pandas.MultiIndex.repr,sha256=g4q-1zFWYG8T7IAI0anQ5aMHSFlGF2CJsAoYdZzbGa8,80
840
- cirq/protocols/json_test_data/spec.py,sha256=7NY4zWAt-RG5k5Y1TZLIUEKzQNGsW4QE6axboziJUG8,5593
840
+ cirq/protocols/json_test_data/spec.py,sha256=b_9-k4vW8eHi8umSwo7ryDAkjvUb74aW-UvZRKONaXY,5615
841
841
  cirq/protocols/json_test_data/sympy.Add.json,sha256=fVilRXllnMRnQcXuoU06IlwZOWK9Kwim1t6Q_s6z97g,1000
842
842
  cirq/protocols/json_test_data/sympy.Add.repr,sha256=9L_05ZlcrFpo8QoExFAAO_kEEpc7SSqGyp0vudkRlsU,228
843
843
  cirq/protocols/json_test_data/sympy.E.json,sha256=d2NfgXTX-YhePH-I0SkkI-lSSJ6PkqTnUZ-yngh9GQk,39
@@ -925,7 +925,7 @@ cirq/sim/clifford/stabilizer_simulation_state.py,sha256=5ZeHd1mlz6LW_suOOEWHNX9i
925
925
  cirq/sim/clifford/stabilizer_simulation_state_test.py,sha256=dsphoXTaIwRCjprGJQirSs0qeVKHlni_pt_GZJn5Vpc,4317
926
926
  cirq/sim/clifford/stabilizer_state_ch_form.py,sha256=yz9x7F72wfgqfSiEhoH2rJ-n14nsYMapMvpkhwidIOY,14032
927
927
  cirq/sim/clifford/stabilizer_state_ch_form_test.py,sha256=FK0IsyrTfT6ZPZeBYmyPG2xpzUT7RG6P6UQw_61c6kU,3149
928
- cirq/study/__init__.py,sha256=HTGcCkU8ex7t1etgDtE4l9oanjI_P3UtWKWzb_tw4mA,1204
928
+ cirq/study/__init__.py,sha256=HCuFRBzCJGGDhtoHRzrnD5IWB8EnMrX-4M6AmVO0tP0,1220
929
929
  cirq/study/flatten_expressions.py,sha256=LIePrTJJW3PfdQS2jJ-DxhjpuOdwdBZi0WbtXHf2qmw,15638
930
930
  cirq/study/flatten_expressions_test.py,sha256=6e7pTkaBrZW-EmG4teZxcwemqnxCtJW3kq2KOlPcwW8,6078
931
931
  cirq/study/resolver.py,sha256=-X6R4FQ5nkEyaf4YsNFTN1Ui8Ss-Mkn39pHOV-vgsZQ,11773
@@ -934,8 +934,8 @@ cirq/study/result.py,sha256=KzjpjvDVCTFjMyq9r91pZSYdtcD1x3yj8jP_StlOSMg,19285
934
934
  cirq/study/result_test.py,sha256=fq5BH78RswfTiYjMchJ4wEDDyaJu0QdJoGobMjKDeSI,15591
935
935
  cirq/study/sweepable.py,sha256=BMgq8lxVnyJGBeu4gFUt_0P_v4gFwKgazZFftRUEwnA,4185
936
936
  cirq/study/sweepable_test.py,sha256=xjUksIurfbh240fEC7Al_TuiHGz7xZGktQUh86XBG9U,4772
937
- cirq/study/sweeps.py,sha256=IzonyU-LgEcMpvQrKZbl14v-BHi01oncp9CmHtLw0J4,19813
938
- cirq/study/sweeps_test.py,sha256=IqZp0ywYA430nNE_slBfc4vdKjULttzPl8ytxHLlgWo,11966
937
+ cirq/study/sweeps.py,sha256=t_FNvvkHYR6kyVvxeSa5WL-laUT77Bhzrx1vQ0qW6hI,19950
938
+ cirq/study/sweeps_test.py,sha256=maE7UgJ2s2mlE96YkIYW3pyvYQCPat-bZfnbIQ1TSrA,12033
939
939
  cirq/testing/__init__.py,sha256=cACho8s-V5tNOjBcDUtr2DipQxQcbUgbr4MESJb4l1I,3870
940
940
  cirq/testing/circuit_compare.py,sha256=nBQES45wLVThOqC3WrPrYKLQP7HQ2pH5DjlJ5bHkrtU,19176
941
941
  cirq/testing/circuit_compare_test.py,sha256=AduZCzwBNFCYrjEpyS1DvIR6jU8GaFqQBBgPXyIALoU,19743
@@ -1154,8 +1154,8 @@ cirq/work/sampler.py,sha256=JEAeQQRF3bqlO9AkOf4XbrTATDI5f5JgyM_FAUCNxao,19751
1154
1154
  cirq/work/sampler_test.py,sha256=B2ZsuqGT854gQtBIAh8k0LiG9Vj5wSzcGvkxOUoTcW4,13217
1155
1155
  cirq/work/zeros_sampler.py,sha256=x1C7cup66a43n-3tm8QjhiqJa07qcJW10FxNp9jJ59Q,2356
1156
1156
  cirq/work/zeros_sampler_test.py,sha256=JIkpBBFPJe5Ba4142vzogyWyboG1Q1ZAm0UVGgOoZn8,3279
1157
- cirq_core-1.4.0.dev20240320235012.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1158
- cirq_core-1.4.0.dev20240320235012.dist-info/METADATA,sha256=Z54PA5RN88-mzuw3QH3UmtWgtQxvD9MdV1EQA5ZO6Ws,2090
1159
- cirq_core-1.4.0.dev20240320235012.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
1160
- cirq_core-1.4.0.dev20240320235012.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1161
- cirq_core-1.4.0.dev20240320235012.dist-info/RECORD,,
1157
+ cirq_core-1.4.0.dev20240322202929.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1158
+ cirq_core-1.4.0.dev20240322202929.dist-info/METADATA,sha256=Si-bPAfF6B1WFDtFDDE3oOUrT-8kzVzsOlL7IgBPDxs,2090
1159
+ cirq_core-1.4.0.dev20240322202929.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
1160
+ cirq_core-1.4.0.dev20240322202929.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1161
+ cirq_core-1.4.0.dev20240322202929.dist-info/RECORD,,