cirq-core 1.6.0.dev20250514171429__py3-none-any.whl → 1.6.0.dev20250514172313__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/__init__.py +2 -0
- cirq/_version.py +1 -1
- cirq/_version_test.py +1 -1
- cirq/ops/__init__.py +2 -0
- cirq/ops/clifford_gate.py +29 -0
- cirq/ops/clifford_gate_test.py +11 -0
- cirq/protocols/json_test_data/CXSWAP.json +46 -0
- cirq/protocols/json_test_data/CXSWAP.repr +13 -0
- cirq/protocols/json_test_data/CZSWAP.json +46 -0
- cirq/protocols/json_test_data/CZSWAP.repr +13 -0
- {cirq_core-1.6.0.dev20250514171429.dist-info → cirq_core-1.6.0.dev20250514172313.dist-info}/METADATA +1 -1
- {cirq_core-1.6.0.dev20250514171429.dist-info → cirq_core-1.6.0.dev20250514172313.dist-info}/RECORD +15 -11
- {cirq_core-1.6.0.dev20250514171429.dist-info → cirq_core-1.6.0.dev20250514172313.dist-info}/WHEEL +0 -0
- {cirq_core-1.6.0.dev20250514171429.dist-info → cirq_core-1.6.0.dev20250514172313.dist-info}/licenses/LICENSE +0 -0
- {cirq_core-1.6.0.dev20250514171429.dist-info → cirq_core-1.6.0.dev20250514172313.dist-info}/top_level.txt +0 -0
cirq/__init__.py
CHANGED
|
@@ -205,7 +205,9 @@ from cirq.ops import (
|
|
|
205
205
|
CSwapGate as CSwapGate,
|
|
206
206
|
CX as CX,
|
|
207
207
|
CXPowGate as CXPowGate,
|
|
208
|
+
CXSWAP as CXSWAP,
|
|
208
209
|
CZ as CZ,
|
|
210
|
+
CZSWAP as CZSWAP,
|
|
209
211
|
CZPowGate as CZPowGate,
|
|
210
212
|
DensePauliString as DensePauliString,
|
|
211
213
|
depolarize as depolarize,
|
cirq/_version.py
CHANGED
cirq/_version_test.py
CHANGED
cirq/ops/__init__.py
CHANGED
cirq/ops/clifford_gate.py
CHANGED
|
@@ -941,3 +941,32 @@ class SingleQubitCliffordGate(CliffordGate):
|
|
|
941
941
|
def _value_equality_values_cls_(self):
|
|
942
942
|
"""To make it with compatible to compare with clifford gate."""
|
|
943
943
|
return CliffordGate
|
|
944
|
+
|
|
945
|
+
|
|
946
|
+
CXSWAP = CliffordGate.from_clifford_tableau(
|
|
947
|
+
qis.CliffordTableau(
|
|
948
|
+
2,
|
|
949
|
+
rs=np.array([False, False, False, False], dtype=np.dtype('bool')),
|
|
950
|
+
xs=np.array(
|
|
951
|
+
[[True, True], [True, False], [False, False], [False, False]], dtype=np.dtype('bool')
|
|
952
|
+
),
|
|
953
|
+
zs=np.array(
|
|
954
|
+
[[False, False], [False, False], [False, True], [True, True]], dtype=np.dtype('bool')
|
|
955
|
+
),
|
|
956
|
+
initial_state=0,
|
|
957
|
+
)
|
|
958
|
+
)
|
|
959
|
+
|
|
960
|
+
CZSWAP = CliffordGate.from_clifford_tableau(
|
|
961
|
+
qis.CliffordTableau(
|
|
962
|
+
2,
|
|
963
|
+
rs=np.array([False, False, False, False], dtype=np.dtype('bool')),
|
|
964
|
+
xs=np.array(
|
|
965
|
+
[[False, True], [True, False], [False, False], [False, False]], dtype=np.dtype('bool')
|
|
966
|
+
),
|
|
967
|
+
zs=np.array(
|
|
968
|
+
[[True, False], [False, True], [False, True], [True, False]], dtype=np.dtype('bool')
|
|
969
|
+
),
|
|
970
|
+
initial_state=0,
|
|
971
|
+
)
|
|
972
|
+
)
|
cirq/ops/clifford_gate_test.py
CHANGED
|
@@ -995,3 +995,14 @@ def test_single_qubit_clifford_gate_repr():
|
|
|
995
995
|
'rs=np.array([False, True]), xs=np.array([[True], [False]]), '
|
|
996
996
|
'zs=np.array([[True], [True]])))'
|
|
997
997
|
)
|
|
998
|
+
|
|
999
|
+
|
|
1000
|
+
def test_cxswap_czswap():
|
|
1001
|
+
|
|
1002
|
+
# cirq unitary for CNOT then SWAP (big endian)
|
|
1003
|
+
cxswap_expected = np.asarray([[1, 0, 0, 0], [0, 0, 0, 1], [0, 1, 0, 0], [0, 0, 1, 0]])
|
|
1004
|
+
print(cirq.unitary(cirq.CXSWAP))
|
|
1005
|
+
assert np.allclose(cirq.unitary(cirq.CXSWAP), cxswap_expected)
|
|
1006
|
+
|
|
1007
|
+
czswap_expected = np.asarray([[1, 0, 0, 0], [0, 0, 1, 0], [0, 1, 0, 0], [0, 0, 0, -1]])
|
|
1008
|
+
assert np.allclose(cirq.unitary(cirq.CZSWAP), czswap_expected)
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cirq_type": "CliffordGate",
|
|
3
|
+
"n": 2,
|
|
4
|
+
"rs": [
|
|
5
|
+
false,
|
|
6
|
+
false,
|
|
7
|
+
false,
|
|
8
|
+
false
|
|
9
|
+
],
|
|
10
|
+
"xs": [
|
|
11
|
+
[
|
|
12
|
+
true,
|
|
13
|
+
true
|
|
14
|
+
],
|
|
15
|
+
[
|
|
16
|
+
true,
|
|
17
|
+
false
|
|
18
|
+
],
|
|
19
|
+
[
|
|
20
|
+
false,
|
|
21
|
+
false
|
|
22
|
+
],
|
|
23
|
+
[
|
|
24
|
+
false,
|
|
25
|
+
false
|
|
26
|
+
]
|
|
27
|
+
],
|
|
28
|
+
"zs": [
|
|
29
|
+
[
|
|
30
|
+
false,
|
|
31
|
+
false
|
|
32
|
+
],
|
|
33
|
+
[
|
|
34
|
+
false,
|
|
35
|
+
false
|
|
36
|
+
],
|
|
37
|
+
[
|
|
38
|
+
false,
|
|
39
|
+
true
|
|
40
|
+
],
|
|
41
|
+
[
|
|
42
|
+
true,
|
|
43
|
+
true
|
|
44
|
+
]
|
|
45
|
+
]
|
|
46
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
cirq.CliffordGate(_clifford_tableau=
|
|
2
|
+
cirq.CliffordTableau(
|
|
3
|
+
2,
|
|
4
|
+
rs=np.array([False, False, False, False], dtype=np.dtype('bool')),
|
|
5
|
+
xs=np.array(
|
|
6
|
+
[[True, True], [True, False], [False, False], [False, False]], dtype=np.dtype('bool')
|
|
7
|
+
),
|
|
8
|
+
zs=np.array(
|
|
9
|
+
[[False, False], [False, False], [False, True], [True, True]], dtype=np.dtype('bool')
|
|
10
|
+
),
|
|
11
|
+
initial_state=0,
|
|
12
|
+
)
|
|
13
|
+
)
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cirq_type": "CliffordGate",
|
|
3
|
+
"n": 2,
|
|
4
|
+
"rs": [
|
|
5
|
+
false,
|
|
6
|
+
false,
|
|
7
|
+
false,
|
|
8
|
+
false
|
|
9
|
+
],
|
|
10
|
+
"xs": [
|
|
11
|
+
[
|
|
12
|
+
false,
|
|
13
|
+
true
|
|
14
|
+
],
|
|
15
|
+
[
|
|
16
|
+
true,
|
|
17
|
+
false
|
|
18
|
+
],
|
|
19
|
+
[
|
|
20
|
+
false,
|
|
21
|
+
false
|
|
22
|
+
],
|
|
23
|
+
[
|
|
24
|
+
false,
|
|
25
|
+
false
|
|
26
|
+
]
|
|
27
|
+
],
|
|
28
|
+
"zs": [
|
|
29
|
+
[
|
|
30
|
+
true,
|
|
31
|
+
false
|
|
32
|
+
],
|
|
33
|
+
[
|
|
34
|
+
false,
|
|
35
|
+
true
|
|
36
|
+
],
|
|
37
|
+
[
|
|
38
|
+
false,
|
|
39
|
+
true
|
|
40
|
+
],
|
|
41
|
+
[
|
|
42
|
+
true,
|
|
43
|
+
false
|
|
44
|
+
]
|
|
45
|
+
]
|
|
46
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
cirq.CliffordGate(_clifford_tableau=
|
|
2
|
+
cirq.CliffordTableau(
|
|
3
|
+
2,
|
|
4
|
+
rs=np.array([False, False, False, False], dtype=np.dtype('bool')),
|
|
5
|
+
xs=np.array(
|
|
6
|
+
[[False, True], [True, False], [False, False], [False, False]], dtype=np.dtype('bool')
|
|
7
|
+
),
|
|
8
|
+
zs=np.array(
|
|
9
|
+
[[True, False], [False, True], [False, True], [True, False]], dtype=np.dtype('bool')
|
|
10
|
+
),
|
|
11
|
+
initial_state=0,
|
|
12
|
+
)
|
|
13
|
+
)
|
{cirq_core-1.6.0.dev20250514171429.dist-info → cirq_core-1.6.0.dev20250514172313.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cirq-core
|
|
3
|
-
Version: 1.6.0.
|
|
3
|
+
Version: 1.6.0.dev20250514172313
|
|
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
|
{cirq_core-1.6.0.dev20250514171429.dist-info → cirq_core-1.6.0.dev20250514172313.dist-info}/RECORD
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
cirq/__init__.py,sha256=
|
|
1
|
+
cirq/__init__.py,sha256=QLBOuigMYDEL12O1ZaWw0Nmw3vKY3gJ4yuGfPo4YENM,28238
|
|
2
2
|
cirq/_compat.py,sha256=_DknO27XngcjEidNApRsCzLUWDS4QmDk9M12BaqP5Is,29531
|
|
3
3
|
cirq/_compat_test.py,sha256=t51ZXkEuomg1SMI871Ws-5pk68DGBsAf2TGNjVXtZ8I,34755
|
|
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=
|
|
8
|
-
cirq/_version_test.py,sha256=
|
|
7
|
+
cirq/_version.py,sha256=MOPwm84DJe-f9t_cM6867NbAhEvP_k07gFkc0HtitPs,1206
|
|
8
|
+
cirq/_version_test.py,sha256=WaOiCNy2yFnF7eM11SH0wmyoOQ3hqon4HnJ_q9ohcxI,155
|
|
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
|
|
@@ -270,15 +270,15 @@ cirq/neutral_atoms/__init__.py,sha256=VoQBkmZ5m4TPxjxShRixjqJbnc-IAnAWkGOPu8MBS5
|
|
|
270
270
|
cirq/neutral_atoms/convert_to_neutral_atom_gates.py,sha256=2sIJd5CzWjehMi_rfFW8QXSnafwdWqzrnrzKbWlkXf0,1156
|
|
271
271
|
cirq/neutral_atoms/convert_to_neutral_atom_gates_test.py,sha256=yZhv5hVhvUhCQnntP_Nk6mPsXs1j1d8bFhcSMmz-_yE,1869
|
|
272
272
|
cirq/neutral_atoms/neutral_atom_devices.py,sha256=s-LInrNp8k_txKbpLWfsaoiZvUScOWNxr-jiB-nFcDA,1358
|
|
273
|
-
cirq/ops/__init__.py,sha256=
|
|
273
|
+
cirq/ops/__init__.py,sha256=HNtQJBFeiJJ-MbbNqe3f6KfcmZ_4YP5oTcCcZnGkYbY,8318
|
|
274
274
|
cirq/ops/arithmetic_operation.py,sha256=j1RkP2gDX3n7xzEKNAoTQSmzfXBIAdov07AUlhdtVQw,10157
|
|
275
275
|
cirq/ops/arithmetic_operation_test.py,sha256=xIuLKsTWl6y2X90IukOv4xsbQGUCYi2m4jgHJWqdbLM,4958
|
|
276
276
|
cirq/ops/boolean_hamiltonian.py,sha256=2Z5iqrxHxMmFjRgY72uqedK2C6sfFtIFSGs8TGwyhKg,14946
|
|
277
277
|
cirq/ops/boolean_hamiltonian_test.py,sha256=p0vm-hQKWJQdiLl6KyM-ylF3eIW1JgxBfiheFABKCig,8540
|
|
278
278
|
cirq/ops/classically_controlled_operation.py,sha256=lRP-agJZBgGO5CL9OML3oZKaOZJAuAMqnHe4XRAC6Gk,10369
|
|
279
279
|
cirq/ops/classically_controlled_operation_test.py,sha256=nIYyXfNH4E2IibZSLk6QDVHpfJQbuI_iWwirCH8rhi8,50209
|
|
280
|
-
cirq/ops/clifford_gate.py,sha256=
|
|
281
|
-
cirq/ops/clifford_gate_test.py,sha256=
|
|
280
|
+
cirq/ops/clifford_gate.py,sha256=N2obL0540tkuIHOvfyEPuXavYm29kymieXqxKcKJ24M,40293
|
|
281
|
+
cirq/ops/clifford_gate_test.py,sha256=iLzN-zca-wIbjbNng8gwlHGh7KZlg5zcoH_BV-KAuQ4,40810
|
|
282
282
|
cirq/ops/common_channels.py,sha256=aTxfQ7F4ewv2h_XfUgfdGk2DbU7Lian-Jp_2muMNXlg,37130
|
|
283
283
|
cirq/ops/common_channels_test.py,sha256=2AEMqpjQyeDP6rE2nY2gHuMbanaYQZb_na0ScuuGPWA,30719
|
|
284
284
|
cirq/ops/common_gate_families.py,sha256=2E31Qr_Yv1zI-r_MNWmr1xJYrEHHU45274iDrt_oKPE,8611
|
|
@@ -484,10 +484,14 @@ cirq/protocols/json_test_data/CX.repr,sha256=MEz6igUiT1YdVhY3C2s8KHDvat0qC-guDV-
|
|
|
484
484
|
cirq/protocols/json_test_data/CX.repr_inward,sha256=MEz6igUiT1YdVhY3C2s8KHDvat0qC-guDV-K_hqBfxM,9
|
|
485
485
|
cirq/protocols/json_test_data/CXPowGate.json,sha256=2t2RbA32D4_bdjgc4JXExjTYvUmvV38ejY9jvr8TUKw,76
|
|
486
486
|
cirq/protocols/json_test_data/CXPowGate.repr,sha256=SCJLIkXQQwqH9NBEX_6ZBa6mqplL36fL81NYBT_6hbM,50
|
|
487
|
+
cirq/protocols/json_test_data/CXSWAP.json,sha256=uhlMgCTp-UFmnev4a785yr155rQJLLammGtmrN5J43I,428
|
|
488
|
+
cirq/protocols/json_test_data/CXSWAP.repr,sha256=mxBK3JZHsTh7Cz6e7wAfwfFA0mMI2oFWcW2UDjg_zwg,442
|
|
487
489
|
cirq/protocols/json_test_data/CZ.json,sha256=732Zza9yot4TpapFbJaQj3Q0NrcqbolTkyPtr8N0pmA,70
|
|
488
490
|
cirq/protocols/json_test_data/CZ.repr,sha256=PjvOrt0zh_3EWbqxrSVw1o8pIQjIkEBObeM8tai7uUA,7
|
|
489
491
|
cirq/protocols/json_test_data/CZPowGate.json,sha256=3N2Ageh6MeH0ZbqUY549dDkQQmtcOzGCOmbMe7Gfn9M,76
|
|
490
492
|
cirq/protocols/json_test_data/CZPowGate.repr,sha256=r73dZkZPUKUoKycbPay4pUKgQm3iazvrNRdgCYSJbok,50
|
|
493
|
+
cirq/protocols/json_test_data/CZSWAP.json,sha256=NMDqC9hTwfRYxvexnj71llxDQIZ_EtBnoun3fghFevE,428
|
|
494
|
+
cirq/protocols/json_test_data/CZSWAP.repr,sha256=uY2UGApAeQi7e0fwD__deX3XFKtPpIpj42o_60VOOAE,442
|
|
491
495
|
cirq/protocols/json_test_data/CZTargetGateset.json,sha256=awjiW6WeUI76O6ONwObe7JQpz-GQOZH-uckpojiTRP8,1256
|
|
492
496
|
cirq/protocols/json_test_data/CZTargetGateset.repr,sha256=ua9QtMoUcuErWoH6M4IsBP67M41KXjbeOD4dDKodYPA,596
|
|
493
497
|
cirq/protocols/json_test_data/Circuit.json,sha256=pQNIcjuIYBfXnGkqQnn4xuSLoHysFELzi01SxFfcOAY,4379
|
|
@@ -1214,8 +1218,8 @@ cirq/work/sampler.py,sha256=b7O3B8bc77KQb8ReLx7qeF8owP1Qwb5_I-RwC6-M_C8,19118
|
|
|
1214
1218
|
cirq/work/sampler_test.py,sha256=TBJm3gepuOURwklJTXNdqj0thvdqKUvrZwZqdytJxNY,13313
|
|
1215
1219
|
cirq/work/zeros_sampler.py,sha256=vHCfqkXmUcPkaDuKHlY-UQ71dUHVroEtm_XW51mZpHs,2390
|
|
1216
1220
|
cirq/work/zeros_sampler_test.py,sha256=lQLgQDGBLtfImryys2HzQ2jOSGxHgc7-koVBUhv8qYk,3345
|
|
1217
|
-
cirq_core-1.6.0.
|
|
1218
|
-
cirq_core-1.6.0.
|
|
1219
|
-
cirq_core-1.6.0.
|
|
1220
|
-
cirq_core-1.6.0.
|
|
1221
|
-
cirq_core-1.6.0.
|
|
1221
|
+
cirq_core-1.6.0.dev20250514172313.dist-info/licenses/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
|
|
1222
|
+
cirq_core-1.6.0.dev20250514172313.dist-info/METADATA,sha256=6RojM5qq2DZQCh8_GXv5M1RCYoD2epwpzHeSZE666qc,4959
|
|
1223
|
+
cirq_core-1.6.0.dev20250514172313.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
|
1224
|
+
cirq_core-1.6.0.dev20250514172313.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
|
|
1225
|
+
cirq_core-1.6.0.dev20250514172313.dist-info/RECORD,,
|
{cirq_core-1.6.0.dev20250514171429.dist-info → cirq_core-1.6.0.dev20250514172313.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|