cirq-core 1.7.0.dev20250930190406__py3-none-any.whl → 1.7.0.dev20251001224950__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.

@@ -0,0 +1,44 @@
1
+ # Copyright 2025 The Cirq Developers
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ import pathlib
16
+
17
+ import numpy as np
18
+
19
+ import cirq
20
+ from cirq.contrib.quantikz.circuit_to_latex_render import render_circuit
21
+
22
+
23
+ def test_render_circuit(tmp_path: pathlib.Path) -> None:
24
+ q0, q1 = cirq.LineQubit.range(2)
25
+ circuit = cirq.Circuit(
26
+ cirq.H(q0),
27
+ cirq.CNOT(q0, q1),
28
+ cirq.rx(0.25 * np.pi).on(q1),
29
+ cirq.measure(q0, q1, key='result'),
30
+ )
31
+ # Render and display in Jupyter (if available), also save to a file
32
+ img_or_path = render_circuit(
33
+ circuit,
34
+ output_png_path=tmp_path / "my_circuit.png",
35
+ output_tex_path=tmp_path / "my_circuit.tex",
36
+ output_pdf_path=tmp_path / "my_circuit.pdf",
37
+ fold_at=2,
38
+ debug=True,
39
+ wire_labels="qid",
40
+ )
41
+ assert img_or_path is not None
42
+ assert (tmp_path / "my_circuit.png").is_file()
43
+ assert (tmp_path / "my_circuit.tex").is_file()
44
+ assert (tmp_path / "my_circuit.pdf").is_file()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cirq-core
3
- Version: 1.7.0.dev20250930190406
3
+ Version: 1.7.0.dev20251001224950
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=emXpdD5ZvwLRlFAoQB8YatmZyU3b4e9jg6FppMTUhkU,33900
4
4
  cirq/_doc.py,sha256=BrnoABo1hk5RgB3Cgww4zLHUfiyFny0F1V-tOMCbdaU,2909
5
5
  cirq/_import.py,sha256=ixBu4EyGl46Ram2cP3p5eZVEFDW5L2DS-VyTjz4N9iw,8429
6
6
  cirq/_import_test.py,sha256=oF4izzOVZLc7NZ0aZHFcGv-r01eiFFt_JORx_x7_D4s,1089
7
- cirq/_version.py,sha256=wAl_vEkyQdYl26ruziF4UZ_u4Aj8bqllQb6dkF9XkCA,1206
8
- cirq/_version_test.py,sha256=1x51__s0SPQUO_amy0gvh-deh2jGdbtVbAyDyOimfko,155
7
+ cirq/_version.py,sha256=yWfxqm6ST5ErNc6Ul2YSRcCVYf6TZiSuSgLm1UH_ucM,1206
8
+ cirq/_version_test.py,sha256=4x-IyAB6SHbyOxAvPCBp9iP8Y55t0et9KL8j5irKBSY,155
9
9
  cirq/conftest.py,sha256=wSDKNdIQRDfLnXvOCWD3erheOw8JHRhdfQ53EyTUIXg,1239
10
10
  cirq/json_resolver_cache.py,sha256=A5DIgFAY1hUNt9vai_C3-gGBv24116CJMzQxMcXOax4,13726
11
11
  cirq/py.typed,sha256=VFSlmh_lNwnaXzwY-ZuW-C2Ws5PkuDoVgBdNCs0jXJE,63
@@ -131,6 +131,11 @@ cirq/contrib/qcircuit/qcircuit_diagram_info_test.py,sha256=DodZREuwlQhGSskI-Tuw6
131
131
  cirq/contrib/qcircuit/qcircuit_pdf.py,sha256=S9p6p9EPYariRJwy4XsRFqWvlrRofL9TZLdHZHNi2dM,2493
132
132
  cirq/contrib/qcircuit/qcircuit_pdf_test.py,sha256=fd36Z2g0e9YmW0KWUi5TDxfG-mwXJyJtWffbMgeBR9M,1085
133
133
  cirq/contrib/qcircuit/qcircuit_test.py,sha256=Nivln1ECv4_AIUH8-2kfQH7d2E7332uvFOXXSU-AfYo,6153
134
+ cirq/contrib/quantikz/__init__.py,sha256=cAKrNLJmGTHkv9TFJjxKs1WopJ634J6m-d701J8CaTM,910
135
+ cirq/contrib/quantikz/circuit_to_latex_quantikz.py,sha256=jAkrvW11K_Q3sq_eyij23WNoZ-NzIrjoYMGRc6U1MXs,30044
136
+ cirq/contrib/quantikz/circuit_to_latex_quantikz_test.py,sha256=EFJql3H_xrBHLrG9_W0sGgPySKRQxkskYUFYN9Pkshc,9519
137
+ cirq/contrib/quantikz/circuit_to_latex_render.py,sha256=kVMf2U_qPyDYIbUjDeZw6MfmBFoOz9FmN1wfPOy3KQg,20721
138
+ cirq/contrib/quantikz/circuit_to_latex_render_test.py,sha256=NhRA8ODivH6cXk8-99eO-EbvMb79VMWMUyN2wF37rcg,1507
134
139
  cirq/contrib/quantum_volume/__init__.py,sha256=RF_nbmm9s9A8sLhsnb7aZnuuoeHnsvlRNuoK8nBBW2w,1038
135
140
  cirq/contrib/quantum_volume/quantum_volume.py,sha256=NM47qf3yxkGxI3uJAa7pCI3NgLrD8XqdyvFbfMZyPY8,19457
136
141
  cirq/contrib/quantum_volume/quantum_volume_test.py,sha256=CZ_CyJMhLHlaIiG8doLC5eZX2o9agKqruMnQGM_CXCM,12610
@@ -1239,8 +1244,8 @@ cirq/work/sampler.py,sha256=rxbMWvrhu3gfNSBjZKozw28lLKVvBAS_1EGyPdYe8Xg,19041
1239
1244
  cirq/work/sampler_test.py,sha256=SsMrRvLDYELyOAWLKISjkdEfrBwLYWRsT6D8WrsLM3Q,13533
1240
1245
  cirq/work/zeros_sampler.py,sha256=Fs2JWwq0n9zv7_G5Rm-9vPeHUag7uctcMOHg0JTkZpc,2371
1241
1246
  cirq/work/zeros_sampler_test.py,sha256=lQLgQDGBLtfImryys2HzQ2jOSGxHgc7-koVBUhv8qYk,3345
1242
- cirq_core-1.7.0.dev20250930190406.dist-info/licenses/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1243
- cirq_core-1.7.0.dev20250930190406.dist-info/METADATA,sha256=MC-T0AlAmobCI5R0XvOAacKoVehWc2L96anR0nZOv4Q,4757
1244
- cirq_core-1.7.0.dev20250930190406.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
1245
- cirq_core-1.7.0.dev20250930190406.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1246
- cirq_core-1.7.0.dev20250930190406.dist-info/RECORD,,
1247
+ cirq_core-1.7.0.dev20251001224950.dist-info/licenses/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1248
+ cirq_core-1.7.0.dev20251001224950.dist-info/METADATA,sha256=LeD6uwJfeRewHnwlq8jAdIv1VBnEkoWQ86sY-Lax9ck,4757
1249
+ cirq_core-1.7.0.dev20251001224950.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
1250
+ cirq_core-1.7.0.dev20251001224950.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1251
+ cirq_core-1.7.0.dev20251001224950.dist-info/RECORD,,