cirq-core 1.3.0.dev20231023180251__py3-none-any.whl → 1.3.0.dev20231026184824__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
@@ -1 +1 @@
1
- __version__ = "1.3.0.dev20231023180251"
1
+ __version__ = "1.3.0.dev20231026184824"
cirq/ops/clifford_gate.py CHANGED
@@ -683,25 +683,26 @@ class SingleQubitCliffordGate(CliffordGate):
683
683
  flip_index = int(z_to_flip) * 2 + x_to_flip
684
684
  a, x, z = 0.0, 0.0, 0.0
685
685
 
686
- if np.array_equal(self.clifford_tableau.matrix(), [[1, 0], [0, 1]]):
686
+ matrix = self.clifford_tableau.matrix()
687
+ if np.array_equal(matrix, [[1, 0], [0, 1]]):
687
688
  # I, Z, X, Y cases
688
689
  to_phased_xz = [(0.0, 0.0, 0.0), (0.0, 0.0, 1.0), (0.0, 1.0, 0.0), (0.5, 1.0, 0.0)]
689
690
  a, x, z = to_phased_xz[flip_index]
690
- elif np.array_equal(self.clifford_tableau.matrix(), [[1, 0], [1, 1]]):
691
+ elif np.array_equal(matrix, [[1, 0], [1, 1]]):
691
692
  # +/- X_sqrt, 2 Hadamard-like gates acting on the YZ plane
692
693
  a = 0.0
693
694
  x = 0.5 if x_to_flip ^ z_to_flip else -0.5
694
695
  z = 1.0 if x_to_flip else 0.0
695
- elif np.array_equal(self.clifford_tableau.matrix(), [[0, 1], [1, 0]]):
696
+ elif np.array_equal(matrix, [[0, 1], [1, 0]]):
696
697
  # +/- Y_sqrt, 2 Hadamard-like gates acting on the XZ plane
697
698
  a = 0.5
698
699
  x = 0.5 if x_to_flip else -0.5
699
700
  z = 0.0 if x_to_flip ^ z_to_flip else 1.0
700
- elif np.array_equal(self.clifford_tableau.matrix(), [[1, 1], [0, 1]]):
701
+ elif np.array_equal(matrix, [[1, 1], [0, 1]]):
701
702
  # +/- Z_sqrt, 2 Hadamard-like gates acting on the XY plane
702
703
  to_phased_xz = [(0.0, 0.0, 0.5), (0.0, 0.0, -0.5), (0.25, 1.0, 0.0), (-0.25, 1.0, 0.0)]
703
704
  a, x, z = to_phased_xz[flip_index]
704
- elif np.array_equal(self.clifford_tableau.matrix(), [[0, 1], [1, 1]]):
705
+ elif np.array_equal(matrix, [[0, 1], [1, 1]]):
705
706
  # axis swapping rotation -- (312) permutation
706
707
  a = 0.5
707
708
  x = 0.5 if x_to_flip else -0.5
@@ -709,7 +710,7 @@ class SingleQubitCliffordGate(CliffordGate):
709
710
  else:
710
711
  # axis swapping rotation -- (231) permutation.
711
712
  # This should be the only cases left.
712
- assert np.array_equal(self.clifford_tableau.matrix(), [[1, 1], [1, 0]])
713
+ assert np.array_equal(matrix, [[1, 1], [1, 0]])
713
714
  a = 0.0
714
715
  x = -0.5 if x_to_flip ^ z_to_flip else 0.5
715
716
  z = -0.5 if x_to_flip else 0.5
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cirq-core
3
- Version: 1.3.0.dev20231023180251
3
+ Version: 1.3.0.dev20231026184824
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,7 +4,7 @@ cirq/_compat_test.py,sha256=84X6ELsb5fv3Hc0_ly8-IQfMnCNQN6tHs6GZFrnuNyI,35005
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=RB3PssPXCjZDZTOsU8Cy4ktkKDVNN0gfj2ReE4iJDZI,40
7
+ cirq/_version.py,sha256=EHwN5o4DO2_tauvxBppTaEU6ARAYFe8XYCBqxBy5Y6Q,40
8
8
  cirq/_version_test.py,sha256=Ea3ZNdQKZBsZrSc9xle7TUdT9bUINs-qezPruQ_m38s,133
