qc-parallelizer 2.0.0__tar.gz → 2.1.0__tar.gz

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.
Files changed (54) hide show
  1. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/.pre-commit-config.yaml +2 -2
  2. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/PKG-INFO +2 -1
  3. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/README.md +27 -0
  4. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/notebooks/README.md +6 -0
  5. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/notebooks/circuit-packers.ipynb +3 -3
  6. qc_parallelizer-2.1.0/notebooks/parallel-circuits-introduction.ipynb +889 -0
  7. qc_parallelizer-2.1.0/notebooks/pennylane.ipynb +500 -0
  8. qc_parallelizer-2.1.0/notebooks/ring-packing.ipynb +131 -0
  9. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/pyproject.toml +2 -2
  10. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/src/qc_parallelizer/backends/manager.py +58 -28
  11. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/src/qc_parallelizer/interfaces/backend.py +27 -13
  12. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/src/qc_parallelizer/interfaces/circuit.py +11 -0
  13. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/src/qc_parallelizer/interfaces/conversions.py +97 -41
  14. qc_parallelizer-2.1.0/src/qc_parallelizer/interfaces/pennylane.py +156 -0
  15. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/src/qc_parallelizer/jobs/job.py +120 -121
  16. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/src/qc_parallelizer/packers/vf2.py +29 -14
  17. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/src/qc_parallelizer/parallelizer.py +112 -4
  18. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/src/qc_parallelizer/util/logging.py +73 -19
  19. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/src/qc_parallelizer/util/translation.py +28 -4
  20. qc_parallelizer-2.1.0/src/qc_parallelizer/util/visualization.py +338 -0
  21. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/src/qc_parallelizer.egg-info/PKG-INFO +2 -1
  22. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/src/qc_parallelizer.egg-info/SOURCES.txt +3 -0
  23. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/src/qc_parallelizer.egg-info/requires.txt +1 -0
  24. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/tests/test_parallelizer.py +1 -3
  25. qc_parallelizer-2.0.0/notebooks/parallel-circuits-introduction.ipynb +0 -843
  26. qc_parallelizer-2.0.0/notebooks/ring-packing.ipynb +0 -130
  27. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/.github/workflows/publish.yml +0 -0
  28. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/.gitignore +0 -0
  29. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/LICENSE +0 -0
  30. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/README.pypi.md +0 -0
  31. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/notebooks/circuit-layouts.ipynb +0 -0
  32. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/notebooks/helpers.py +0 -0
  33. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/notebooks/parallelizer-v1.drawio.png +0 -0
  34. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/notebooks/parallelizer-v2.drawio.png +0 -0
  35. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/setup.cfg +0 -0
  36. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/src/qc_parallelizer/__init__.py +0 -0
  37. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/src/qc_parallelizer/backends/__init__.py +0 -0
  38. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/src/qc_parallelizer/backends/circuitbin.py +0 -0
  39. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/src/qc_parallelizer/base.py +0 -0
  40. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/src/qc_parallelizer/interfaces/__init__.py +0 -0
  41. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/src/qc_parallelizer/jobs/__init__.py +0 -0
  42. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/src/qc_parallelizer/packers/__init__.py +0 -0
  43. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/src/qc_parallelizer/packers/base.py +0 -0
  44. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/src/qc_parallelizer/packers/smt.py +0 -0
  45. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/src/qc_parallelizer/util/__init__.py +0 -0
  46. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/src/qc_parallelizer/util/layouts.py +0 -0
  47. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/src/qc_parallelizer/util/typing.py +0 -0
  48. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/src/qc_parallelizer.egg-info/dependency_links.txt +0 -0
  49. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/src/qc_parallelizer.egg-info/top_level.txt +0 -0
  50. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/tests/__init__.py +0 -0
  51. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/tests/benchmark_parallelizer.py +0 -0
  52. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/tests/test_extensions.py +0 -0
  53. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/tests/test_util.py +0 -0
  54. {qc_parallelizer-2.0.0 → qc_parallelizer-2.1.0}/tests/utils.py +0 -0
