cirq-core 1.5.0.dev20250115151412__py3-none-any.whl → 1.5.0.dev20250115162458__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 +1 -1
- cirq/_version_test.py +1 -1
- cirq/ops/clifford_gate.py +6 -1
- cirq/ops/clifford_gate_test.py +34 -0
- cirq/ops/measurement_gate.py +1 -1
- cirq/ops/measurement_gate_test.py +1 -1
- {cirq_core-1.5.0.dev20250115151412.dist-info → cirq_core-1.5.0.dev20250115162458.dist-info}/METADATA +1 -1
- {cirq_core-1.5.0.dev20250115151412.dist-info → cirq_core-1.5.0.dev20250115162458.dist-info}/RECORD +11 -11
- {cirq_core-1.5.0.dev20250115151412.dist-info → cirq_core-1.5.0.dev20250115162458.dist-info}/LICENSE +0 -0
- {cirq_core-1.5.0.dev20250115151412.dist-info → cirq_core-1.5.0.dev20250115162458.dist-info}/WHEEL +0 -0
- {cirq_core-1.5.0.dev20250115151412.dist-info → cirq_core-1.5.0.dev20250115162458.dist-info}/top_level.txt +0 -0
cirq/_version.py
CHANGED
cirq/_version_test.py
CHANGED
cirq/ops/clifford_gate.py
CHANGED
|
@@ -897,7 +897,12 @@ class SingleQubitCliffordGate(CliffordGate):
|
|
|
897
897
|
return self.merged_with(after).merged_with(self**-1)
|
|
898
898
|
|
|
899
899
|
def __repr__(self) -> str:
|
|
900
|
-
return
|
|
900
|
+
return (
|
|
901
|
+
f'cirq.ops.SingleQubitCliffordGate(_clifford_tableau=cirq.CliffordTableau(1, '
|
|
902
|
+
f'rs=np.array({self._clifford_tableau.rs.tolist()!r}), '
|
|
903
|
+
f'xs=np.array({self._clifford_tableau.xs.tolist()!r}), '
|
|
904
|
+
f'zs=np.array({self._clifford_tableau.zs.tolist()!r})))'
|
|
905
|
+
)
|
|
901
906
|
|
|
902
907
|
def _circuit_diagram_info_(
|
|
903
908
|
self, args: 'cirq.CircuitDiagramInfoArgs'
|
cirq/ops/clifford_gate_test.py
CHANGED
|
@@ -919,3 +919,37 @@ def test_all_single_qubit_clifford_unitaries():
|
|
|
919
919
|
assert cirq.equal_up_to_global_phase(cs[21], (i - 1j * (-x + y - z)) / 2)
|
|
920
920
|
assert cirq.equal_up_to_global_phase(cs[22], (i - 1j * (-x - y + z)) / 2)
|
|
921
921
|
assert cirq.equal_up_to_global_phase(cs[23], (i - 1j * (-x - y - z)) / 2)
|
|
922
|
+
|
|
923
|
+
|
|
924
|
+
def test_single_qubit_clifford_gate_repr():
|
|
925
|
+
assert repr(cirq.ops.SingleQubitCliffordGate.X) == (
|
|
926
|
+
'cirq.ops.SingleQubitCliffordGate(_clifford_tableau=cirq.CliffordTableau(1, '
|
|
927
|
+
'rs=np.array([False, True]), xs=np.array([[True], [False]]), '
|
|
928
|
+
'zs=np.array([[False], [True]])))'
|
|
929
|
+
)
|
|
930
|
+
assert repr(cirq.ops.SingleQubitCliffordGate.Y) == (
|
|
931
|
+
'cirq.ops.SingleQubitCliffordGate(_clifford_tableau=cirq.CliffordTableau(1, '
|
|
932
|
+
'rs=np.array([True, True]), xs=np.array([[True], [False]]), '
|
|
933
|
+
'zs=np.array([[False], [True]])))'
|
|
934
|
+
)
|
|
935
|
+
assert repr(cirq.ops.SingleQubitCliffordGate.Z) == (
|
|
936
|
+
'cirq.ops.SingleQubitCliffordGate(_clifford_tableau=cirq.CliffordTableau(1, '
|
|
937
|
+
'rs=np.array([True, False]), xs=np.array([[True], [False]]), '
|
|
938
|
+
'zs=np.array([[False], [True]])))'
|
|
939
|
+
)
|
|
940
|
+
assert repr(cirq.ops.SingleQubitCliffordGate.I) == (
|
|
941
|
+
'cirq.ops.SingleQubitCliffordGate(_clifford_tableau=cirq.CliffordTableau(1, '
|
|
942
|
+
'rs=np.array([False, False]), xs=np.array([[True], [False]]), '
|
|
943
|
+
'zs=np.array([[False], [True]])))'
|
|
944
|
+
)
|
|
945
|
+
assert repr(cirq.ops.SingleQubitCliffordGate.X_sqrt) == (
|
|
946
|
+
'cirq.ops.SingleQubitCliffordGate(_clifford_tableau=cirq.CliffordTableau(1, '
|
|
947
|
+
'rs=np.array([False, True]), xs=np.array([[True], [True]]), '
|
|
948
|
+
'zs=np.array([[False], [True]])))'
|
|
949
|
+
)
|
|
950
|
+
|
|
951
|
+
assert str(cirq.ops.SingleQubitCliffordGate.X) == (
|
|
952
|
+
'cirq.ops.SingleQubitCliffordGate(_clifford_tableau=cirq.CliffordTableau(1, '
|
|
953
|
+
'rs=np.array([False, True]), xs=np.array([[True], [False]]), '
|
|
954
|
+
'zs=np.array([[False], [True]])))'
|
|
955
|
+
)
|
cirq/ops/measurement_gate.py
CHANGED
|
@@ -273,7 +273,7 @@ class MeasurementGate(raw_types.Gate):
|
|
|
273
273
|
(idxs, tuple(v for _, v in np.ndenumerate(cmap)))
|
|
274
274
|
for idxs, cmap in self._confusion_map.items()
|
|
275
275
|
)
|
|
276
|
-
return self.key, self.
|
|
276
|
+
return self.key, self.full_invert_mask(), self._qid_shape, hashable_cmap
|
|
277
277
|
|
|
278
278
|
def _json_dict_(self) -> Dict[str, Any]:
|
|
279
279
|
other: Dict[str, Any] = {}
|
|
@@ -74,11 +74,11 @@ def test_measurement_eq():
|
|
|
74
74
|
eq.make_equality_group(
|
|
75
75
|
lambda: cirq.MeasurementGate(1, 'a'),
|
|
76
76
|
lambda: cirq.MeasurementGate(1, 'a', invert_mask=()),
|
|
77
|
+
lambda: cirq.MeasurementGate(1, 'a', invert_mask=(False,)),
|
|
77
78
|
lambda: cirq.MeasurementGate(1, 'a', qid_shape=(2,)),
|
|
78
79
|
lambda: cirq.MeasurementGate(1, 'a', confusion_map={}),
|
|
79
80
|
)
|
|
80
81
|
eq.add_equality_group(cirq.MeasurementGate(1, 'a', invert_mask=(True,)))
|
|
81
|
-
eq.add_equality_group(cirq.MeasurementGate(1, 'a', invert_mask=(False,)))
|
|
82
82
|
eq.add_equality_group(
|
|
83
83
|
cirq.MeasurementGate(1, 'a', confusion_map={(0,): np.array([[0, 1], [1, 0]])})
|
|
84
84
|
)
|
{cirq_core-1.5.0.dev20250115151412.dist-info → cirq_core-1.5.0.dev20250115162458.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: cirq-core
|
|
3
|
-
Version: 1.5.0.
|
|
3
|
+
Version: 1.5.0.dev20250115162458
|
|
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.5.0.dev20250115151412.dist-info → cirq_core-1.5.0.dev20250115162458.dist-info}/RECORD
RENAMED
|
@@ -4,8 +4,8 @@ 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=
|
|
8
|
-
cirq/_version_test.py,sha256=
|
|
7
|
+
cirq/_version.py,sha256=CTsv0-Rn5Swqu-xAt8ztXazBAqwaoJteTGnnL1j7YEo,1206
|
|
8
|
+
cirq/_version_test.py,sha256=q7Mbb8ZIj1gwqnLO0nQtxeL4yEJUbNhvaP3TajjsBFY,147
|
|
9
9
|
cirq/conftest.py,sha256=X7yLFL8GLhg2CjPw0hp5e_dGASfvHx1-QT03aUbhKJw,1168
|
|
10
10
|
cirq/json_resolver_cache.py,sha256=cpbvJMNIh0U-l1mEVb-TqhJUEXfm2vpuR3v432ORSmg,13702
|
|
11
11
|
cirq/py.typed,sha256=VFSlmh_lNwnaXzwY-ZuW-C2Ws5PkuDoVgBdNCs0jXJE,63
|
|
@@ -270,8 +270,8 @@ cirq/ops/boolean_hamiltonian.py,sha256=li003lNq6zS8pNPTobqzfzYJvyvaIpCVo3wkliI6H
|
|
|
270
270
|
cirq/ops/boolean_hamiltonian_test.py,sha256=1ey5yfYZPKZDsfM3jpCPAOpbPs_y8i4K_WvDK2d5_4Y,8518
|
|
271
271
|
cirq/ops/classically_controlled_operation.py,sha256=qTOsbGRZFbQIaBj9iee31V_V8oMLqWIJjgFomy3kg4A,9104
|
|
272
272
|
cirq/ops/classically_controlled_operation_test.py,sha256=nIYyXfNH4E2IibZSLk6QDVHpfJQbuI_iWwirCH8rhi8,50209
|
|
273
|
-
cirq/ops/clifford_gate.py,sha256=
|
|
274
|
-
cirq/ops/clifford_gate_test.py,sha256=
|
|
273
|
+
cirq/ops/clifford_gate.py,sha256=qvzRNQ2uY7jVf7RZwF5smXKgPabMPHZLKKkxzxP2ZwE,39590
|
|
274
|
+
cirq/ops/clifford_gate_test.py,sha256=jymAeVgf0FhZM9wmQLgJ8wgY26CgncmPoLY05Vl2dvA,39100
|
|
275
275
|
cirq/ops/common_channels.py,sha256=d53FzwsYK89vE5SV4PEoy96BPJHtdi522Rq0RRuc88M,38324
|
|
276
276
|
cirq/ops/common_channels_test.py,sha256=EL_PxbqD3KPC8ioihiukhmW8bUdclqqigKoFyUQpmIM,29690
|
|
277
277
|
cirq/ops/common_gate_families.py,sha256=e5M8wlDYtdrpWBrhdns6iizIvSqzfxDyIsBdxt8hVMc,8611
|
|
@@ -314,8 +314,8 @@ cirq/ops/matrix_gates.py,sha256=inBhKPsNx7ZeejNpmbPEGl5hgyrTqmA852BVlKMUZmg,9297
|
|
|
314
314
|
cirq/ops/matrix_gates_test.py,sha256=m5rMwq_sqVvsmkc5opVr3Ikd1ERuULmSRNAvGZUg7ds,14224
|
|
315
315
|
cirq/ops/measure_util.py,sha256=wkT0XC6rIddOkqNGwkvI-m7Ncr8j5QPN_evwecc6nrw,7390
|
|
316
316
|
cirq/ops/measure_util_test.py,sha256=Yzlced4nb4DHO-0cM_a-QZGO_3R8oqExkpIALN_pG4A,5307
|
|
317
|
-
cirq/ops/measurement_gate.py,sha256=
|
|
318
|
-
cirq/ops/measurement_gate_test.py,sha256=
|
|
317
|
+
cirq/ops/measurement_gate.py,sha256=XDjooVGYlhghaR5LJzmgROdHJgulXZuCax2_DVZBs0Q,11993
|
|
318
|
+
cirq/ops/measurement_gate_test.py,sha256=ZfaTXEVwf9dZFRrRWwCkn5tIyDdMnpELiEMCnxus-g0,18298
|
|
319
319
|
cirq/ops/mixed_unitary_channel.py,sha256=k3O4ovH3bFs1WnAZc647IgCK8thC5JnTGxsCzjBacEY,5259
|
|
320
320
|
cirq/ops/mixed_unitary_channel_test.py,sha256=x8LIAea2KcutNupnRJ_cLy1kmxhbUh3K3BkZtg3OkKQ,5058
|
|
321
321
|
cirq/ops/named_qubit.py,sha256=niAsH7m32n3lEVIcy1nnVDPkPqk6PY2qlriz7mzgZmk,10006
|
|
@@ -1203,8 +1203,8 @@ cirq/work/sampler.py,sha256=bE5tmVkcR6cZZMLETxDfHehdsYUMbx2RvBeIBetehI4,19187
|
|
|
1203
1203
|
cirq/work/sampler_test.py,sha256=hL2UWx3dz2ukZVNxWftiKVvJcQoLplLZdQm-k1QcA40,13282
|
|
1204
1204
|
cirq/work/zeros_sampler.py,sha256=x1C7cup66a43n-3tm8QjhiqJa07qcJW10FxNp9jJ59Q,2356
|
|
1205
1205
|
cirq/work/zeros_sampler_test.py,sha256=JIkpBBFPJe5Ba4142vzogyWyboG1Q1ZAm0UVGgOoZn8,3279
|
|
1206
|
-
cirq_core-1.5.0.
|
|
1207
|
-
cirq_core-1.5.0.
|
|
1208
|
-
cirq_core-1.5.0.
|
|
1209
|
-
cirq_core-1.5.0.
|
|
1210
|
-
cirq_core-1.5.0.
|
|
1206
|
+
cirq_core-1.5.0.dev20250115162458.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
|
|
1207
|
+
cirq_core-1.5.0.dev20250115162458.dist-info/METADATA,sha256=9hwOrGCpj6J5ghJ_RSxuHnus3pth2krlFpFh2mQXOak,2105
|
|
1208
|
+
cirq_core-1.5.0.dev20250115162458.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
1209
|
+
cirq_core-1.5.0.dev20250115162458.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
|
|
1210
|
+
cirq_core-1.5.0.dev20250115162458.dist-info/RECORD,,
|
{cirq_core-1.5.0.dev20250115151412.dist-info → cirq_core-1.5.0.dev20250115162458.dist-info}/LICENSE
RENAMED
|
File without changes
|
{cirq_core-1.5.0.dev20250115151412.dist-info → cirq_core-1.5.0.dev20250115162458.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|