9
9
  cirq/conftest.py,sha256=X7yLFL8GLhg2CjPw0hp5e_dGASfvHx1-QT03aUbhKJw,1168
10
10
  cirq/json_resolver_cache.py,sha256=S0HaPOCUIck-vNSQlS6KxnQtle6w-2dGuSxkUbJQY9Y,13168
@@ -267,7 +267,7 @@ cirq/ops/boolean_hamiltonian.py,sha256=hjmzBvWiZnb18JfdhId-dVxt2VmbyAbqMSFAPWV7s
267
267
  cirq/ops/boolean_hamiltonian_test.py,sha256=1ey5yfYZPKZDsfM3jpCPAOpbPs_y8i4K_WvDK2d5_4Y,8518
268
268
  cirq/ops/classically_controlled_operation.py,sha256=bMqKutwzqbvN2r7mOVOI12HTPDGSJLkhQQgfAcTtbDU,9166
269
269
  cirq/ops/classically_controlled_operation_test.py,sha256=MNU0Adff4kTosqsrQ3PUT3ARcZee_PkchT6u0xDl8Qg,48039
270
- cirq/ops/clifford_gate.py,sha256=zEzZJMI1Rl5JEhyNJ-6zqVHnujoToXdi2ryImuW3ra4,38235
270
+ cirq/ops/clifford_gate.py,sha256=B1guFN4YvUzqjBPVZH_stYWdi9MicJYjuoByB6rrK_Q,38139
271
271
  cirq/ops/clifford_gate_test.py,sha256=km9yExzNYeYwrOBcW_FTNgNVn7UO6_8RSupG9CrqeSM,37471
272
272
  cirq/ops/common_channels.py,sha256=mVGEta2wnaWOhRCXQO6gUj9Zll3rtXqpY-PRYcJ8m1U,38282
273
273
  cirq/ops/common_channels_test.py,sha256=UW_8VEUzGiVn1D18l1scxMatg99V-yL1VxgC9nL9qqk,29686
@@ -1146,8 +1146,8 @@ cirq/work/sampler.py,sha256=JVv1vvfa6EgFiR3UeDk44U186dCrioH2NZXueCgsb9w,19828
1146
1146
  cirq/work/sampler_test.py,sha256=zo1Hj6sn6fLs_WZMxYRApBqgBsldmptn74NL0jhNukc,12325
1147
1147
  cirq/work/zeros_sampler.py,sha256=D3hbNZC-jXKuNAWg2OUiUuT8pmDV_WFnEfMank6In4o,2357
1148
1148
  cirq/work/zeros_sampler_test.py,sha256=JIkpBBFPJe5Ba4142vzogyWyboG1Q1ZAm0UVGgOoZn8,3279
1149
- cirq_core-1.3.0.dev20231023180251.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1150
- cirq_core-1.3.0.dev20231023180251.dist-info/METADATA,sha256=bikaZ8SQkFtaYr6qECPEgCzmB1CJ7r-nOE3s2GijB6o,2077
1151
- cirq_core-1.3.0.dev20231023180251.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
1152
- cirq_core-1.3.0.dev20231023180251.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1153
- cirq_core-1.3.0.dev20231023180251.dist-info/RECORD,,
1149
+ cirq_core-1.3.0.dev20231026184824.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1150
+ cirq_core-1.3.0.dev20231026184824.dist-info/METADATA,sha256=UINkDRoYBGpd-bgW-Kf5RCD0gnpmAPvmxYfK7JElFpU,2077
1151
+ cirq_core-1.3.0.dev20231026184824.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
1152
+ cirq_core-1.3.0.dev20231026184824.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1153
+ cirq_core-1.3.0.dev20231026184824.dist-info/RECORD,,