qadence 1.6.3__py3-none-any.whl → 1.7.1__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.
Files changed (39) hide show
  1. qadence/__init__.py +2 -2
  2. qadence/backends/api.py +47 -60
  3. qadence/backends/gpsr.py +1 -0
  4. qadence/backends/pyqtorch/backend.py +1 -2
  5. qadence/backends/pyqtorch/config.py +5 -0
  6. qadence/backends/pyqtorch/convert_ops.py +83 -10
  7. qadence/backends/utils.py +62 -7
  8. qadence/blocks/abstract.py +7 -0
  9. qadence/blocks/embedding.py +17 -12
  10. qadence/blocks/matrix.py +1 -1
  11. qadence/blocks/primitive.py +1 -1
  12. qadence/constructors/__init__.py +2 -0
  13. qadence/constructors/hamiltonians.py +38 -1
  14. qadence/draw/utils.py +1 -1
  15. qadence/execution.py +11 -3
  16. qadence/extensions.py +62 -36
  17. qadence/ml_tools/__init__.py +11 -3
  18. qadence/ml_tools/config.py +283 -2
  19. qadence/ml_tools/constructors.py +796 -0
  20. qadence/ml_tools/models.py +373 -251
  21. qadence/ml_tools/printing.py +5 -2
  22. qadence/ml_tools/saveload.py +42 -18
  23. qadence/ml_tools/train_grad.py +48 -14
  24. qadence/ml_tools/utils.py +2 -8
  25. qadence/{models/quantum_model.py → model.py} +178 -10
  26. qadence/operations/ham_evo.py +10 -0
  27. qadence/overlap.py +1 -1
  28. qadence/parameters.py +10 -1
  29. qadence/register.py +98 -22
  30. qadence/serialization.py +6 -6
  31. qadence/types.py +44 -0
  32. qadence/utils.py +2 -8
  33. {qadence-1.6.3.dist-info → qadence-1.7.1.dist-info}/METADATA +7 -6
  34. {qadence-1.6.3.dist-info → qadence-1.7.1.dist-info}/RECORD +36 -38
  35. {qadence-1.6.3.dist-info → qadence-1.7.1.dist-info}/WHEEL +1 -1
  36. qadence/finitediff.py +0 -47
  37. qadence/models/__init__.py +0 -7
  38. qadence/models/qnn.py +0 -265
  39. {qadence-1.6.3.dist-info → qadence-1.7.1.dist-info}/licenses/LICENSE +0 -0
qadence/parameters.py CHANGED
@@ -16,7 +16,7 @@ from torch import Tensor, heaviside, no_grad, rand, tensor
16
16
  from qadence.types import DifferentiableExpression, Engine, TNumber
17
17
 
18
18
  # Modules to be automatically added to the qadence namespace
19
- __all__ = ["FeatureParameter", "Parameter", "VariationalParameter", "ParamMap"]
19
+ __all__ = ["FeatureParameter", "Parameter", "VariationalParameter", "ParamMap", "TimeParameter"]
20
20
 
21
21
  logger = getLogger(__name__)
22
22
 
@@ -61,6 +61,8 @@ class Parameter(Symbol):
61
61
  value: TNumber
62
62
  """(Initial) value of the parameter."""
63
63
 
64
+ is_time: bool
65
+
64
66
  def __new__(
65
67
  cls, name: str | TNumber | Tensor | Basic | Parameter, **assumptions: Any
66
68
  ) -> Parameter | Basic | Expr | Array:
@@ -111,6 +113,7 @@ class Parameter(Symbol):
111
113
  p.name = name.name
112
114
  p.trainable = name.trainable
113
115
  p.value = name.value
116
+ p.is_time = name.is_time
114
117
  return p
115
118
  elif isinstance(name, (Basic, Expr)):
116
119
  if name.is_number:
@@ -120,6 +123,7 @@ class Parameter(Symbol):
120
123
  p = super().__new__(cls, name, **assumptions)
121
124
  p.trainable = assumptions.get("trainable", True)
122
125
  p.value = assumptions.get("value", None)
126
+ p.is_time = assumptions.get("is_time", False)
123
127
  if p.value is None:
124
128
  p.value = rand(1).item()
125
129
  return p
@@ -178,6 +182,11 @@ def VariationalParameter(name: str, **kwargs: Any) -> Parameter:
178
182
  return Parameter(name, trainable=True, **kwargs)
179
183
 
180
184
 
185
+ def TimeParameter(name: str) -> Parameter:
186
+ """Shorthand for `Parameter(..., trainable=False, is_time=True)`."""
187
+ return Parameter(name, trainable=False, is_time=True)
188
+
189
+
181
190
  def extract_original_param_entry(
182
191
  param: Expr,
183
192
  ) -> TNumber | Tensor | Expr:
qadence/register.py CHANGED
@@ -38,28 +38,31 @@ class Register:
38
38
  device_specs: RydbergDevice = DEFAULT_DEVICE,
39
39
  ):
40
40
  """
41
- A 2D register of qubits which includes their coordinates.
41
+ A register of qubits including 2D coordinates.
42
42
 
43
- It is needed for e.g. analog computing.
44
- The coordinates are ignored in backends that don't need them. The easiest
45
- way to construct a register is via its classmethods like `Register.triangular_lattice`.
43
+ Instantiating the Register class directly is only recommended for building custom registers.
44
+ For most uses where a predefined lattice is desired it is recommended to use the various
45
+ class methods available, e.g. `Register.triangular_lattice`.
46
46
 
47
47
  Arguments:
48
- support: A graph or number of qubits. Nodes can include a `"pos"` attribute
48
+ support: A NetworkX graph or number of qubits. Nodes can include a `"pos"` attribute
49
49
  such that e.g.: `graph.nodes = {0: {"pos": (2,3)}, 1: {"pos": (0,0)}, ...}` which
50
- will be used in backends that need qubit coordinates.
51
- See the classmethods for simple construction of some predefined lattices if you
52
- don't want to build a graph manually.
53
- If you pass an integer the resulting register is the same as
54
- `Register.all_to_all(n_qubits)`.
55
- spacing: Value set as the distance between the two closest qubits.
50
+ will be used in backends that need qubit coordinates. Passing a number of qubits
51
+ calls `Register.all_to_all(n_qubits)`.
52
+ spacing: Value set as the distance between the two closest qubits. The spacing
53
+ argument is also available for all the class method constructors.
56
54
 
57
55
  Examples:
58
- ```python exec="on" source="material-block" result="json"
56
+ ```python exec="on" source="material-block"
59
57
  from qadence import Register
60
58
 
61
- reg = Register.honeycomb_lattice(2,3)
62
- reg.draw()
59
+ reg_all = Register.all_to_all(n_qubits = 4)
60
+ reg_line = Register.line(n_qubits = 4)
61
+ reg_circle = Register.circle(n_qubits = 4)
62
+ reg_squre = Register.square(qubits_side = 2)
63
+ reg_rect = Register.rectangular_lattice(qubits_row = 2, qubits_col = 2)
64
+ reg_triang = Register.triangular_lattice(n_cells_row = 2, n_cells_col = 2)
65
+ reg_honey = Register.honeycomb_lattice(n_cells_row = 2, n_cells_col = 2)
63
66
  ```
64
67
  """
