cirq-core 1.5.0.dev20250404021339__py3-none-any.whl → 1.5.0.dev20250404165440__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.dev20250404021339"
31
+ __version__ = "1.5.0.dev20250404165440"
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.dev20250404021339"
6
+ assert cirq.__version__ == "1.5.0.dev20250404165440"
@@ -29,7 +29,6 @@ def circuit_to_pdf_using_qcircuit_via_tex(
29
29
  qcircuit_kwargs=None,
30
30
  clean_ext=('dvi', 'ps'),
31
31
  documentclass='article',
32
- prepare_only=False,
33
32
  ):
34
33
  """Compiles the QCircuit-based latex diagram of the given circuit.
35
34
 
@@ -43,8 +42,6 @@ def circuit_to_pdf_using_qcircuit_via_tex(
43
42
  default, latexmk is used with the '-pdfps' flag, which produces
44
43
  intermediary dvi and ps files.
45
44
  documentclass: The documentclass of the latex file.
46
- prepare_only: If True, only prepare the document, do not generate PDF.
47
- Used only for testing.
48
45
 
49
46
  Raises:
50
47
  OSError, IOError: If cleanup fails.
@@ -61,11 +58,10 @@ def circuit_to_pdf_using_qcircuit_via_tex(
61
58
  doc.packages.append(Package('qcircuit'))
62
59
  doc.preamble.append(Package('inputenc', options=['utf8']))
63
60
  doc.append(NoEscape(tex))
64
- if not prepare_only: # pragma: nocover
65
- doc.generate_pdf(filepath, **pdf_kwargs)
66
- for ext in clean_ext:
67
- try:
68
- os.remove(filepath + '.' + ext)
69
- except (OSError, IOError) as e:
70
- if e.errno != errno.ENOENT:
71
- raise
61
+ doc.generate_pdf(filepath, **pdf_kwargs)
62
+ for ext in clean_ext:
63
+ try:
64
+ os.remove(filepath + '.' + ext)
65
+ except (OSError, IOError) as e:
66
+ if e.errno != errno.ENOENT:
67
+ raise # pragma: nocover
@@ -12,10 +12,18 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+ from unittest import mock
16
+
17
+ import pylatex
18
+
15
19
  import cirq
16
20
  import cirq.contrib.qcircuit.qcircuit_pdf as qcircuit_pdf
17
21
 
18
22
 
19
- def test_qcircuit_pdf_prepare_only():
23
+ @mock.patch.object(pylatex.Document, "generate_pdf")
24
+ def test_qcircuit_pdf(mock_generate_pdf):
20
25
  circuit = cirq.Circuit(cirq.X(cirq.q(0)), cirq.CZ(cirq.q(0), cirq.q(1)))
21
- qcircuit_pdf.circuit_to_pdf_using_qcircuit_via_tex(circuit, "/tmp/test_file", prepare_only=True)
26
+ qcircuit_pdf.circuit_to_pdf_using_qcircuit_via_tex(circuit, "/tmp/test_file")
27
+ mock_generate_pdf.assert_called_once_with(
28
+ "/tmp/test_file", compiler="latexmk", compiler_args=["-pdfps"]
29
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cirq-core
3
- Version: 1.5.0.dev20250404021339
3
+ Version: 1.5.0.dev20250404165440
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=0m3sYIyxRNv9jvAo6rzJ-cnbpny3KGnAByrbU7bApgQ,34720
4
4
  cirq/_doc.py,sha256=yDyWUD_2JDS0gShfGRb-rdqRt9-WeL7DhkqX7np0Nko,2879
5
5
  cirq/_import.py,sha256=cfocxtT1BJ4HkfZ-VO8YyIhPP-xfqHDkLrzz6eeO5U0,8421
6
6
  cirq/_import_test.py,sha256=6K_v0riZJXOXUphHNkGA8MY-JcmGlezFaGmvrNhm3OQ,1015
7
- cirq/_version.py,sha256=tJqrXyCijjlfc105MbHDLiK4zbOa_uLQ_0LSBMOYxzk,1206
8
- cirq/_version_test.py,sha256=dY_9lpuzH3mNn9CoDRaOZx8oO79-7aWE3WD1CAZi5wI,147
7
+ cirq/_version.py,sha256=DRg3zrZZPYJdddB7z5fGTLCkVKwRMTkHLA5kdv-KzVM,1206
8
+ cirq/_version_test.py,sha256=40PYoj19yB2JssAQ8tjzn8Km0XSbRQ1NavIeL8KSrtE,147
9
9
  cirq/conftest.py,sha256=X7yLFL8GLhg2CjPw0hp5e_dGASfvHx1-QT03aUbhKJw,1168
10
10
  cirq/json_resolver_cache.py,sha256=YVamU72nCUT5dG0bhAvRKVX5lXcZMNTwP3H36v-cYag,13615
11
11
  cirq/py.typed,sha256=VFSlmh_lNwnaXzwY-ZuW-C2Ws5PkuDoVgBdNCs0jXJE,63
@@ -116,8 +116,8 @@ cirq/contrib/qcircuit/__init__.py,sha256=6-pIZQUK3LlPVGiPFI7HJTl2_O1P-Rts0MsdDgQ
116
116
  cirq/contrib/qcircuit/qcircuit_diagram.py,sha256=pwaqM9CERfePRxH6Xx3PtMLVIcN1Z375DYfAhpkDVAs,2780
117
117
  cirq/contrib/qcircuit/qcircuit_diagram_info.py,sha256=T1-FVcVgVtHG524MrhheqQ-GfiYY-tvKP3wH5ODcWl8,4560
118
118
  cirq/contrib/qcircuit/qcircuit_diagram_info_test.py,sha256=2CEJ3LCA-kaBeZOAc-2RRG5wEIdQLQVTqBpQ7lV2MWI,2393
119
- cirq/contrib/qcircuit/qcircuit_pdf.py,sha256=VjE0vJOGtfR9gIFUNeOPBg9gJCCnLrgNpAg2v65_sVM,2603
120
- cirq/contrib/qcircuit/qcircuit_pdf_test.py,sha256=ICKNgx-sxj9TQxuixhYX6n7MJ4a0YI1D_CqyHOMkvH0,873
119
+ cirq/contrib/qcircuit/qcircuit_pdf.py,sha256=LwXyz5_Amz0RCE4gQKmPgVp6HLD89htEvawqhuKuY-E,2412
120
+ cirq/contrib/qcircuit/qcircuit_pdf_test.py,sha256=rpb146aadlvEIHPXPyZqRlSDte2ldlKuanKryJU3cnk,1078
121
121
  cirq/contrib/qcircuit/qcircuit_test.py,sha256=g6lbhtkq85hKAwp1-dcU73LpAt0_RcmPKMApxd6X_6E,6041
122
122
  cirq/contrib/quantum_volume/__init__.py,sha256=RF_nbmm9s9A8sLhsnb7aZnuuoeHnsvlRNuoK8nBBW2w,1038
123
123
  cirq/contrib/quantum_volume/quantum_volume.py,sha256=x1nmPFHlp1ZAQC41aYZsHzvBvTRzNZ0azXb-a62ylsQ,19389
@@ -1209,8 +1209,8 @@ cirq/work/sampler.py,sha256=sW0RhIelGABAKbqTM58shwyyCPgf86JIv9IGdJe__js,19186
1209
1209
  cirq/work/sampler_test.py,sha256=mdk1J-WrvbPUYhY41VhWf9_te4DnXr_XMPcugWwc4-I,13281
1210
1210
  cirq/work/zeros_sampler.py,sha256=8_Ne6dBkDANtTZuql7Eb0Qg_E_P3-_gu-ybFzxTbKAQ,2356
1211
1211
  cirq/work/zeros_sampler_test.py,sha256=JIkpBBFPJe5Ba4142vzogyWyboG1Q1ZAm0UVGgOoZn8,3279
1212
- cirq_core-1.5.0.dev20250404021339.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1213
- cirq_core-1.5.0.dev20250404021339.dist-info/METADATA,sha256=n3JnYEY14pICdHhkQtkld9UKit8tns-ikYonB5NaIJk,4584
1214
- cirq_core-1.5.0.dev20250404021339.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
1215
- cirq_core-1.5.0.dev20250404021339.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1216
- cirq_core-1.5.0.dev20250404021339.dist-info/RECORD,,
1212
+ cirq_core-1.5.0.dev20250404165440.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
1213
+ cirq_core-1.5.0.dev20250404165440.dist-info/METADATA,sha256=96k4S-RvxMkoCvQpmvrL79J9lOC7gKloMlx8cw4DxnQ,4584
1214
+ cirq_core-1.5.0.dev20250404165440.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
1215
+ cirq_core-1.5.0.dev20250404165440.dist-info/top_level.txt,sha256=Sz9iOxHU0IEMLSFGwiwOCaN2e9K-jFbBbtpPN1hB73g,5
1216
+ cirq_core-1.5.0.dev20250404165440.dist-info/RECORD,,