cirq-core 1.5.0.dev20250114171625__py3-none-any.whl → 1.5.0.dev20250114225139__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.dev20250114171625"
31
+ __version__ = "1.5.0.dev20250114225139"
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.dev20250114171625"
6
+ assert cirq.__version__ == "1.5.0.dev20250114225139"
@@ -177,7 +177,13 @@ def _calc_pulled_through(
177
177
  clifford_ops_in_moment: list[ops.Operation] = [
178
178
  op for op in moment.operations if _is_clifford_op(op)
179
179
  ]
180
- return input_pauli_ops.after(clifford_ops_in_moment)
180
+ # TODO(#6946): directly pass clifford_ops_in_moment to input_pauli_ops.after() after #6946 is
181
+ # fixed.
182
+ affected_qubits = [q for op in clifford_ops_in_moment for q in op.qubits]
183
+ all_cliffords_in_gate: ops.CliffordGate = ops.CliffordGate.from_op_list(
184
+ clifford_ops_in_moment, affected_qubits
185
+ )
186
+ return input_pauli_ops.after(all_cliffords_in_gate.on(*affected_qubits))
181
187
 
182
188
 
183
189
  def _get_stop_qubits(moment: circuits.Moment) -> set[ops.Qid]:
@@ -774,3 +774,61 @@ def test_cross_clifford_pieces_filling_merge():
774
774
  6: ───────────────────────────────────────────────────────────PhXZ(a=0.2,x=0.2,z=0.1)───X─────────────────────────@───PhXZ(a=0.8,x=0.8,z=0.5)─────H────────────────────────
775
775
  """,
776
776
  )
777
+
778
+
779
+ def test_pull_through_phxz_gate_case1():
780
+ """Test case diagrams.
781
+ Input:
782
+ a: ───H───────PhXZ(a=0.25,x=-1,z=0)───────@───
783
+
784
+ b: ───H───H───H───────────────────────H───X───
785
+ Output: expected circuit diagram below.
786
+ """
787
+ a = cirq.NamedQubit('a')
788
+ b = cirq.NamedQubit('b')
789
+
790
+ phxz = cirq.PhasedXZGate(axis_phase_exponent=0.25, x_exponent=-1, z_exponent=0)
791
+ assert_dd(
792
+ input_circuit=cirq.Circuit(
793
+ cirq.Moment(cirq.H(a), cirq.H(b)),
794
+ cirq.Moment(cirq.H(b)),
795
+ cirq.Moment(phxz(a), cirq.H(b)),
796
+ cirq.Moment(cirq.H(b)),
797
+ cirq.Moment(cirq.CNOT(a, b)),
798
+ ),
799
+ expected_circuit="""
800
+ a: ───H───X───PhXZ(a=0.25,x=-1,z=0)───X───@───Z───
801
+
802
+ b: ───H───H───H───────────────────────H───X───────
803
+ """,
804
+ schema="XX_PAIR",
805
+ )
806
+
807
+
808
+ def test_pull_through_phxz_gate_case2():
809
+ """Test case diagrams.
810
+ Input:
811
+ a: ───H───────PhXZ(a=0.2,x=-1,z=0)───────@───
812
+
813
+ b: ───H───H───H───────────────────────H───X───
814
+ Output: expected circuit diagram below.
815
+ """
816
+ a = cirq.NamedQubit('a')
817
+ b = cirq.NamedQubit('b')
818
+
819
+ phxz = cirq.PhasedXZGate(axis_phase_exponent=0.2, x_exponent=-1, z_exponent=0)
820
+ assert_dd(
821
+ input_circuit=cirq.Circuit(
822
+ cirq.Moment(cirq.H(a), cirq.H(b)),
823
+ cirq.Moment(cirq.H(b)),
824
+ cirq.Moment(phxz(a), cirq.H(b)),
825
+ cirq.Moment(cirq.H(b)),
826
+ cirq.Moment(cirq.CNOT(a, b)),
827
+ ),
828
+ expected_circuit="""
829
+ a: ───H───X───PhXZ(a=0.1,x=0,z=0.4)───X───@───X───
830
+
831
+ b: ───H───H───H───────────────────────H───X───X───
832
+ """,
833
+ schema="XX_PAIR",
834
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cirq-core
3
- Version: 1.5.0.dev20250114171625
3
+ Version: 1.5.0.dev20250114225139
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=EDKOtu0Nq96d4qjEAmeOrdIgXHGeuc89jbL3BrG5bFA,1206
8
- cirq/_version_test.py,sha256=Ch25ZsgTVyY9Tsjstv-lQZzFe_XmN_niS6lxvFwcYvE,147
7
+ cirq/_version.py,sha256=4NkMp4EN09mzG9jfRecTplB1IR067vo9G54hHQzQiRc,1206
8
+ cirq/_version_test.py,sha256=AWuGjxi3SxQLc9jrEqBZE1WrEmiRJA9ucK2xTxRVrPw,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
@@ -1046,8 +1046,8 @@ cirq/transformers/drop_empty_moments.py,sha256=Rtn_BrpwkLXyZBdLzwdnsnEGWTdYuf1xO
1046
1046
  cirq/transformers/drop_empty_moments_test.py,sha256=G8pZmTfi8NG2NpGz_K3LZu5NQoqa-xPMCuZjwEu07xk,1907
1047
1047
  cirq/transformers/drop_negligible_operations.py,sha256=8eyOMy7bra2wJAjORbk6QjwHiLdL5SfwRaz8D2Dazbw,2083
1048
1048
  cirq/transformers/drop_negligible_operations_test.py,sha256=gqL6RoDPm6Zf4RxtprBenFyIsZQPUxmPur9oRl0Yr3U,3823
1049
- cirq/transformers/dynamical_decoupling.py,sha256=SDDWhy3NZH8MKr6GbGeslkKLa2W_LpxW6obDsubiVQQ,14603
1050
- cirq/transformers/dynamical_decoupling_test.py,sha256=GlZMhGxYgHJ9nKH0tDSrK3mjzJoxrr4NB3zNngP0YQI,42374
1049
+ cirq/transformers/dynamical_decoupling.py,sha256=EjRNuAE-G8RYjA3RMhpNf63cQtukRQgU28MQtAwTPIs,14943
1050
+ cirq/transformers/dynamical_decoupling_test.py,sha256=XCLH9Clco1KM6NXQmaVYCpUR1SALBRofgFgCH79RBuI,44690
1051
1051
  cirq/transformers/eject_phased_paulis.py,sha256=usuPCxHgZf6Aw6pqIU4vOvaOypH4SiT2lY8VwAnlObs,13975
1052
1052
  cirq/transformers/eject_phased_paulis_test.py,sha256=-mXsfbi3V0ojC_YqoQM5otzdW4kjGusCx6F-kCv8M98,15834
1053
1053
  cirq/transformers/eject_z.py,sha256=d53z1siUVCPrtNbPls6_RSujz6d2gF77_AQAWhnJmVM,5823
@@ -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.dev20250114171625.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1207
- cirq_core-1.5.0.dev20250114171625.dist-info/METADATA,sha256=FaBaxeZ2YPZlKToRESAF0PxIdbcYAsL4eg14b_ibBhM,2105
1208
- cirq_core-1.5.0.dev20250114171625.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
1209
- cirq_core-1.5.0.dev20250114171625.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1210
- cirq_core-1.5.0.dev20250114171625.dist-info/RECORD,,
1206
+ cirq_core-1.5.0.dev20250114225139.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1207
+ cirq_core-1.5.0.dev20250114225139.dist-info/METADATA,sha256=xiv814MiWePyAbympmAOEaR2Z2AifzHfI0bluTeSwoI,2105
1208
+ cirq_core-1.5.0.dev20250114225139.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
1209
+ cirq_core-1.5.0.dev20250114225139.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1210
+ cirq_core-1.5.0.dev20250114225139.dist-info/RECORD,,