65
68
  if device_specs is not None and not isinstance(device_specs, RydbergDevice):
@@ -74,6 +77,7 @@ class Register:
74
77
 
75
78
  @property
76
79
  def n_qubits(self) -> int:
80
+ """Total number of qubits in the register."""
77
81
  return len(self.graph)
78
82
 
79
83
  @classmethod
@@ -84,6 +88,15 @@ class Register:
84
88
  spacing: float | None = None,
85
89
  device_specs: RydbergDevice = DEFAULT_DEVICE,
86
90
  ) -> Register:
91
+ """
92
+ Build a register from a list of qubit coordinates.
93
+
94
+ Each node is added to the underlying
95
+ graph with the respective coordinates, but the edges are left empty.
96
+
97
+ Arguments:
98
+ coords: List of qubit coordinate tuples.
99
+ """
87
100
  graph = nx.Graph()
88
101
  for i, pos in enumerate(coords):
89
102
  graph.add_node(i, pos=pos)
@@ -96,6 +109,12 @@ class Register:
96
109
  spacing: float = 1.0,
97
110
  device_specs: RydbergDevice = DEFAULT_DEVICE,
98
111
  ) -> Register:
112
+ """
113
+ Build a line register.
114
+
115
+ Arguments:
116
+ n_qubits: Total number of qubits.
117
+ """
99
118
  return cls(line_graph(n_qubits), spacing, device_specs)
100
119
 
101
120
  @classmethod
@@ -105,6 +124,12 @@ class Register:
105
124
  spacing: float = 1.0,
106
125
  device_specs: RydbergDevice = DEFAULT_DEVICE,
107
126
  ) -> Register:
127
+ """
128
+ Build a circle register.
129
+
130
+ Arguments:
131
+ n_qubits: Total number of qubits.
132
+ """
108
133
  graph = nx.grid_2d_graph(n_qubits, 1, periodic=True)
109
134
  graph = nx.relabel_nodes(graph, {(i, 0): i for i in range(n_qubits)})
110
135
  coords = nx.circular_layout(graph)
@@ -119,6 +144,12 @@ class Register:
119
144
  spacing: float = 1.0,
120
145
  device_specs: RydbergDevice = DEFAULT_DEVICE,
121
146
  ) -> Register:
147
+ """
148
+ Build a square register.
149
+
150
+ Arguments:
151
+ qubits_side: Number of qubits on one side of the square.
152
+ """
122
153
  n_points = 4 * (qubits_side - 1)
123
154
 
124
155
  def gen_points() -> np.ndarray:
@@ -152,6 +183,15 @@ class Register:
152
183
  spacing: float = 1.0,
153
184
  device_specs: RydbergDevice = DEFAULT_DEVICE,
154
185
  ) -> Register:
186
+ """
187
+ Build a register with an all-to-all connectivity graph.
188
+
189
+ The graph is projected
190
+ onto a 2D space and the qubit coordinates are set using a spring layout algorithm.
191
+
192
+ Arguments:
193
+ n_qubits: Total number of qubits.
194
+ """
155
195
  return cls(alltoall_graph(n_qubits), spacing, device_specs)
156
196
 
157
197
  @classmethod
@@ -166,6 +206,13 @@ class Register:
166
206
  values = {i: {"pos": node} for (i, node) in enumerate(graph.nodes)}
167
207
  graph = nx.relabel_nodes(graph, {(i, j): k for k, (i, j) in enumerate(graph.nodes)})
168
208
  nx.set_node_attributes(graph, values)
209
+ """
210
+ Build a rectangular lattice register.
211
+
212
+ Arguments:
213
+ qubits_row: Number of qubits in each row.
214
+ qubits_col: Number of qubits in each column.
215
+ """
169
216
  return cls(graph, spacing, device_specs)
170
217
 
171
218
  @classmethod
@@ -176,6 +223,15 @@ class Register:
176
223
  spacing: float = 1.0,
177
224
  device_specs: RydbergDevice = DEFAULT_DEVICE,
178
225
  ) -> Register:
226
+ """
227
+ Build a triangular lattice register.
228
+
229
+ Each cell is a triangle made up of three qubits.
230
+
231
+ Arguments:
232
+ n_cells_row: Number of cells in each row.
233
+ n_cells_col: Number of cells in each column.
234
+ """
179
235
  return cls(triangular_lattice_graph(n_cells_row, n_cells_col), spacing, device_specs)
180
236
 
181
237
  @classmethod
@@ -186,6 +242,15 @@ class Register:
186
242
  spacing: float = 1.0,
187
243
  device_specs: RydbergDevice = DEFAULT_DEVICE,
188
244
  ) -> Register:
245
+ """
246
+ Build a honeycomb lattice register.
247
+
248
+ Each cell is an hexagon made up of six qubits.
249
+
250
+ Arguments:
251
+ n_cells_row: Number of cells in each row.
252
+ n_cells_col: Number of cells in each column.
253
+ """
189
254
  graph = nx.hexagonal_lattice_graph(n_cells_row, n_cells_col)
190
255
  graph = nx.relabel_nodes(graph, {(i, j): k for k, (i, j) in enumerate(graph.nodes)})
