cirq-core 1.5.0.dev20250212192250__py3-none-any.whl → 1.5.0.dev20250212202822__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.5.0.dev20250212192250"
31
+ __version__ = "1.5.0.dev20250212202822"
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.5.0.dev20250212192250"
6
+ assert cirq.__version__ == "1.5.0.dev20250212202822"
cirq/ops/clifford_gate.py CHANGED
@@ -433,7 +433,7 @@ class CliffordGate(raw_types.Gate, CommonCliffordGates):
433
433
  return CliffordGate.from_clifford_tableau(base_tableau)
434
434
 
435
435
  def __repr__(self) -> str:
436
- return f"Clifford Gate with Tableau:\n {self.clifford_tableau._str_full_()}"
436
+ return f"Clifford Gate with Tableau:\n{self.clifford_tableau._str_full_()}"
437
437
 
438
438
  def _commutes_(
439
439
  self, other: Any, *, atol: float = 1e-8
@@ -923,7 +923,31 @@ def test_all_single_qubit_clifford_unitaries():
923
923
  assert cirq.equal_up_to_global_phase(cs[23], (i - 1j * (-x - y - z)) / 2)
924
924
 
925
925
 
926
+ def test_clifford_gate_repr():
927
+ q0, q1, q2 = cirq.LineQubit.range(3)
928
+ assert (
929
+ repr(cirq.ops.CliffordGate.from_op_list([cirq.ops.X(q0), cirq.CZ(q1, q2)], [q0, q1, q2]))
930
+ == """Clifford Gate with Tableau:
931
+ stable | destable
932
+ ---------+----------
933
+ - Z0 | + X0
934
+ + Z1 | + X1Z2
935
+ + Z2 | + Z1X2
936
+ """
937
+ )
938
+ assert (
939
+ repr(cirq.ops.CliffordGate.CNOT)
940
+ == """Clifford Gate with Tableau:
941
+ stable | destable
942
+ -------+----------
943
+ + Z0 | + X0X1
944
+ + Z0Z1 | + X1
945
+ """
946
+ )
947
+
948
+
926
949
  def test_single_qubit_clifford_gate_repr():
950
+ # Common gates
927
951
  assert repr(cirq.ops.SingleQubitCliffordGate.X) == (
928
952
  'cirq.ops.SingleQubitCliffordGate(_clifford_tableau=cirq.CliffordTableau(1, '
929
953
  'rs=np.array([False, True]), xs=np.array([[True], [False]]), '
@@ -950,8 +974,22 @@ def test_single_qubit_clifford_gate_repr():
950
974
  'zs=np.array([[False], [True]])))'
951
975
  )
952
976
 
953
- assert str(cirq.ops.SingleQubitCliffordGate.X) == (
977
+ assert repr(cirq.ops.SingleQubitCliffordGate.X) == (
954
978
  'cirq.ops.SingleQubitCliffordGate(_clifford_tableau=cirq.CliffordTableau(1, '
955
979
  'rs=np.array([False, True]), xs=np.array([[True], [False]]), '
956
980
  'zs=np.array([[False], [True]])))'
957
981
  )
982
+
983
+ # Other gates
984
+ qa = cirq.NamedQubit('a')
985
+ gate = cirq.ops.SingleQubitCliffordGate.from_clifford_tableau(
986
+ cirq.ops.CliffordGate.from_op_list(
987
+ [cirq.ops.PhasedXZGate(axis_phase_exponent=0.25, x_exponent=-1, z_exponent=0).on(qa)],
988
+ [qa],
989
+ ).clifford_tableau
990
+ )
991
+ assert repr(gate) == (
992
+ 'cirq.ops.SingleQubitCliffordGate(_clifford_tableau=cirq.CliffordTableau(1, '
993
+ 'rs=np.array([False, True]), xs=np.array([[True], [False]]), '
994
+ 'zs=np.array([[True], [True]])))'
995
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cirq-core
3
- Version: 1.5.0.dev20250212192250
3
+ Version: 1.5.0.dev20250212202822
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=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=obO7BrWo8ufaC0jdNj8oTqkrWBlkivbmcaLGUSEpUzk,1206
8
- cirq/_version_test.py,sha256=qHr56c63GGbb-NFFtUAbsengEP3boKrwKQDGETlvIpI,147
7
+ cirq/_version.py,sha256=KhFvU-esnBbx41Kz8qXxH2mVWcFA00oTGitSfszG2yI,1206
8
+ cirq/_version_test.py,sha256=WpcUUGvQqnigxkU4eWcTNaHjkkZUVUKJXyl6p-V9ZOY,147
9
9
  cirq/conftest.py,sha256=X7yLFL8GLhg2CjPw0hp5e_dGASfvHx1-QT03aUbhKJw,1168
10
10
  cirq/json_resolver_cache.py,sha256=p-vEOa-8GQ2cFIAdze-kd6C1un1uRvtujVPljVKaHBg,13557
11
11
  cirq/py.typed,sha256=VFSlmh_lNwnaXzwY-ZuW-C2Ws5PkuDoVgBdNCs0jXJE,63
@@ -271,8 +271,8 @@ cirq/ops/boolean_hamiltonian.py,sha256=li003lNq6zS8pNPTobqzfzYJvyvaIpCVo3wkliI6H
271
271
  cirq/ops/boolean_hamiltonian_test.py,sha256=1ey5yfYZPKZDsfM3jpCPAOpbPs_y8i4K_WvDK2d5_4Y,8518
272
272
  cirq/ops/classically_controlled_operation.py,sha256=M4NAcChYcz-a88oyIwOnV4uP06S18Cbef4VnhMmjyrA,10374
273
273
  cirq/ops/classically_controlled_operation_test.py,sha256=nIYyXfNH4E2IibZSLk6QDVHpfJQbuI_iWwirCH8rhi8,50209
274
- cirq/ops/clifford_gate.py,sha256=ANMz7d05Lf8F99gvoWYSa2HBK5O70KtsAIdChoo9yNI,39750
275
- cirq/ops/clifford_gate_test.py,sha256=zEdXXDA-M7wkHO6GTlltcWz6qyEiF0UaiWP8NwRTUmY,39270
274
+ cirq/ops/clifford_gate.py,sha256=usI1Qs2RiTZyrD8OP2zptcJIamzi8EZcRglsYofKY5A,39749
275
+ cirq/ops/clifford_gate_test.py,sha256=MQzZRURV--SPjRGLk_ESMBz75YXtKwtQGg2jufFDR0w,40341
276
276
  cirq/ops/common_channels.py,sha256=go4yhaRw0XNAr3TUBJ59SOhn2SKxf6bHmmrOHPbBYCY,37259
277
277
  cirq/ops/common_channels_test.py,sha256=nQsSSxu7vtedb3ZUuw4hNKIX7MYI4x8lxvLyWMZNt10,30079
278
278
  cirq/ops/common_gate_families.py,sha256=e5M8wlDYtdrpWBrhdns6iizIvSqzfxDyIsBdxt8hVMc,8611
@@ -1202,8 +1202,8 @@ cirq/work/sampler.py,sha256=bE5tmVkcR6cZZMLETxDfHehdsYUMbx2RvBeIBetehI4,19187
1202
1202
  cirq/work/sampler_test.py,sha256=hL2UWx3dz2ukZVNxWftiKVvJcQoLplLZdQm-k1QcA40,13282
1203
1203
  cirq/work/zeros_sampler.py,sha256=x1C7cup66a43n-3tm8QjhiqJa07qcJW10FxNp9jJ59Q,2356
1204
1204
  cirq/work/zeros_sampler_test.py,sha256=JIkpBBFPJe5Ba4142vzogyWyboG1Q1ZAm0UVGgOoZn8,3279
1205
- cirq_core-1.5.0.dev20250212192250.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1206
- cirq_core-1.5.0.dev20250212192250.dist-info/METADATA,sha256=ZZ68HBcHYNugRmZWUTHFlkq3x65pPO7Tkwpa269Gcoc,4811
1207
- cirq_core-1.5.0.dev20250212192250.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
1208
- cirq_core-1.5.0.dev20250212192250.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1209
- cirq_core-1.5.0.dev20250212192250.dist-info/RECORD,,
1205
+ cirq_core-1.5.0.dev20250212202822.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1206
+ cirq_core-1.5.0.dev20250212202822.dist-info/METADATA,sha256=P6pABVdw9AOupOf3JY6pa6q1ng7eAR8p0bR72sbBSJQ,4811
1207
+ cirq_core-1.5.0.dev20250212202822.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
1208
+ cirq_core-1.5.0.dev20250212202822.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1209
+ cirq_core-1.5.0.dev20250212202822.dist-info/RECORD,,