@@ -12,7 +12,7 @@ repos:
12
12
  rev: v0.5.2
13
13
  hooks:
14
14
  - id: ruff
15
- args: [ --fix ]
15
+ args: [ --fix, --show-fixes ]
16
16
  types_or: [ python, pyi ]
17
17
  - id: ruff-format
18
18
  types_or: [ python, pyi ]
@@ -26,7 +26,7 @@ repos:
26
26
  rev: v3.16.0
27
27
  hooks:
28
28
  - id: pyupgrade
29
- args: [ --py310-plus ]
29
+ args: [ --py311-plus ]
30
30
 
31
31
  - repo: https://github.com/kynan/nbstripout
32
32
  rev: 0.8.1
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: qc-parallelizer
3
- Version: 2.0.0
3
+ Version: 2.1.0
4
4
  Summary: A module for optimally combining and distributing quantum circuits
5
5
  Author-email: Henri Ahola <firstname.lastname@vtt.fi>
6
6
  License-Expression: MIT
@@ -22,6 +22,7 @@ Requires-Dist: ipykernel; extra == "notebooks"
22
22
  Requires-Dist: matplotlib; extra == "notebooks"
23
23
  Requires-Dist: pylatexenc; extra == "notebooks"
24
24
  Requires-Dist: ipywidgets; extra == "notebooks"
25
+ Requires-Dist: pennylane; extra == "notebooks"
25
26
  Provides-Extra: visualization
26
27
  Requires-Dist: matplotlib; extra == "visualization"
27
28
  Requires-Dist: pylatexenc; extra == "visualization"
@@ -87,6 +87,9 @@ Result(
87
87
  )
88
88
  ```
89
89
 
90
+ Likewise, the parallelized backend can be supplied to PennyLane with `.as_pennylane_device`. See
91
+ [the PennyLane demo notebook](./notebooks/pennylane.ipynb) for an example.
92
+
90
93
  ## Development setup
91
94
 
92
95
  For the following commands, a virtual environment or equivalent isolation is recommended. This can
@@ -111,6 +114,30 @@ pip install .[tests]
111
114
  pip install .[notebooks]
112
115
  ```
113
116
 
117
+ ### Logging
118
+
119
+ For debugging, it can be extremely useful to enable logging. The project uses an internal logging library with a global
120
+ configurable log level. You can enable everything with
121
+ ```py
122
+ from qc_parallelizer.util import Log
123
+ Log.set_level("debug")
124
+ ```
125
+ or use the other levels (`"info"`, `"warn"`, `"fail"`) for less verbose logging. By default, it writes nicely formatted
126
+ and coloured output to stderr, but you can configure it with these two class attributes:
127
+ ```py
128
+ Log.color: bool # Enables color, True by default, but this can mess with some environments
129
+ Log.force_builtin: bool # Forwards everything to Python's logging module, False by default
130
+ ```
131
+ The log lines are interpreted as follows:
132
+ ```
133
+ 2026-06-03 11:28:14.488510 | [T0]~~~> vf2.py:70 | DBUG | VF2++ generator created with `id_order` = False.
134
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^ ^^^^^^ ^^ ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
135
+ `--> Timestamp \ \ \ `-> Line number `-> Log level `-> Message
136
+ \ \ `-> Source file
137
+ \ `-> Relative stack depth
138
+ `-> Thread number (assigned T0, T1, T2, ... in order of appearance)
139
+ ```
140
+
114
141
  ## Testing
115
142
 
116
143
  Running all tests is as simple as installing the required dependencies (see above) and running
@@ -21,6 +21,12 @@ This folder contains example notebooks for demonstration and documentation purpo
21
21
  A list and documentation of circuit packers. Packers control the physical placement of circuits,
22
22
  considering the backend's topology and positioning relative to other circuits.
23
23
 
24
+ ## Application-specific
25
+
26
+ - **[PennyLane](./pennylane.ipynb)**
27
+
28
+ A simple demonstration of computing expectation values in parallel with PennyLane.
29
+
24
30
  ## Other examples
25
31
 
26
32
  - **[Ring packing](./ring-packing.ipynb)**