qadence 1.8.0__py3-none-any.whl → 1.9.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.
- qadence/__init__.py +1 -1
- qadence/analog/parse_analog.py +1 -2
- qadence/backends/gpsr.py +8 -2
- qadence/backends/pulser/backend.py +7 -23
- qadence/backends/pyqtorch/backend.py +80 -5
- qadence/backends/pyqtorch/config.py +10 -3
- qadence/backends/pyqtorch/convert_ops.py +63 -2
- qadence/blocks/primitive.py +1 -0
- qadence/execution.py +0 -2
- qadence/log_config.yaml +10 -0
- qadence/measurements/shadow.py +97 -128
- qadence/measurements/utils.py +2 -2
- qadence/mitigations/readout.py +12 -6
- qadence/ml_tools/__init__.py +4 -8
- qadence/ml_tools/callbacks/__init__.py +30 -0
- qadence/ml_tools/callbacks/callback.py +451 -0
- qadence/ml_tools/callbacks/callbackmanager.py +214 -0
- qadence/ml_tools/{saveload.py → callbacks/saveload.py} +11 -11
- qadence/ml_tools/callbacks/writer_registry.py +441 -0
- qadence/ml_tools/config.py +132 -258
- qadence/ml_tools/data.py +7 -3
- qadence/ml_tools/loss/__init__.py +10 -0
- qadence/ml_tools/loss/loss.py +87 -0
- qadence/ml_tools/optimize_step.py +45 -10
- qadence/ml_tools/stages.py +46 -0
- qadence/ml_tools/train_utils/__init__.py +7 -0
- qadence/ml_tools/train_utils/base_trainer.py +555 -0
- qadence/ml_tools/train_utils/config_manager.py +184 -0
- qadence/ml_tools/trainer.py +708 -0
- qadence/model.py +1 -1
- qadence/noise/__init__.py +2 -2
- qadence/noise/protocols.py +18 -53
- qadence/operations/ham_evo.py +87 -26
- qadence/transpile/noise.py +12 -5
- qadence/types.py +15 -3
- {qadence-1.8.0.dist-info → qadence-1.9.1.dist-info}/METADATA +3 -4
- {qadence-1.8.0.dist-info → qadence-1.9.1.dist-info}/RECORD +39 -32
- {qadence-1.8.0.dist-info → qadence-1.9.1.dist-info}/WHEEL +1 -1
- qadence/ml_tools/printing.py +0 -154
- qadence/ml_tools/train_grad.py +0 -395
- qadence/ml_tools/train_no_grad.py +0 -199
- qadence/noise/readout.py +0 -218
- {qadence-1.8.0.dist-info → qadence-1.9.1.dist-info}/licenses/LICENSE +0 -0
qadence/model.py
CHANGED
@@ -514,7 +514,7 @@ class QuantumModel(nn.Module):
|
|
514
514
|
if isinstance(file_path, str):
|
515
515
|
file_path = Path(file_path)
|
516
516
|
if os.path.isdir(file_path):
|
517
|
-
from qadence.ml_tools.saveload import get_latest_checkpoint_name
|
517
|
+
from qadence.ml_tools.callbacks.saveload import get_latest_checkpoint_name
|
518
518
|
|
519
519
|
file_path = file_path / get_latest_checkpoint_name(file_path, "model")
|
520
520
|
|
qadence/noise/__init__.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
|
-
from .protocols import NoiseHandler
|
3
|
+
from .protocols import NoiseHandler
|
4
4
|
|
5
5
|
# Modules to be automatically added to the qadence namespace
|
6
|
-
__all__ = ["NoiseHandler"
|
6
|
+
__all__ = ["NoiseHandler"]
|
qadence/noise/protocols.py
CHANGED
@@ -1,15 +1,10 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
|
-
import importlib
|
4
3
|
from itertools import compress
|
5
|
-
from typing import Any
|
4
|
+
from typing import Any
|
6
5
|
|
7
6
|
from qadence.types import NoiseEnum, NoiseProtocol
|
8
7
|
|
9
|
-
PROTOCOL_TO_MODULE = {
|
10
|
-
"Readout": "qadence.noise.readout",
|
11
|
-
}
|
12
|
-
|
13
8
|
|
14
9
|
class NoiseHandler:
|
15
10
|
"""A container for multiple sources of noise.
|
@@ -58,7 +53,7 @@ class NoiseHandler:
|
|
58
53
|
self.verify_all_protocols()
|
59
54
|
|
60
55
|
def _verify_single_protocol(self, protocol: NoiseEnum, option: dict) -> None:
|
61
|
-
if protocol
|
56
|
+
if not isinstance(protocol, NoiseProtocol.READOUT): # type: ignore[arg-type]
|
62
57
|
name_mandatory_option = (
|
63
58
|
"noise_probs" if isinstance(protocol, NoiseProtocol.ANALOG) else "error_probability"
|
64
59
|
)
|
@@ -91,10 +86,10 @@ class NoiseHandler:
|
|
91
86
|
if types.count(NoiseProtocol.ANALOG) > 1:
|
92
87
|
raise ValueError("Multiple Analog Noises are not supported yet.")
|
93
88
|
|
94
|
-
if NoiseProtocol.READOUT in
|
89
|
+
if NoiseProtocol.READOUT in unique_types:
|
95
90
|
if (
|
96
|
-
self.protocol[-1]
|
97
|
-
or
|
91
|
+
not isinstance(self.protocol[-1], NoiseProtocol.READOUT)
|
92
|
+
or types.count(NoiseProtocol.READOUT) > 1
|
98
93
|
):
|
99
94
|
raise ValueError("Only define a NoiseHandler with one READOUT as the last Noise.")
|
100
95
|
|
@@ -106,16 +101,6 @@ class NoiseHandler:
|
|
106
101
|
]
|
107
102
|
)
|
108
103
|
|
109
|
-
def get_noise_fn(self, index_protocol: int) -> Callable:
|
110
|
-
try:
|
111
|
-
module = importlib.import_module(PROTOCOL_TO_MODULE[self.protocol[index_protocol]])
|
112
|
-
except KeyError:
|
113
|
-
ImportError(
|
114
|
-
f"The module for the protocol {self.protocol[index_protocol]} is not found."
|
115
|
-
)
|
116
|
-
fn = getattr(module, "add_noise")
|
117
|
-
return cast(Callable, fn)
|
118
|
-
|
119
104
|
def append(self, other: NoiseHandler | list[NoiseHandler]) -> None:
|
120
105
|
"""Append noises.
|
121
106
|
|
@@ -164,15 +149,15 @@ class NoiseHandler:
|
|
164
149
|
return list(filter(lambda el: not el.startswith("__"), dir(cls)))
|
165
150
|
|
166
151
|
def filter(self, protocol: NoiseEnum) -> NoiseHandler | None:
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
152
|
+
protocol_matches: list = [isinstance(p, protocol) for p in self.protocol] # type: ignore[arg-type]
|
153
|
+
|
154
|
+
# if we have at least a match
|
155
|
+
if True in protocol_matches:
|
156
|
+
return NoiseHandler(
|
157
|
+
list(compress(self.protocol, protocol_matches)),
|
158
|
+
list(compress(self.options, protocol_matches)),
|
172
159
|
)
|
173
|
-
|
174
|
-
else None
|
175
|
-
)
|
160
|
+
return None
|
176
161
|
|
177
162
|
def bitflip(self, *args: Any, **kwargs: Any) -> NoiseHandler:
|
178
163
|
self.append(NoiseHandler(NoiseProtocol.DIGITAL.BITFLIP, *args, **kwargs))
|
@@ -212,30 +197,10 @@ class NoiseHandler:
|
|
212
197
|
self.append(NoiseHandler(NoiseProtocol.ANALOG.DEPHASING, *args, **kwargs))
|
213
198
|
return self
|
214
199
|
|
215
|
-
def
|
216
|
-
self.append(NoiseHandler(NoiseProtocol.READOUT, *args, **kwargs))
|
200
|
+
def readout_independent(self, *args: Any, **kwargs: Any) -> NoiseHandler:
|
201
|
+
self.append(NoiseHandler(NoiseProtocol.READOUT.INDEPENDENT, *args, **kwargs))
|
217
202
|
return self
|
218
203
|
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
Args:
|
224
|
-
noise (NoiseHandler): Noise to apply.
|
225
|
-
samples (list[Counter]): Samples to alter
|
226
|
-
|
227
|
-
Returns:
|
228
|
-
list[Counter]: Altered samples.
|
229
|
-
"""
|
230
|
-
if noise.protocol[-1] == NoiseProtocol.READOUT:
|
231
|
-
error_fn = noise.get_noise_fn(-1)
|
232
|
-
# Get the number of qubits from the sample keys.
|
233
|
-
n_qubits = len(list(samples[0].keys())[0])
|
234
|
-
# Get the number of shots from the sample values.
|
235
|
-
n_shots = sum(samples[0].values())
|
236
|
-
noisy_samples: list = error_fn(
|
237
|
-
counters=samples, n_qubits=n_qubits, options=noise.options[-1], n_shots=n_shots
|
238
|
-
)
|
239
|
-
return noisy_samples
|
240
|
-
else:
|
241
|
-
return samples
|
204
|
+
def readout_correlated(self, *args: Any, **kwargs: Any) -> NoiseHandler:
|
205
|
+
self.append(NoiseHandler(NoiseProtocol.READOUT.CORRELATED, *args, **kwargs))
|
206
|
+
return self
|
qadence/operations/ham_evo.py
CHANGED
@@ -33,29 +33,59 @@ logger = getLogger(__name__)
|
|
33
33
|
|
34
34
|
class HamEvo(TimeEvolutionBlock):
|
35
35
|
"""
|
36
|
-
|
36
|
+
The Hamiltonian evolution operator U(t).
|
37
37
|
|
38
|
-
|
39
|
-
|
40
|
-
|
38
|
+
For time-independent Hamiltonians the solution is exact:
|
39
|
+
|
40
|
+
U(t) = exp(-iGt)
|
41
|
+
|
42
|
+
where G represents an Hermitian generator, or Hamiltonian and t represents the
|
43
|
+
time parameter. For time-dependent Hamiltonians, the solution is obtained by
|
44
|
+
numerical integration of the Schrodinger equation.
|
41
45
|
|
42
46
|
Arguments:
|
43
|
-
generator:
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
+
generator: Hamiltonian generator, either symbolic as an AbstractBlock,
|
48
|
+
or as a torch.Tensor or numpy.ndarray.
|
49
|
+
parameter: The time parameter for evolution operator. For the time-independent
|
50
|
+
case, it represents the actual value for which the evolution will be
|
51
|
+
evaluated. For the time-dependent case, it should be an instance of
|
52
|
+
TimeParameter to signal the solver the variable that will be integrated over.
|
53
|
+
qubit_support: The qubits on which the evolution will be performed on. Only
|
54
|
+
required for generators that are not a composition of blocks.
|
55
|
+
duration: (optional) duration of the evolution in case of time-dependent
|
56
|
+
generator. By default, a FeatureParameter with tag "duration" will
|
57
|
+
be initialized, and the value will then be required in the values dict.
|
58
|
+
noise_operators: (optional) the list of jump operators to use when using
|
59
|
+
a shrodinger solver, allowing to perform noisy simulations.
|
47
60
|
|
48
61
|
Examples:
|
49
62
|
|
50
63
|
```python exec="on" source="material-block" result="json"
|
51
|
-
from qadence import
|
64
|
+
from qadence import X, HamEvo, PI, add, run
|
65
|
+
from qadence import FeatureParameter, TimeParameter
|
52
66
|
import torch
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
67
|
+
|
68
|
+
n_qubits = 3
|
69
|
+
|
70
|
+
# Hamiltonian as a block composition
|
71
|
+
hamiltonian = add(X(i) for i in range(n_qubits))
|
72
|
+
hevo = HamEvo(hamiltonian, parameter=torch.rand(2))
|
73
|
+
state = run(hevo)
|
74
|
+
|
75
|
+
# Hamiltonian as a random matrix
|
76
|
+
hamiltonian = torch.rand(2, 2, dtype=torch.complex128)
|
77
|
+
hevo = HamEvo(hamiltonian, parameter=torch.rand(2), qubit_support=(0,))
|
78
|
+
state = run(hevo)
|
79
|
+
|
80
|
+
# Time-dependent Hamiltonian
|
81
|
+
t = TimeParameter("t")
|
82
|
+
hamiltonian = t * add(X(i) for i in range(n_qubits))
|
83
|
+
hevo = HamEvo(hamiltonian, parameter=t)
|
84
|
+
state = run(hevo, values = {"duration": torch.tensor(1.0)})
|
85
|
+
|
86
|
+
# Adding noise operators
|
87
|
+
noise_ops = [X(0)]
|
88
|
+
hevo = HamEvo(hamiltonian, parameter=t, noise_operators=noise_ops)
|
59
89
|
```
|
60
90
|
"""
|
61
91
|
|
@@ -67,21 +97,31 @@ class HamEvo(TimeEvolutionBlock):
|
|
67
97
|
generator: Union[TGenerator, AbstractBlock],
|
68
98
|
parameter: TParameter,
|
69
99
|
qubit_support: tuple[int, ...] = None,
|
70
|
-
duration:
|
100
|
+
duration: TParameter | None = None,
|
101
|
+
noise_operators: list[AbstractBlock] = list(),
|
71
102
|
):
|
72
|
-
|
103
|
+
params = {}
|
73
104
|
if qubit_support is None and not isinstance(generator, AbstractBlock):
|
74
105
|
raise ValueError("You have to supply a qubit support for non-block generators.")
|
75
106
|
super().__init__(qubit_support if qubit_support else generator.qubit_support)
|
76
107
|
if isinstance(generator, AbstractBlock):
|
77
108
|
qubit_support = generator.qubit_support
|
78
109
|
if generator.is_parametric:
|
79
|
-
|
80
|
-
|
81
|
-
if
|
82
|
-
|
83
|
-
|
110
|
+
params = {str(e): e for e in expressions(generator)}
|
111
|
+
if generator.is_time_dependent:
|
112
|
+
if isinstance(duration, str):
|
113
|
+
duration = Parameter(duration, trainable=False)
|
114
|
+
elif duration is None:
|
115
|
+
duration = Parameter("duration", trainable=False)
|
116
|
+
if not generator.is_time_dependent and duration is not None:
|
117
|
+
raise TypeError(
|
118
|
+
"Duration argument is only supported for time-dependent generators."
|
119
|
+
)
|
84
120
|
elif isinstance(generator, torch.Tensor):
|
121
|
+
if duration is not None:
|
122
|
+
raise TypeError(
|
123
|
+
"Duration argument is only supported for time-dependent generators."
|
124
|
+
)
|
85
125
|
msg = "Please provide a square generator."
|
86
126
|
if len(generator.shape) == 2:
|
87
127
|
assert generator.shape[0] == generator.shape[1], msg
|
@@ -94,20 +134,41 @@ class HamEvo(TimeEvolutionBlock):
|
|
94
134
|
In case of a 3D generator, the batch dim\
|
95
135
|
is expected to be at dim 0."
|
96
136
|
)
|
97
|
-
|
137
|
+
params = {str(generator.__hash__()): generator}
|
98
138
|
elif isinstance(generator, (sympy.Basic, sympy.Array)):
|
99
|
-
|
139
|
+
if duration is not None:
|
140
|
+
raise TypeError(
|
141
|
+
"Duration argument is only supported for time-dependent generators."
|
142
|
+
)
|
143
|
+
params = {str(generator): generator}
|
100
144
|
else:
|
101
145
|
raise TypeError(
|
102
146
|
f"Generator of type {type(generator)} not supported.\
|
103
147
|
If you're using a numpy.ndarray, please cast it to a torch tensor."
|
104
148
|
)
|
105
|
-
|
106
|
-
|
149
|
+
if duration is not None:
|
150
|
+
params = {"duration": Parameter(duration), **params}
|
151
|
+
params = {"parameter": Parameter(parameter), **params}
|
152
|
+
self.parameters = ParamMap(**params)
|
107
153
|
self.time_param = parameter
|
108
154
|
self.generator = generator
|
109
155
|
self.duration = duration
|
110
156
|
|
157
|
+
if len(noise_operators) > 0:
|
158
|
+
if not all(
|
159
|
+
[
|
160
|
+
len(set(op.qubit_support + self.qubit_support) - set(self.qubit_support)) == 0
|
161
|
+
for op in noise_operators
|
162
|
+
]
|
163
|
+
):
|
164
|
+
raise ValueError(
|
165
|
+
"Noise operators should be defined"
|
166
|
+
" over the same or a subset of the qubit support"
|
167
|
+
)
|
168
|
+
if True in [op.is_parametric for op in noise_operators]:
|
169
|
+
raise ValueError("Parametric operators are not supported")
|
170
|
+
self.noise_operators = noise_operators
|
171
|
+
|
111
172
|
@classmethod
|
112
173
|
def num_parameters(cls) -> int:
|
113
174
|
return 2
|
qadence/transpile/noise.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
|
+
from qadence.backend import ConvertedCircuit
|
3
4
|
from qadence.blocks.abstract import AbstractBlock
|
4
5
|
from qadence.circuit import QuantumCircuit
|
5
6
|
from qadence.noise.protocols import NoiseHandler
|
@@ -23,13 +24,15 @@ def _set_noise(
|
|
23
24
|
|
24
25
|
|
25
26
|
def set_noise(
|
26
|
-
circuit: QuantumCircuit | AbstractBlock,
|
27
|
+
circuit: QuantumCircuit | AbstractBlock | ConvertedCircuit,
|
27
28
|
noise: NoiseHandler | None,
|
28
29
|
target_class: AbstractBlock | None = None,
|
29
30
|
) -> QuantumCircuit | AbstractBlock:
|
30
31
|
"""
|
31
32
|
Parses a `QuantumCircuit` or `CompositeBlock` to add noise to specific gates.
|
32
33
|
|
34
|
+
If `circuit` is a `ConvertedCircuit`, this is done within `circuit.abstract`.
|
35
|
+
|
33
36
|
Changes the input in place.
|
34
37
|
|
35
38
|
Arguments:
|
@@ -37,10 +40,14 @@ def set_noise(
|
|
37
40
|
noise: the NoiseHandler protocol to change to, or `None` to remove the noise.
|
38
41
|
target_class: optional class to selectively add noise to.
|
39
42
|
"""
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
+
input_block: AbstractBlock
|
44
|
+
if isinstance(circuit, ConvertedCircuit):
|
45
|
+
input_block = circuit.abstract.block
|
46
|
+
elif isinstance(circuit, QuantumCircuit):
|
47
|
+
input_block = circuit.block
|
48
|
+
else:
|
49
|
+
input_block = circuit
|
43
50
|
|
44
|
-
|
51
|
+
apply_fn_to_blocks(input_block, _set_noise, noise, target_class)
|
45
52
|
|
46
53
|
return circuit
|
qadence/types.py
CHANGED
@@ -10,7 +10,8 @@ import sympy
|
|
10
10
|
from matplotlib.figure import Figure
|
11
11
|
from numpy.typing import ArrayLike
|
12
12
|
from pyqtorch.noise import NoiseType as DigitalNoise
|
13
|
-
from pyqtorch.
|
13
|
+
from pyqtorch.noise.readout import WhiteNoise
|
14
|
+
from pyqtorch.utils import DropoutMode, SolverType
|
14
15
|
from torch import Tensor, pi
|
15
16
|
from torch.nn import Module
|
16
17
|
|
@@ -54,7 +55,9 @@ __all__ = [
|
|
54
55
|
"SerializationFormat",
|
55
56
|
"PI",
|
56
57
|
"SolverType",
|
58
|
+
"DropoutMode",
|
57
59
|
"NoiseProtocol",
|
60
|
+
"WhiteNoise",
|
58
61
|
] # type: ignore
|
59
62
|
|
60
63
|
|
@@ -468,16 +471,25 @@ class AnalogNoise(StrEnum):
|
|
468
471
|
DEPHASING = "Dephasing"
|
469
472
|
|
470
473
|
|
474
|
+
class ReadoutNoise(StrEnum):
|
475
|
+
"""Type of readout protocol."""
|
476
|
+
|
477
|
+
INDEPENDENT = "Independent Readout"
|
478
|
+
"""Simple readout protocols where each qubit is corrupted independently."""
|
479
|
+
CORRELATED = "Correlated Readout"
|
480
|
+
"""Using a confusion matrix (2**n, 2**n) for corrupting bitstrings values."""
|
481
|
+
|
482
|
+
|
471
483
|
@dataclass
|
472
484
|
class NoiseProtocol:
|
473
485
|
"""Type of noise protocol."""
|
474
486
|
|
475
487
|
ANALOG = AnalogNoise
|
476
488
|
"""Noise applied in analog blocks."""
|
477
|
-
READOUT =
|
489
|
+
READOUT = ReadoutNoise
|
478
490
|
"""Noise applied on outputs of quantum programs."""
|
479
491
|
DIGITAL = DigitalNoise
|
480
492
|
"""Noise applied to digital blocks."""
|
481
493
|
|
482
494
|
|
483
|
-
NoiseEnum = Union[DigitalNoise, AnalogNoise,
|
495
|
+
NoiseEnum = Union[DigitalNoise, AnalogNoise, ReadoutNoise]
|
@@ -1,10 +1,9 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: qadence
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.9.1
|
4
4
|
Summary: Pasqal interface for circuit-based quantum computing SDKs
|
5
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>, Giorgio Tosti Balducci <giorgio.tosti-balducci@pasqal.com>, Daniele Cucurachi <daniele.cucurachi@pasqal.com>
|
6
6
|
License: Apache 2.0
|
7
|
-
License-File: LICENSE
|
8
7
|
Classifier: License :: OSI Approved :: Apache Software License
|
9
8
|
Classifier: Programming Language :: Python
|
10
9
|
Classifier: Programming Language :: Python :: 3
|
@@ -22,7 +21,7 @@ Requires-Dist: matplotlib
|
|
22
21
|
Requires-Dist: nevergrad
|
23
22
|
Requires-Dist: numpy
|
24
23
|
Requires-Dist: openfermion
|
25
|
-
Requires-Dist: pyqtorch==1.
|
24
|
+
Requires-Dist: pyqtorch==1.6.0
|
26
25
|
Requires-Dist: pyyaml
|
27
26
|
Requires-Dist: rich
|
28
27
|
Requires-Dist: scipy
|
@@ -54,7 +53,7 @@ Requires-Dist: mlflow; extra == 'mlflow'
|
|
54
53
|
Provides-Extra: protocols
|
55
54
|
Requires-Dist: qadence-protocols; extra == 'protocols'
|
56
55
|
Provides-Extra: pulser
|
57
|
-
Requires-Dist: pasqal-cloud==0.12.
|
56
|
+
Requires-Dist: pasqal-cloud==0.12.5; extra == 'pulser'
|
58
57
|
Requires-Dist: pulser-core==1.1.1; extra == 'pulser'
|
59
58
|
Requires-Dist: pulser-simulation==1.1.1; extra == 'pulser'
|
60
59
|
Provides-Extra: visualization
|
@@ -1,14 +1,14 @@
|
|
1
|
-
qadence/__init__.py,sha256=
|
1
|
+
qadence/__init__.py,sha256=c3y-Tbq_P4cbWKi7b45Z6zUFlnqgd8Q68OOpL2O2GOI,2671
|
2
2
|
qadence/backend.py,sha256=MigWAAroh_STGLg2qoQED9tDHmTo15uBbvFNz_oHy7A,13372
|
3
3
|
qadence/circuit.py,sha256=r8QvzLWHvavqLOlNstq8aHg6UpKmPClEDoZVBkk-tzY,6970
|
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=
|
6
|
+
qadence/execution.py,sha256=SoB5n8mRQ6mxY9JqnqrrU5hY-M72WQOpnZC25PBM_dA,9670
|
7
7
|
qadence/extensions.py,sha256=Fyj8WweDNbtZc6snZ2y7zLL-jBOvi7InMYElbC2gNmQ,6084
|
8
8
|
qadence/libs.py,sha256=HetkKO8TCTlVCViQdVQJvxwBekrhd-y_iMox4UJMY1M,410
|
9
|
-
qadence/log_config.yaml,sha256=
|
9
|
+
qadence/log_config.yaml,sha256=QiwoB1bnRdk9NpxnvfgWX2PjN7EDfYlrc3GVD38rtdI,739
|
10
10
|
qadence/logger.py,sha256=Hb76pK3VyQjVjJb4_NqFlOJgjYJVa8t7DHJFlzOM86M,407
|
11
|
-
qadence/model.py,sha256=
|
11
|
+
qadence/model.py,sha256=OH61_Ij_c7PRywiXf16tJ5mnK9iYNbBTdRiHeG8PZ54,21623
|
12
12
|
qadence/overlap.py,sha256=ekaUnIcQWdF4hSFuUWpRjaxo43JyDGFOayP7vMXCZpw,16821
|
13
13
|
qadence/parameters.py,sha256=RDYklyW5EQZTjsAazEXa4lLGDOdmUUU53hLj385uSaI,12687
|
14
14
|
qadence/protocols.py,sha256=bcYTxSjgMPV-a-D6yv90jCpnGik8myzaNpFv9z1gzJ0,442
|
@@ -18,17 +18,17 @@ qadence/register.py,sha256=mwmvS6PcTY0F9cIhTUXG3NT73FIagfMCwVqYa4DrQrk,13001
|
|
18
18
|
qadence/serial_expr_grammar.peg,sha256=z5ytL7do9kO8o4h-V5GrsDuLdso0KsRcMuIYURFfmAY,328
|
19
19
|
qadence/serialization.py,sha256=qEET6Gu9u2aSibPve3bJrqDzK2_gO3RPDJjt4ZY8GbE,15596
|
20
20
|
qadence/states.py,sha256=5QIOBBYs8e2uLFiMa8iMYZ-MvWIFEqkZAjNYx0SyYPI,14843
|
21
|
-
qadence/types.py,sha256=
|
21
|
+
qadence/types.py,sha256=NR1dnN4tKC3zL1KEzjs2p_IYVth7GctgXVbIJsuiUws,11992
|
22
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=GSt4heEmRkBmoQIgdgkTclEFxZY-jjuAd77_SsZtGdI,6513
|
25
25
|
qadence/analog/constants.py,sha256=B2phQoN1ASL8CwM-Dsa1rbraYwGwwPSeiB3HbVe-MPA,1243
|
26
26
|
qadence/analog/device.py,sha256=LK8rQYBiK_PWHezLfTL0Ig83yc5wQPmZ3rBZF-gWgYw,2416
|
27
27
|
qadence/analog/hamiltonian_terms.py,sha256=9LKidqqEMJTTdXeaxkxP_otTmcv9i4yeJ-JKCLOCK3Y,3421
|
28
|
-
qadence/analog/parse_analog.py,sha256=
|
28
|
+
qadence/analog/parse_analog.py,sha256=9Y_LMdw4wCHH6YSkvHhs6PUNwzT14HS7cUGheNSmDQg,4168
|
29
29
|
qadence/backends/__init__.py,sha256=ibm7wmZxuIoMYAQxgAx0MsfLYWOVHNWgLwyS1HjMuuI,215
|
30
30
|
qadence/backends/api.py,sha256=NPrvtZQ4klUBabUWJ5hbTUCVoaoW9-sHVbiXxAnTt3A,2643
|
31
|
-
qadence/backends/gpsr.py,sha256=
|
31
|
+
qadence/backends/gpsr.py,sha256=HW5m6iHLq3hLHdJoU1q1i1laR0hBs7uCniXqrsFoNCI,5616
|
32
32
|
qadence/backends/jax_utils.py,sha256=VfKhqCKknHDWZO21UFipWH_Lkiq175Z5GkP49gWjbyw,5038
|
33
33
|
qadence/backends/utils.py,sha256=SdeAf6BDayc-W9hPI271PKtJ_ROOzRry9Jw72wUGmm4,8565
|
34
34
|
qadence/backends/horqrux/__init__.py,sha256=0OdVy6cq0oQggV48LO1WXdaZuSkDkz7OYNEPIkNAmfk,140
|
@@ -36,7 +36,7 @@ qadence/backends/horqrux/backend.py,sha256=KNFFGN9dsgB9QKtNXiP3LyMY9DQ-7W7ScyE6k
|
|
36
36
|
qadence/backends/horqrux/config.py,sha256=xz7JlUcwW_4JAbvProbSI9hA1SXZRRAN0Hr2bvmLzfg,892
|
37
37
|
qadence/backends/horqrux/convert_ops.py,sha256=3uG3yLq5wjfrWzFHDs0HEnd8kER91ZHVX3HCpYjOdjk,8565
|
38
38
|
qadence/backends/pulser/__init__.py,sha256=capQ-eHqwtOeLf4mWsI0BIseAHhiLGie5cFD4-iVhUo,116
|
39
|
-
qadence/backends/pulser/backend.py,sha256=
|
39
|
+
qadence/backends/pulser/backend.py,sha256=kNo_AAvOPNevdiMbZnQlEUbWCO-NXcwUtFWQHJ6VR2Q,14845
|
40
40
|
qadence/backends/pulser/channels.py,sha256=ZF0yEXUFHAmi3IdeXjzdTNGR5NzaRRFTiUpUGVg2sO4,329
|
41
41
|
qadence/backends/pulser/cloud.py,sha256=0uUluvbFV9sOuCPraE-9uiVtC3Q8QaDY1IJMDi8grDM,2057
|
42
42
|
qadence/backends/pulser/config.py,sha256=aoHDmtgq5i0Zryxenw_p3uARY0B1w-UaYvfqDmrWHM0,2175
|
@@ -45,9 +45,9 @@ qadence/backends/pulser/devices.py,sha256=DermLZNfmCB3SqteKVW4uhg4jp6ya1G6ptnXbB
|
|
45
45
|
qadence/backends/pulser/pulses.py,sha256=F4fExIRAhLPMtVg1bhNtDihUYHxu5RExGjovk8-CQIo,11884
|
46
46
|
qadence/backends/pulser/waveforms.py,sha256=0uz95b7rUaUUtN0tuHBZmJ0H6UBmfHST_59ozwsRCzg,2227
|
47
47
|
qadence/backends/pyqtorch/__init__.py,sha256=0OdVy6cq0oQggV48LO1WXdaZuSkDkz7OYNEPIkNAmfk,140
|
48
|
-
qadence/backends/pyqtorch/backend.py,sha256=
|
49
|
-
qadence/backends/pyqtorch/config.py,sha256=
|
50
|
-
qadence/backends/pyqtorch/convert_ops.py,sha256=
|
48
|
+
qadence/backends/pyqtorch/backend.py,sha256=Sjuof9b332w4gk9o8Rso2rgSHxskexfkIazRfxRD0Ng,11458
|
49
|
+
qadence/backends/pyqtorch/config.py,sha256=sAxWVSkWvj6Lu0em1KJCDb6nfjqe8Dsxi7pyh6qYJpA,2387
|
50
|
+
qadence/backends/pyqtorch/convert_ops.py,sha256=QVlXAqqBPtBt2NuFU9mvEm5i7FWXg3gWqoeizlH-1_s,13401
|
51
51
|
qadence/blocks/__init__.py,sha256=H6jEA_CptkE-eoB4UfSbUiDszbxxhZwECV_TgoZWXoU,960
|
52
52
|
qadence/blocks/abstract.py,sha256=DSQUE71rMyRBwAP--4Tx1WQC_LCXaNlftjd7goGyrpQ,12027
|
53
53
|
qadence/blocks/analog.py,sha256=ymnnlSVoW1XL05ZvnnHCqRTHuOXIEY_7E9M0PNKJZy4,10812
|
@@ -56,7 +56,7 @@ qadence/blocks/composite.py,sha256=f9D8L3u5Ktu_-xDBWsWiPlY8I-YW5YFgU18BtqwFHK0,8
|
|
56
56
|
qadence/blocks/embedding.py,sha256=MA3vRt659A828ZnH-6q7SpFdzS8Cf0oTtA2DJIDHmx4,7043
|
57
57
|
qadence/blocks/manipulate.py,sha256=kPmzej7mnWFoqTJA2CkGulT7hcPha0GGPARC8rjZltg,2387
|
58
58
|
qadence/blocks/matrix.py,sha256=unE8mVWBTTcmSLX4le2fHqHFu4fbGeMTK8MrGoPsVRY,4036
|
59
|
-
qadence/blocks/primitive.py,sha256=
|
59
|
+
qadence/blocks/primitive.py,sha256=GLruKpiFBStWVd_M9mzLr3MqDNPbyaMUzEVB6xV3cPQ,17657
|
60
60
|
qadence/blocks/utils.py,sha256=_ggOmIesfmTtIeldUyiZrKyS5HT5i_R3ZS8ihBCw73E,17700
|
61
61
|
qadence/constructors/__init__.py,sha256=HTVulUFol_RxdCI3Gn2CBKjJ6ue0ALOB6GUuibP0ONE,1000
|
62
62
|
qadence/constructors/ansatze.py,sha256=a7ZTYhfOat7fme_w_NFEUbZrMLSDMrkpu5RrablkeUU,14856
|
@@ -92,33 +92,40 @@ qadence/exceptions/exceptions.py,sha256=4j_VJpx2sZ2Mir5BJUWu4nwb131FY1ygO4q8-Xly
|
|
92
92
|
qadence/measurements/__init__.py,sha256=RIjG9tVJMqhNzyj7maZI250Um0KgHl2PizDcKJag-JU,161
|
93
93
|
qadence/measurements/protocols.py,sha256=mD50R9yPs5bIYH7Efd0BsR0503apiyrsZydi_Q6BJag,1161
|
94
94
|
qadence/measurements/samples.py,sha256=AVvszDwgfKnZ_ooATyTA3270vGeg1V3WO94jsfrTk-8,1200
|
95
|
-
qadence/measurements/shadow.py,sha256=
|
95
|
+
qadence/measurements/shadow.py,sha256=ahyGl-krBqyzm1teMlWes9o1vqSjp4pX-QIYQ_AzNPc,11499
|
96
96
|
qadence/measurements/tomography.py,sha256=Xz_sw-Vo1LOAHFgTiUsEmIn77j__4uuJNwWZz3KmTgE,2679
|
97
|
-
qadence/measurements/utils.py,sha256=
|
97
|
+
qadence/measurements/utils.py,sha256=rGFU2ZoTWdhYrUmVHiSSobzhQri8VTCPC-CW23-Dv5E,6548
|
98
98
|
qadence/mitigations/__init__.py,sha256=RzaxYJftePFMloGhBVSixZ8fSe-ps_Jc-EyPm6xz-bs,159
|
99
99
|
qadence/mitigations/analog_zne.py,sha256=5n1ffjGM1I5sd9TATsB90pKdDh32UTFJ-ZyOHKdM5z0,7821
|
100
100
|
qadence/mitigations/protocols.py,sha256=0TeHvlGTN8_88XNEwrjA97C5BUlrh34wYmx0w6-5Tyw,1622
|
101
|
-
qadence/mitigations/readout.py,sha256=
|
102
|
-
qadence/ml_tools/__init__.py,sha256=
|
103
|
-
qadence/ml_tools/config.py,sha256=
|
101
|
+
qadence/mitigations/readout.py,sha256=nI-voV5N0R7630Cn8t8x9EdV9iB76P0LDkRosy1s0Ec,6631
|
102
|
+
qadence/ml_tools/__init__.py,sha256=a52dLBtUh5rTJ0ks_LREv-txtQ8pQZZhnQaIg28fSOw,936
|
103
|
+
qadence/ml_tools/config.py,sha256=KcwvfyUb1XT-8NkP1ULjaGRNZqJm6dmWnuY9Bl4KZl0,19406
|
104
104
|
qadence/ml_tools/constructors.py,sha256=gPfU-ICudfsByilYK-rFjax3HeTjtf_CqnR8axDy0F0,28081
|
105
|
-
qadence/ml_tools/data.py,sha256=
|
105
|
+
qadence/ml_tools/data.py,sha256=5sAqG9rUtGZPzFlzEDhMjSeOXF8Z0BmszJ_FRzYAy2A,5311
|
106
106
|
qadence/ml_tools/models.py,sha256=DKSVFNC-Iq0-AmBrCZ1kqUpTBHQh_pX_1MqYT8eCG08,17045
|
107
|
-
qadence/ml_tools/optimize_step.py,sha256=
|
107
|
+
qadence/ml_tools/optimize_step.py,sha256=wUnxfWy0c9rEKe41-26On1bPFBwmSYBF4WCGn76oyq8,3376
|
108
108
|
qadence/ml_tools/parameters.py,sha256=gew2Kq_5-RgRpaTvs8eauVhgo0sTqqDQEV6WHFEiLGM,1301
|
109
|
-
qadence/ml_tools/
|
110
|
-
qadence/ml_tools/saveload.py,sha256=B6709ZdqHkg6kCZJmlZhCoWaNJ4ZynJe_W2IoaexLTs,5945
|
109
|
+
qadence/ml_tools/stages.py,sha256=qW2phMIvQBLM3tn2UoGN-ePiBnZoNq5k844eHVnnn8Y,1407
|
111
110
|
qadence/ml_tools/tensors.py,sha256=xZ9ZRzOqEaMgLUGWQf1najDmL6iLuN1ojCGVFs1Tm94,1337
|
112
|
-
qadence/ml_tools/
|
113
|
-
qadence/ml_tools/train_no_grad.py,sha256=jUjnsxvWMrAa-7NV1bewpAo6mV9grF02gwBHy0SVTws,7249
|
111
|
+
qadence/ml_tools/trainer.py,sha256=u9Mxv9WwRlYScLozT1Qltf1tNYLAUgn3oiz2E8bLpx0,26803
|
114
112
|
qadence/ml_tools/utils.py,sha256=PW8FyoV0mG_DtN1U8njTDV5qxZ0EK4mnFwMAsLBArfk,1410
|
115
|
-
qadence/
|
116
|
-
qadence/
|
117
|
-
qadence/
|
113
|
+
qadence/ml_tools/callbacks/__init__.py,sha256=XaUKmyQZaqxI0jvKnWCpIBgnX5y4Kczcbn2FRiomFu4,655
|
114
|
+
qadence/ml_tools/callbacks/callback.py,sha256=F9tbXBBv3ZKTFbm0fGBZIZtTRO63jLazMk_oeL77dyE,16289
|
115
|
+
qadence/ml_tools/callbacks/callbackmanager.py,sha256=HwxgbqJi1GWYg2lgUqEyw9Y6a71YG_m5DmhpaeB6kLs,8007
|
116
|
+
qadence/ml_tools/callbacks/saveload.py,sha256=2z8v1A3qIIPZuusEcSNqgYTnKGKkDj71KvY_atJvKnM,6015
|
117
|
+
qadence/ml_tools/callbacks/writer_registry.py,sha256=FVM13j1-mv1Qt-v2QgkRFSB_uQ1bmezr5v6UKfeh3as,15264
|
118
|
+
qadence/ml_tools/loss/__init__.py,sha256=d_0FlisdmgLY0qL1PeaabbcWX1B42RBdm7220cfzSN4,247
|
119
|
+
qadence/ml_tools/loss/loss.py,sha256=Bditg8nelMEpG4Yt0aopcAQz84xIc6O-AGUO2M0nqbM,2982
|
120
|
+
qadence/ml_tools/train_utils/__init__.py,sha256=1A2FlFg7kn68R1fdRC73S8DzA9gkBW7whdNHjzH5UTA,235
|
121
|
+
qadence/ml_tools/train_utils/base_trainer.py,sha256=giOcBRMjgbq9sLjqck6MCWH8V1MCVBHarWuFrS-ahbw,20442
|
122
|
+
qadence/ml_tools/train_utils/config_manager.py,sha256=dps94qfiwjhoY_aQp5RvQPd9zW_MIN2knw1UaDaYrKs,6896
|
123
|
+
qadence/noise/__init__.py,sha256=tnChHv7FzOaV8C7O0P2l_gfjrpmHg8JaNhZprL33CP4,161
|
124
|
+
qadence/noise/protocols.py,sha256=SPHJi5AiIOcz6U_iXY3ddVHk3cl9UHSDKk49eMTX2QM,8586
|
118
125
|
qadence/operations/__init__.py,sha256=HAAo9VZUTq2H7kcEarChTgTWCIq7LT25-xBxkwE0F9c,1922
|
119
126
|
qadence/operations/analog.py,sha256=v11DSrg-XUbwIAWAWM43y3VQbYKsx2ynx-HimUoC-x0,7435
|
120
127
|
qadence/operations/control_ops.py,sha256=2ABP8fuf2mpJqRooDiBd2p-J-AL1yx3NDRF2TZf3K-c,10253
|
121
|
-
qadence/operations/ham_evo.py,sha256=
|
128
|
+
qadence/operations/ham_evo.py,sha256=brJ11tlwj6UPYkUcnId-BKlzNStsZd0vp9FKHCFTjlM,10642
|
122
129
|
qadence/operations/parametric.py,sha256=kV5d-diaQAoRlqKqoo0CGCbPej6eAxHQXniqfFKff3g,5394
|
123
130
|
qadence/operations/primitive.py,sha256=hDuwWndfPWqchM_98mOMf40qpkuPuwh39DIwHAbzGRo,9944
|
124
131
|
qadence/transpile/__init__.py,sha256=JrrQ4Osc4nNRWWjRGmVn57fWc8WwF92MokhKLRZ1vVA,499
|
@@ -128,9 +135,9 @@ qadence/transpile/circuit.py,sha256=KTh6Gv1czZddFuA1JhNNszheZbwViVixiGh4rGvIgTM,
|
|
128
135
|
qadence/transpile/digitalize.py,sha256=iWRwYAYQsD2INHj0HNbGJriv_3fRCuBW1nDBrwtKSuI,1523
|
129
136
|
qadence/transpile/flatten.py,sha256=EdhSG5WyF56nbnxINNLqrHgY84MRM1YFjT3fR4aph5Q,3427
|
130
137
|
qadence/transpile/invert.py,sha256=KAefHTG2AWr39aengVhXrzCtJPhrZC-ZnL6vYvmbnY0,4867
|
131
|
-
qadence/transpile/noise.py,sha256
|
138
|
+
qadence/transpile/noise.py,sha256=LDcDJtQGkgUPkL2t69gg6AScTb-p3J3SxCDZbYOu1L8,1668
|
132
139
|
qadence/transpile/transpile.py,sha256=6MRRkk1OS279L1fwUQjazA6qlfpbd-T_EJMKT8hAhOU,2721
|
133
|
-
qadence-1.
|
134
|
-
qadence-1.
|
135
|
-
qadence-1.
|
136
|
-
qadence-1.
|
140
|
+
qadence-1.9.1.dist-info/METADATA,sha256=LR5dgYAA874bZyIRlUpSxHmjPY3Ww-Yos7p_LLZtNT0,9842
|
141
|
+
qadence-1.9.1.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
142
|
+
qadence-1.9.1.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
143
|
+
qadence-1.9.1.dist-info/RECORD,,
|