191
256
  return cls(graph, spacing, device_specs)
@@ -195,6 +260,7 @@ class Register:
195
260
  return getattr(cls, topology)(*args, **kwargs) # type: ignore[no-any-return]
196
261
 
197
262
  def draw(self, show: bool = True) -> None:
263
+ """Draw the underlying NetworkX graph representing the register."""
198
264
  coords = {i: n["pos"] for i, n in self.graph.nodes.items()}
199
265
  nx.draw(self.graph, with_labels=True, pos=coords)
200
266
  if show:
@@ -205,41 +271,59 @@ class Register:
205
271
 
206
272
  @property
207
273
  def nodes(self) -> NodeView:
274
+ """Return the NodeView of the underlying NetworkX graph."""
208
275
  return self.graph.nodes
209
276
 
210
277
  @property
211
278
  def edges(self) -> EdgeView:
279
+ """Return the EdgeView of the underlying NetworkX graph."""
212
280
  return self.graph.edges
213
281
 
214
282
  @property
215
283
  def support(self) -> set:
284
+ """Return the set of qubits in the register."""
216
285
  return set(self.nodes)
217
286
 
218
287
  @property
219
288
  def coords(self) -> dict:
289
+ """Return the dictionary of qubit coordinates."""
220
290
  return {i: tuple(node.get("pos", ())) for i, node in self.nodes.items()}
221
291
 
222
292
  @property
223
293
  def all_node_pairs(self) -> EdgeView:
294
+ """Return a list of all possible qubit pairs in the register."""
224
295
  return list(filter(lambda x: x[0] < x[1], product(self.support, self.support)))
225
296
 
226
297
  @property
227
298
  def distances(self) -> dict:
299
+ """Return a dictionary of distances for all qubit pairs in the register."""
228
300
  coords = self.coords
229
301
  return {edge: dist(coords[edge[0]], coords[edge[1]]) for edge in self.all_node_pairs}
230
302
 
231
303
  @property
232
304
  def edge_distances(self) -> dict:
305
+ """
306
+ Return a dictionary of distances for the qubit pairs that are.
307
+
308
+ connected by an edge in the underlying NetworkX graph.
309
+ """
233
310
  coords = self.coords
234
311
  return {edge: dist(coords[edge[0]], coords[edge[1]]) for edge in self.edges}
235
312
 
236
313
  @property
237
314
  def min_distance(self) -> float:
315
+ """Return the minimum distance between two qubts in the register."""
238
316
  distances = self.distances
239
317
  value: float = min(self.distances.values()) if len(distances) > 0 else 0.0
240
318
  return value
241
319
 
242
320
  def rescale_coords(self, scaling: float) -> Register:
321
+ """
322
+ Rescale the coordinates of all qubits in the register.
323
+
324
+ Arguments:
325
+ scaling: Scaling value.
326
+ """
243
327
  g = deepcopy(self.graph)
244
328
  _scale_node_positions(g, min_distance=1.0, spacing=scaling)
245
329
  return Register(g, spacing=None, device_specs=self.device_specs)
@@ -272,14 +356,6 @@ class Register:
272
356
 
273
357
 
274
358
  def line_graph(n_qubits: int) -> nx.Graph:
275
- """Create graph representing linear lattice.
276
-
277
- Args:
278
- n_qubits (int): number of nodes in the graph
279
-
280
- Returns:
281
- graph instance
282
- """
283
359
  graph = nx.Graph()
284
360
  for i in range(n_qubits):
285
361
  graph.add_node(i, pos=(i, 0.0))
qadence/serialization.py CHANGED
@@ -17,11 +17,10 @@ from arpeggio.cleanpeg import ParserPEG
17
17
  from sympy import *
18
18
  from sympy import core, srepr
19
19
 
20
- from qadence import QuantumCircuit, operations, parameters
20
+ from qadence import QNN, QuantumCircuit, QuantumModel, operations, parameters
21
21
  from qadence import blocks as qadenceblocks
22
22
  from qadence.blocks import AbstractBlock
23
23
  from qadence.blocks.utils import tag
24
- from qadence.models import QuantumModel
25
24
  from qadence.parameters import Parameter
26
25
  from qadence.register import Register
27
26
  from qadence.types import SerializationFormat
@@ -48,6 +47,7 @@ SUPPORTED_OBJECTS = [
48
47
  AbstractBlock,
49
48
  QuantumCircuit,
50
49
  QuantumModel,
50
+ QNN,
51
51
  Register,
52
52
  core.Basic,
53
53
  torch.nn.Module,
@@ -374,12 +374,12 @@ def save(
374
374
  Same as serialize/deserialize but for storing/loading files.
375
375
 
376
376
  Supported types:
377
- AbstractBlock | QuantumCircuit | QuantumModel | TransformedModule | Register | torch.nn.Module
377
+ AbstractBlock | QuantumCircuit | QuantumModel | Register | torch.nn.Module
378
378
  Saves a qadence object to a json/.pt.
379
379
 
380
380
  Arguments:
381
381
  obj (AbstractBlock | QuantumCircuit | QuantumModel | Register):
382
- Either AbstractBlock, QuantumCircuit, QuantumModel, TransformedModule, Register.
382
+ Either AbstractBlock, QuantumCircuit, QuantumModel, Register.
383
383
  file_name (str): The name of the file.
384
384
  format (str): The type of file to save.
385
385
  Returns:
@@ -431,14 +431,14 @@ def load(file_path: str | Path, map_location: str = "cpu") -> SUPPORTED_TYPES:
431
431
  """
432
432
  Same as serialize/deserialize but for storing/loading files.
433
433
 
434
- Supported types: AbstractBlock | QuantumCircuit | QuantumModel | TransformedModule | Register
434
+ Supported types: AbstractBlock | QuantumCircuit | QuantumModel | Register
435
435
  Loads a .json or .pt file to one of the supported types.
436
436
 
437
437
  Arguments:
438
438
  file_path (str): The name of the file.
439
439
  map_location (str): In case of a .pt file, on which device to load the object (cpu,cuda).
440
440
  Returns:
441
- A object of type AbstractBlock, QuantumCircuit, QuantumModel, TransformedModule, Register.
441
+ A object of type AbstractBlock, QuantumCircuit, QuantumModel, Register.
442
442
 
443
443
  Examples:
444
444
  ```python exec="on" source="material-block" result="json"
qadence/types.py CHANGED
@@ -7,6 +7,7 @@ from typing import Callable, Iterable, Tuple, Union
7
7
  import numpy as np
8
8
  import sympy
9
9
  from numpy.typing import ArrayLike
10
+ from pyqtorch.utils import SolverType
10
11
  from torch import Tensor, pi
11
12
 
12
13
  TNumber = Union[int, float, complex, np.int64, np.float64]
@@ -27,6 +28,7 @@ PI = pi
27
28
 
28
29
  # Modules to be automatically added to the qadence namespace
29
30
  __all__ = [
31
+ "AnsatzType",
30
32
  "Endianness",
31
33
  "Strategy",
32
34
  "ResultType",
@@ -34,6 +36,7 @@ __all__ = [
34
36
  "BackendName",
35
37
  "StateGeneratorType",
36
38
  "LTSOrder",
39
+ "MultivariateStrategy",
37
40
  "ReuploadScaling",
38
41
  "BasisSet",
39
42
  "TensorType",
@@ -45,6 +48,7 @@ __all__ = [
45
48
  "AlgoHEvo",
46
49
  "SerializationFormat",
47
50
  "PI",
51
+ "SolverType",
48
52
  ] # type: ignore
49
53
 
50
54
 
@@ -70,6 +74,8 @@ class Strategy(StrEnum):
70
74
  """Use the step-wise digital-analog QC paradigm."""
71
75
  BDAQC = "bDAQC"
72
76
  """Use the banged digital-analog QC paradigm."""
77
+ RYDBERG = "Rydberg"
78
+ """Use the Rydberg QC paradigm."""
73
79
 
74
80
 
75
81
  class Endianness(StrEnum):
@@ -145,6 +151,24 @@ class ReuploadScaling(StrEnum):
145
151
  """Exponentially increasing scaling."""
146
152
 
147
153
 
154
+ class MultivariateStrategy(StrEnum):
155
+ """Multivariate strategy for feature maps."""
156
+
157
+ PARALLEL = "parallel"
158
+ """Parallel strategy."""
159
+ SERIES = "SERIES"
160
+ """Serial strategy."""
161
+
162
+
163
+ class AnsatzType(StrEnum):
164
+ """Ansatz types for variational circuits."""
165
+
166
+ HEA = "hea"
167
+ """Hardware-efficient ansatz."""
168
+ IIA = "iia"
169
+ """Identity-Initialised Ansatz."""
170
+
171
+
148
172
  class _DiffMode(StrEnum):
149
173
  """Differentiation modes to choose from."""
150
174
 
@@ -401,3 +425,23 @@ class ReadOutOptimization(StrEnum):
401
425
 
402
426
  ParamDictType = dict[str, ArrayLike]
403
427
  DifferentiableExpression = Callable[..., ArrayLike]
428
+
429
+
430
+ class InputDiffMode(StrEnum):
431
+ """Derivative modes w.r.t inputs of UFAs."""
432
+
433
+ AD = "ad"
434
+ """Reverse automatic differentiation."""
435
+ FD = "fd"
436
+ """Central finite differencing."""
437
+
438
+
439
+ class ObservableTransform:
440
+ """Observable transformation type."""
441
+
442
+ SCALE = "scale"
443
+ """Use the given values as scale and shift."""
444
+ RANGE = "range"
445
+ """Use the given values as min and max."""
446
+ NONE = "none"
447
+ """No transformation."""
qadence/utils.py CHANGED
@@ -234,18 +234,12 @@ def is_qadence_shape(state: ArrayLike, n_qubits: int) -> bool:
234
234
  return state.shape[1] == 2**n_qubits # type: ignore[no-any-return]
235
235
 
236
236
 
237
- def infer_batchsize(param_values: dict[str, Tensor] = None) -> int:
238
- """Infer the batch_size through the length of the parameter tensors."""
239
- try:
240
- return max([len(tensor) for tensor in param_values.values()]) if param_values else 1
241
- except Exception:
242
- return 1
243
-
244
-
245
237
  def validate_values_and_state(
246
238
  state: ArrayLike | None, n_qubits: int, param_values: dict[str, Tensor] = None
247
239
  ) -> None:
248
240
  if state is not None:
241
+ from qadence.backends.utils import infer_batchsize
242
+
249
243
  if isinstance(state, Tensor):
250
244
  if state is not None:
251
245
  batch_size_state = (
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: qadence
3
- Version: 1.6.3
3
+ Version: 1.7.1
4
4
  Summary: Pasqal interface for circuit-based quantum computing SDKs
5
- Author-email: Aleksander Wennersteen <aleksander.wennersteen@pasqal.com>, Gert-Jan Both <gert-jan.both@pasqal.com>, Niklas Heim <niklas.heim@pasqal.com>, Mario Dagrada <mario.dagrada@pasqal.com>, Vincent Elfving <vincent.elfving@pasqal.com>, Dominik Seitz <dominik.seitz@pasqal.com>, Roland Guichard <roland.guichard@pasqal.com>, "Joao P. Moutinho" <joao.moutinho@pasqal.com>, Vytautas Abramavicius <vytautas.abramavicius@pasqal.com>, Gergana Velikova <gergana.velikova@pasqal.com>, Eduardo Maschio <eduardo.maschio@pasqal.com>
5
+ Author-email: Aleksander Wennersteen <aleksander.wennersteen@pasqal.com>, Gert-Jan Both <gert-jan.both@pasqal.com>, Niklas Heim <niklas.heim@pasqal.com>, Mario Dagrada <mario.dagrada@pasqal.com>, Vincent Elfving <vincent.elfving@pasqal.com>, Dominik Seitz <dominik.seitz@pasqal.com>, Roland Guichard <roland.guichard@pasqal.com>, "Joao P. Moutinho" <joao.moutinho@pasqal.com>, Vytautas Abramavicius <vytautas.abramavicius@pasqal.com>, Gergana Velikova <gergana.velikova@pasqal.com>, Eduardo Maschio <eduardo.maschio@pasqal.com>, Smit Chaudhary <smit.chaudhary@pasqal.com>, Ignacio Fernández Graña <ignacio.fernandez-grana@pasqal.com>, Charles Moussa <charles.moussa@pasqal.com>
6
6
  License: Apache 2.0
7
7
  License-File: LICENSE
8
8
  Classifier: License :: OSI Approved :: Apache Software License
@@ -22,10 +22,11 @@ Requires-Dist: matplotlib
22
22
  Requires-Dist: nevergrad
23
23
  Requires-Dist: numpy
24
24
  Requires-Dist: openfermion
25
- Requires-Dist: pyqtorch==1.2.1
25
+ Requires-Dist: pyqtorch==1.2.5
26
26
  Requires-Dist: pyyaml
27
27
  Requires-Dist: rich
28
28
  Requires-Dist: scipy
29
+ Requires-Dist: sympy<1.13
29
30
  Requires-Dist: sympytorch>=0.1.2
30
31
  Requires-Dist: tensorboard>=2.12.0
31
32
  Requires-Dist: torch
@@ -53,9 +54,9 @@ Requires-Dist: qadence-libs; extra == 'libs'
53
54
  Provides-Extra: protocols
54
55
  Requires-Dist: qadence-protocols; extra == 'protocols'
55
56
  Provides-Extra: pulser
56
- Requires-Dist: pasqal-cloud==0.10.1; extra == 'pulser'
57
- Requires-Dist: pulser-core==0.18.1; extra == 'pulser'
58
- Requires-Dist: pulser-simulation==0.18.1; extra == 'pulser'
57
+ Requires-Dist: pasqal-cloud==0.11.1; extra == 'pulser'
58
+ Requires-Dist: pulser-core==0.19.0; extra == 'pulser'
59
+ Requires-Dist: pulser-simulation==0.19.0; extra == 'pulser'
59
60
  Provides-Extra: visualization
60
61
  Requires-Dist: graphviz; extra == 'visualization'
61
62
  Description-Content-Type: text/markdown
@@ -1,25 +1,25 @@
1
- qadence/__init__.py,sha256=LY5QUBt19J4PNAXsDa8w-ClsAXyoAUi1lqzDgsGjemY,2640
1
+ qadence/__init__.py,sha256=0SFU1_XZ-3WlSU1rA4W1Y0edxpZLO_sNg-YnpjlD77w,2638
2
2
  qadence/backend.py,sha256=TTzWEHEyOg7EH02IBiDkhE-Uwtj0fSLNMvQ48qtAcOk,14401
3
3
  qadence/circuit.py,sha256=3lQdjj_srxgk6f5M3eh3kE-Qdov4FA9TZxZZb0E1_mI,6966
4
4
  qadence/decompose.py,sha256=C4LYia_GcC9Rx3QO0ZLWTI9dN63a8WTEAXO0ZVQWuiE,5221
5
5
  qadence/divergences.py,sha256=JhpELhWSnuDvQxa9hJp_DE3EQg2Ban-Ta0mHZ_fVrHg,1832
6
- qadence/execution.py,sha256=5_P5OSatiwEAu7aAkCLau5VcmtIZiC3VFIj5YYdwAbY,9287
7
- qadence/extensions.py,sha256=qly8STovIr_tB9yJSlIjkaYfKFY-1VLto-Zqq0RdLAw,4247
8
- qadence/finitediff.py,sha256=TijuaWUbX9VlbLyMYco6HkK9eCoRTVnKug4Ekd6mlTI,1592
6
+ qadence/execution.py,sha256=JNvN8RVxbbysm5CzS9fdp5LpyVaDpk84h-BkC-S0Wj8,9587
7
+ qadence/extensions.py,sha256=_RfP1572Ijb3ZinsRR8dI6DJXyLnrC4_H46COKaah2Q,5476
9
8
  qadence/libs.py,sha256=HetkKO8TCTlVCViQdVQJvxwBekrhd-y_iMox4UJMY1M,410
10
9
  qadence/log_config.yaml,sha256=WwSpxqMSXgPJ7wO_wh46UnFzXdgX9NVA4MbN3TcJFyE,485
11
10
  qadence/logger.py,sha256=Hb76pK3VyQjVjJb4_NqFlOJgjYJVa8t7DHJFlzOM86M,407
12
- qadence/overlap.py,sha256=VHEXfsqcn7aax1-f_iJ8Fe5Eoz4AcceQbwgqipifgzY,17104
13
- qadence/parameters.py,sha256=WdHCcLJ8tyRfBdaLAo89GwJboj6wLdfhdHdqPDLLAhM,12337
11
+ qadence/model.py,sha256=JEsEfA4KaIpUDqeQngefTKnyrEdAxih3HnEkWRSIAeM,19460
12
+ qadence/overlap.py,sha256=v3XP3g7BaMoTjR0GVTqg7IDtAfq_Njo1ZNTeyo8uYNA,17089
13
+ qadence/parameters.py,sha256=Oz30Sx-d8NLiiwo2FC-nWEHX6YCIZYOZwebNDA1HvmQ,12644
14
14
  qadence/protocols.py,sha256=bcYTxSjgMPV-a-D6yv90jCpnGik8myzaNpFv9z1gzJ0,442
15
15
  qadence/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  qadence/qubit_support.py,sha256=Nkn1Q01RVViTcggSIom7EFKdWpAuM4TMGwBZ5feCUxA,2120
17
- qadence/register.py,sha256=cBMzwZ7GWZ5ieuFt0bpproEI6a2ncNwfjj7ic379zyg,10276
17
+ qadence/register.py,sha256=mwmvS6PcTY0F9cIhTUXG3NT73FIagfMCwVqYa4DrQrk,13001
18
18
  qadence/serial_expr_grammar.peg,sha256=z5ytL7do9kO8o4h-V5GrsDuLdso0KsRcMuIYURFfmAY,328
19
- qadence/serialization.py,sha256=0UdcDQP2tJOtygVQI258G3MgnDiZJmBY4o15w0G-O0Y,15686
19
+ qadence/serialization.py,sha256=qEET6Gu9u2aSibPve3bJrqDzK2_gO3RPDJjt4ZY8GbE,15596
20
20
  qadence/states.py,sha256=5QIOBBYs8e2uLFiMa8iMYZ-MvWIFEqkZAjNYx0SyYPI,14843
21
- qadence/types.py,sha256=wsxZNik5d8xdw46Dp1xRHpVS1-mSM-kMl2J_W64UhgA,9732
22
- qadence/utils.py,sha256=mTDI54uXsFXrKKFshmXFzDdoaeLMLlqA1MR2G061TSc,10092
21
+ qadence/types.py,sha256=6Dw8Ibtn0ZKRVg5DcW3O5129LIwYT-LLT2V3XjxFQek,10729
22
+ qadence/utils.py,sha256=zb2j7wURfy8kazaS84r4t35vAeDpo4Tpm4HbmPH-kFA,9865
23
23
  qadence/analog/__init__.py,sha256=BCyS9R4KUjzUXN0Ax3b0eMo8ZAuSkGoJQVtZ4_pvAFs,279
24
24
  qadence/analog/addressing.py,sha256=fu5-xW9lquEbagApNp23S_ET1kl0iDtZUrIYSVNmw9s,6435
25
25
  qadence/analog/constants.py,sha256=B2phQoN1ASL8CwM-Dsa1rbraYwGwwPSeiB3HbVe-MPA,1243
@@ -27,10 +27,10 @@ qadence/analog/device.py,sha256=RmPXWxq77pJXzvV6CIVSUVxxy-oKd6SqoSnQESNLIqg,2412
27
27
  qadence/analog/hamiltonian_terms.py,sha256=9LKidqqEMJTTdXeaxkxP_otTmcv9i4yeJ-JKCLOCK3Y,3421
28
28
  qadence/analog/parse_analog.py,sha256=ppvMZtsKXOIkIehCgjbdmG9n232DIycSanyuyVth5Wg,4223
29
29
  qadence/backends/__init__.py,sha256=ibm7wmZxuIoMYAQxgAx0MsfLYWOVHNWgLwyS1HjMuuI,215
30
- qadence/backends/api.py,sha256=6PoK4ydhi2tj9w0ePMQl1G4kEFROoWe3lrkrtQwWxkc,3224
31
- qadence/backends/gpsr.py,sha256=GxK3hkdE-uUwZJokPalzLDaF8sO9MLTN9oRBZ2uKrEM,4749
30
+ qadence/backends/api.py,sha256=W9BWoo9G2otPEqXkxmgKlqQogBt8FxmLU7FRhAya30E,2756
31
+ qadence/backends/gpsr.py,sha256=qD5LqnPDRf_qlTnZ1JQ_6fhrhQ3VsGEZrf86izgSTTw,4784
32
32
  qadence/backends/jax_utils.py,sha256=VfKhqCKknHDWZO21UFipWH_Lkiq175Z5GkP49gWjbyw,5038
33
- qadence/backends/utils.py,sha256=hnV9AXztMvAPcO8mv9UhdGMbS9albiMQBxlYPgLrD68,6490
33
+ qadence/backends/utils.py,sha256=Z-NIDLjQJBM7dPt1DbOCqAjM-ErNn7xbPTKiTzlCSuk,8302
34
34
  qadence/backends/braket/__init__.py,sha256=eruyDZKMqkh1LE7eJ980vcrLJbia35uUX6krAP78clI,121
35
35
  qadence/backends/braket/backend.py,sha256=WX5FG4WsrtdnG0at2DvIY0n_AFm44t4g5OIJ1e8r6fQ,8752
36
36
  qadence/backends/braket/config.py,sha256=7cu22dmYdp48Fu760HPfxBHinaUnGmzx9MkE_EPhVN8,594
@@ -49,23 +49,23 @@ qadence/backends/pulser/devices.py,sha256=DermLZNfmCB3SqteKVW4uhg4jp6ya1G6ptnXbB
49
49
  qadence/backends/pulser/pulses.py,sha256=F4fExIRAhLPMtVg1bhNtDihUYHxu5RExGjovk8-CQIo,11884
50
50
  qadence/backends/pulser/waveforms.py,sha256=0uz95b7rUaUUtN0tuHBZmJ0H6UBmfHST_59ozwsRCzg,2227
51
51
  qadence/backends/pyqtorch/__init__.py,sha256=0OdVy6cq0oQggV48LO1WXdaZuSkDkz7OYNEPIkNAmfk,140
52
- qadence/backends/pyqtorch/backend.py,sha256=xAPJT--Lu_OW8GVeXc1weBFB5iEwJ6hihFGo8PRJXnk,9309
53
- qadence/backends/pyqtorch/config.py,sha256=hhea1dDAeee7uDE1fiCh4lJRS0EMSc3mmbXn92HBdyA,1898
54
- qadence/backends/pyqtorch/convert_ops.py,sha256=L2jeIFrRTzEwDbjbc-KEEKcS_UYsn97H0PwGcDMFDVw,11877
52
+ qadence/backends/pyqtorch/backend.py,sha256=5ChkSD3D5totCMxwbzC31yIeOBxw6QEM5CS6qnq1Jqw,9287
53
+ qadence/backends/pyqtorch/config.py,sha256=jK-if0OF6L_inP-oZhWI4-b8wcrOiK8-EVv3NYDOfBM,2056
54
+ qadence/backends/pyqtorch/convert_ops.py,sha256=8xw43wWETIuD2N-5g-EZVeUYYOMnTWuIePfqqpQ3Mbg,14897
55
55
  qadence/blocks/__init__.py,sha256=H6jEA_CptkE-eoB4UfSbUiDszbxxhZwECV_TgoZWXoU,960
56
- qadence/blocks/abstract.py,sha256=35RcVlNvD1BmBoJ8bbYJ3LrdU72wixt9ZmTbCtEwNus,11796
56
+ qadence/blocks/abstract.py,sha256=QFwKPagbTrn3V4c2DHpBd-QL_mVIUXfbvyBLUdD6zw4,12023
57
57
  qadence/blocks/analog.py,sha256=ymnnlSVoW1XL05ZvnnHCqRTHuOXIEY_7E9M0PNKJZy4,10812
58
58
  qadence/blocks/block_to_tensor.py,sha256=Sg7YGKUoPUUHKvyB8Khztrk7UYnV5SD451_3I00n84w,17367
59
59
  qadence/blocks/composite.py,sha256=z_lXRBVnh-DdvfZdv6T0ZEmVhlU76zBt72P_FGGa-PQ,8897
60
- qadence/blocks/embedding.py,sha256=TQt620UIVaNYHP34tpK9slv-PFiLvTQRYw5Ez9RuImE,6513
60
+ qadence/blocks/embedding.py,sha256=XC3_U4Dqi9jvU1TVbl2bZQJAGNL8Sww89eKOVLCsfiQ,6752
61
61
  qadence/blocks/manipulate.py,sha256=kPmzej7mnWFoqTJA2CkGulT7hcPha0GGPARC8rjZltg,2387
62
- qadence/blocks/matrix.py,sha256=-_PXohQ5mltvPYWKsf2KJj4AIJujTD-Mvx7JHNG9fD0,3772
63
- qadence/blocks/primitive.py,sha256=NWxgpG77cjBy-APg-kAGOX2kOR-OuH8hzml8U_Zfv1A,16640
62
+ qadence/blocks/matrix.py,sha256=k6CC3zN2i6nd7_9S9u4fJAxy9wfkM287945GpArwOhY,3771
63
+ qadence/blocks/primitive.py,sha256=RoEA9_VCI_8o4yg_pMe5T38z3LD6IFz9qlCiF3iHmOo,16631
64
64
  qadence/blocks/utils.py,sha256=iCJDi6HTYYaQQCoP3cdIKeCDuy8KQCxctrHN5QWXV-M,16349
65
- qadence/constructors/__init__.py,sha256=PWfSKcEJmo5azIkcRuRWsmch3FOeXl055iPsboNzryQ,938
65
+ qadence/constructors/__init__.py,sha256=oEGuILUB8qEbSeaKV9Q-Tk-DAVx-U0wqn8VoSztVueg,984
66
66
  qadence/constructors/ansatze.py,sha256=bTrcF2RsyA_Btmkk80tWxP1dn9fK_SXAQFueIuWkT-c,9660
67
67
  qadence/constructors/feature_maps.py,sha256=BaAxFi6fSKwjsfFjqZ8T7lyZfjotcgH2OW3b0j67YVk,8644
68
- qadence/constructors/hamiltonians.py,sha256=QMYHKLWadj-jVTYGkojGAsy-06A8or6OyQrwE7xXa8M,8738
68
+ qadence/constructors/hamiltonians.py,sha256=u9feuuLmgQ7tX0TcP8tsbCefvBSVjkY7k4fMT5vp12Q,10054
69
69
  qadence/constructors/iia.py,sha256=z-4AA9Oj-j2oZ0QDkLYNk4duS3UHY_98Qwt9VO_ZDDU,7001
70
70
  qadence/constructors/qft.py,sha256=2LpgQ-z1HUxB3rqHzYsbjqpdU63gyuuaUVCbNEFbjo8,7688
71
71
  qadence/constructors/rydberg_feature_maps.py,sha256=RuXtuAhjpong78jpKUjZHdh4fOdHBnuht1ffoAMWdEE,4839
@@ -77,7 +77,7 @@ qadence/constructors/daqc/gen_parser.py,sha256=taZMJ9BNp672qXqsNSQ8RY71tN2gMV4Rb
77
77
  qadence/constructors/daqc/utils.py,sha256=1T83veISoOXhJYUWXhfocbISpfIgsrKrdDHCMbskGoQ,1067
78
78
  qadence/draw/__init__.py,sha256=A2lU7_CfCjwZCnMRojG5CsoWm-7aWKpUYGyaJ9qBZIQ,2319
79
79
  qadence/draw/themes.py,sha256=VV4YtC8X3UI63AuJO2D0fLMTLbdDUjIyXQcKuDuIVmI,5533
80
- qadence/draw/utils.py,sha256=xsSogG76DYRLLetR0u7bDR66UTbDDPFok4YplFXYcso,12108
80
+ qadence/draw/utils.py,sha256=4Hk-vwGz6ZRLKYnV26r1g3zBvOONvlFiN4Kh6toUsI0,12107
81
81
  qadence/draw/vizbackend.py,sha256=BKq1fjW7zgEhaIhrmi-i6XV9ZWY7NmlmdDo9-tfP0Hk,14997
82
82
  qadence/draw/assets/dark/measurement.png,sha256=hSMhZZCFKHNO2tCpYTTSYIF-nsAfNalRunRUIyhygC0,502
83
83
  qadence/draw/assets/dark/measurement.svg,sha256=6ALGjaCX3xZ1NqB6RW6yzOchzZV-j8ukW4aGhEWe4Lk,7282
@@ -103,28 +103,26 @@ qadence/mitigations/__init__.py,sha256=RzaxYJftePFMloGhBVSixZ8fSe-ps_Jc-EyPm6xz-
103
103
  qadence/mitigations/analog_zne.py,sha256=g0QkjSdF-N9Dv2N8Oza4sylnjUMid5ea-4NCT9Tcm3Y,7768
104
104
  qadence/mitigations/protocols.py,sha256=Jq9MyLujfTyWmc7XVUGYVRUkJT1MmZw-GgmWpVjmX2Y,1608
105
105
  qadence/mitigations/readout.py,sha256=HPfYmdjRlieUdOBMZTghFK4DRWfveM4KkDkEI0bMI0E,6262
106
- qadence/ml_tools/__init__.py,sha256=_H5A_BWZRZVGoJszb9s8XRJnLnJxUNfYjuT9HT2yASo,786
107
- qadence/ml_tools/config.py,sha256=bA_9TYeuy0DPdhFg0_3PFctd6bx4hKugg4LmlUB2jyw,2647
106
+ qadence/ml_tools/__init__.py,sha256=HP4xjldkUZ9_WbZEDgpl31qoP9st5SBbC-DjI5pkx3k,1054
107
+ qadence/ml_tools/config.py,sha256=c3vvQiNXlNoJnOuMFfqAd5fVkmpa7EzCN_ztvPV1jBU,14152
108
+ qadence/ml_tools/constructors.py,sha256=cE510DqCKBe4tImH90qHawEbXU-mlQuW9Wh15lUON6Q,27293
108
109
  qadence/ml_tools/data.py,sha256=8ZUFjhQSp94w7icX7RzM2J39Yo7P_T-AgjcThBc8miI,4283
109
- qadence/ml_tools/models.py,sha256=lELcq__wfGsurUm2UOgYkOzdBDwu66Nik9ySoAjDKnY,12673
110
+ qadence/ml_tools/models.py,sha256=SjwAPbSl9zn9YqfmwqHc2lIXCkIpwG_ysz4jieRh7W0,16996
110
111
  qadence/ml_tools/optimize_step.py,sha256=ATXWmAqybJVK3QmAaDqVXB5mxjTo2MIi_e0a5WSPFpc,1800
111
112
  qadence/ml_tools/parameters.py,sha256=gew2Kq_5-RgRpaTvs8eauVhgo0sTqqDQEV6WHFEiLGM,1301
112
- qadence/ml_tools/printing.py,sha256=YK2zc9SOc5wiLnMxm3Q1gSwPAVW9Vy2Pcnjg9gP0aKU,694
113
- qadence/ml_tools/saveload.py,sha256=_5ni1sUohbtpGAcCRynh4j1dXkMXDpvgoDN-Jby2miQ,5041
113
+ qadence/ml_tools/printing.py,sha256=Mzdhmm-gPclhYL0NPN2zwJ19-kKQ4PDwFkefIOYEmzU,745
114
+ qadence/ml_tools/saveload.py,sha256=jeYG7Y1ime0P06SMWOiCgWlci-xHdEPrAARfM-awDH8,5798
114
115
  qadence/ml_tools/tensors.py,sha256=xZ9ZRzOqEaMgLUGWQf1najDmL6iLuN1ojCGVFs1Tm94,1337
115
- qadence/ml_tools/train_grad.py,sha256=6ZFFd7wGKFFqz3wpVkSD_xFjQPJ4IgIpA0IjYanohcs,9507
116
+ qadence/ml_tools/train_grad.py,sha256=VcBNr7g9tfjnlyG7XwQVHtEivnki34LJZcgJuRxyHhs,10924
116
117
  qadence/ml_tools/train_no_grad.py,sha256=PrOfPwu6C-YqfFxnRkbeyOQzqSyjRrx4AZZd6C-1xRw,4705
117
- qadence/ml_tools/utils.py,sha256=_GZSN5Flk1nRFutkXih397Q3cWKdX0UP8c9CRXpUL7c,1654
118
- qadence/models/__init__.py,sha256=0nZzAC2TGr8Yuf40-R7m2cSsr_BlNq_GsMOwaOYZLqM,193
119
- qadence/models/qnn.py,sha256=gc_iC1GG6WJbeLaln9jy4yYp9fY0p8fkpKkKJpXJ3ck,10397
120
- qadence/models/quantum_model.py,sha256=RcKdkWX0dQaYuJiZbJ1WUYpLKmlJLiUglWV0Gv0-DIo,14417
118
+ qadence/ml_tools/utils.py,sha256=PW8FyoV0mG_DtN1U8njTDV5qxZ0EK4mnFwMAsLBArfk,1410
121
119
  qadence/noise/__init__.py,sha256=r0nR8uEZeB1M9pI2UisjWq0bjw50fPFfVGzIMev923g,147
122
120
  qadence/noise/protocols.py,sha256=-aZ06JvMnpxCeT5v5lI_RNPOLbb9Ju1Pi1AB6uAXxVE,1653
123
121
  qadence/noise/readout.py,sha256=UpUdxaGu09SmqKXn0O7RYfF7b7UcRZiNMfDlpY0weV0,6726
124
122
  qadence/operations/__init__.py,sha256=HAAo9VZUTq2H7kcEarChTgTWCIq7LT25-xBxkwE0F9c,1922
125
123
  qadence/operations/analog.py,sha256=v11DSrg-XUbwIAWAWM43y3VQbYKsx2ynx-HimUoC-x0,7435
126
124
  qadence/operations/control_ops.py,sha256=ZDOmTXxQJXSP2ASNWNUlt7pIuEjAVNT2FmexbK_TisM,9484
127
- qadence/operations/ham_evo.py,sha256=4KdIIkvkDZwoMs19qxDdNBsDC3W4keg33j1wZHXJNrE,7387
125
+ qadence/operations/ham_evo.py,sha256=5k0x-4zXAgMxvlgFSFThnc_m-k1BEizw0wjhDnoU-ek,7814
128
126
  qadence/operations/parametric.py,sha256=BHGGn8k7hIZX8_0V1K1_FOnILAROEtqZGjBdIfzMcWI,4911
129
127
  qadence/operations/primitive.py,sha256=ekiylIW7mWjesBXVyVmowF75Ek82T_eNUVcDTEAGzFg,9002
130
128
  qadence/transpile/__init__.py,sha256=lb5LwsYb6lN5YFBsU3YBey7-0OcUQpYa3Q4hG6zmgi0,457
@@ -135,7 +133,7 @@ qadence/transpile/digitalize.py,sha256=iWRwYAYQsD2INHj0HNbGJriv_3fRCuBW1nDBrwtKS
135
133
  qadence/transpile/flatten.py,sha256=EdhSG5WyF56nbnxINNLqrHgY84MRM1YFjT3fR4aph5Q,3427
136
134
  qadence/transpile/invert.py,sha256=KAefHTG2AWr39aengVhXrzCtJPhrZC-ZnL6vYvmbnY0,4867
137
135
  qadence/transpile/transpile.py,sha256=6MRRkk1OS279L1fwUQjazA6qlfpbd-T_EJMKT8hAhOU,2721
138
- qadence-1.6.3.dist-info/METADATA,sha256=fDTrk3gYjbugHOUrI_f7YcEhtcMbpCH1UW_0OCTFsB8,9596
139
- qadence-1.6.3.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
140
- qadence-1.6.3.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
141
- qadence-1.6.3.dist-info/RECORD,,
136
+ qadence-1.7.1.dist-info/METADATA,sha256=Cd8hZ0vygRkiSbvu57RDAdL3JNvleJe8E334CMr0WXw,9774
137
+ qadence-1.7.1.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
138
+ qadence-1.7.1.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
139
+ qadence-1.7.1.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.24.2
2
+ Generator: hatchling 1.25.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any