qadence 1.1.1__py3-none-any.whl → 1.2.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 -0
- qadence/analog/__init__.py +4 -2
- qadence/analog/addressing.py +167 -0
- qadence/analog/constants.py +59 -0
- qadence/analog/device.py +82 -0
- qadence/analog/hamiltonian_terms.py +101 -0
- qadence/analog/parse_analog.py +120 -0
- qadence/backend.py +42 -12
- qadence/backends/__init__.py +1 -2
- qadence/backends/api.py +27 -9
- qadence/backends/braket/backend.py +3 -2
- qadence/backends/horqrux/__init__.py +5 -0
- qadence/backends/horqrux/backend.py +216 -0
- qadence/backends/horqrux/config.py +26 -0
- qadence/backends/horqrux/convert_ops.py +273 -0
- qadence/backends/jax_utils.py +45 -0
- qadence/backends/pulser/__init__.py +0 -1
- qadence/backends/pulser/backend.py +31 -15
- qadence/backends/pulser/config.py +19 -10
- qadence/backends/pulser/devices.py +57 -63
- qadence/backends/pulser/pulses.py +70 -12
- qadence/backends/pyqtorch/backend.py +4 -4
- qadence/backends/pyqtorch/config.py +18 -12
- qadence/backends/pyqtorch/convert_ops.py +15 -7
- qadence/backends/utils.py +5 -9
- qadence/blocks/abstract.py +5 -1
- qadence/blocks/analog.py +18 -9
- qadence/blocks/block_to_tensor.py +11 -0
- qadence/blocks/embedding.py +46 -24
- qadence/blocks/primitive.py +81 -9
- qadence/blocks/utils.py +20 -1
- qadence/circuit.py +3 -9
- qadence/constructors/__init__.py +4 -0
- qadence/constructors/feature_maps.py +84 -60
- qadence/constructors/hamiltonians.py +27 -98
- qadence/constructors/rydberg_feature_maps.py +113 -0
- qadence/divergences.py +12 -0
- qadence/engines/__init__.py +0 -0
- qadence/engines/differentiable_backend.py +152 -0
- qadence/engines/jax/__init__.py +8 -0
- qadence/engines/jax/differentiable_backend.py +73 -0
- qadence/engines/jax/differentiable_expectation.py +94 -0
- qadence/engines/torch/__init__.py +4 -0
- qadence/engines/torch/differentiable_backend.py +85 -0
- qadence/extensions.py +21 -9
- qadence/finitediff.py +47 -0
- qadence/mitigations/readout.py +92 -25
- qadence/ml_tools/models.py +10 -3
- qadence/models/qnn.py +88 -23
- qadence/models/quantum_model.py +13 -2
- qadence/operations.py +55 -70
- qadence/parameters.py +24 -13
- qadence/register.py +91 -43
- qadence/transpile/__init__.py +1 -0
- qadence/transpile/apply_fn.py +40 -0
- qadence/types.py +32 -2
- qadence/utils.py +35 -0
- {qadence-1.1.1.dist-info → qadence-1.2.1.dist-info}/METADATA +22 -3
- {qadence-1.1.1.dist-info → qadence-1.2.1.dist-info}/RECORD +62 -44
- {qadence-1.1.1.dist-info → qadence-1.2.1.dist-info}/WHEEL +1 -1
- qadence/analog/interaction.py +0 -198
- qadence/analog/utils.py +0 -132
- /qadence/{backends/pytorch_wrapper.py → engines/torch/differentiable_expectation.py} +0 -0
- {qadence-1.1.1.dist-info → qadence-1.2.1.dist-info}/licenses/LICENSE +0 -0
    
        qadence/register.py
    CHANGED
    
    | @@ -11,12 +11,16 @@ import numpy as np | |
| 11 11 | 
             
            from deepdiff import DeepDiff
         | 
| 12 12 | 
             
            from networkx.classes.reportviews import EdgeView, NodeView
         | 
| 13 13 |  | 
| 14 | 
            +
            from qadence.analog import IdealDevice, RydbergDevice
         | 
| 14 15 | 
             
            from qadence.types import LatticeTopology
         | 
| 15 16 |  | 
| 16 17 | 
             
            # Modules to be automatically added to the qadence namespace
         | 
| 17 18 | 
             
            __all__ = ["Register"]
         | 
| 18 19 |  | 
| 19 20 |  | 
| 21 | 
            +
            DEFAULT_DEVICE = IdealDevice()
         | 
| 22 | 
            +
             | 
| 23 | 
            +
             | 
| 20 24 | 
             
            def _scale_node_positions(graph: nx.Graph, min_distance: float, spacing: float) -> None:
         | 
| 21 25 | 
             
                scaled_nodes = {}
         | 
| 22 26 | 
             
                scale_factor = spacing / min_distance
         | 
| @@ -27,8 +31,14 @@ def _scale_node_positions(graph: nx.Graph, min_distance: float, spacing: float) | |
| 27 31 |  | 
| 28 32 |  | 
| 29 33 | 
             
            class Register:
         | 
| 30 | 
            -
                def __init__( | 
| 31 | 
            -
                     | 
| 34 | 
            +
                def __init__(
         | 
| 35 | 
            +
                    self,
         | 
| 36 | 
            +
                    support: nx.Graph | int,
         | 
| 37 | 
            +
                    spacing: float | None = 1.0,
         | 
| 38 | 
            +
                    device_specs: RydbergDevice = DEFAULT_DEVICE,
         | 
| 39 | 
            +
                ):
         | 
| 40 | 
            +
                    """
         | 
| 41 | 
            +
                    A 2D register of qubits which includes their coordinates.
         | 
| 32 42 |  | 
| 33 43 | 
             
                    It is needed for e.g. analog computing.
         | 
| 34 44 | 
             
                    The coordinates are ignored in backends that don't need them. The easiest
         | 
| @@ -52,21 +62,16 @@ class Register: | |
| 52 62 | 
             
                    reg.draw()
         | 
| 53 63 | 
             
                    ```
         | 
| 54 64 | 
             
                    """
         | 
| 55 | 
            -
                     | 
| 65 | 
            +
                    if device_specs is not None and not isinstance(device_specs, RydbergDevice):
         | 
| 66 | 
            +
                        raise ValueError("Device specs are not valid. Please pass a `RydbergDevice` instance.")
         | 
| 56 67 |  | 
| 57 | 
            -
                     | 
| 58 | 
            -
             | 
| 59 | 
            -
                     | 
| 60 | 
            -
                    self.complete_graph = nx.Graph()
         | 
| 61 | 
            -
                    self.complete_graph.add_nodes_from(support)
         | 
| 62 | 
            -
                    self.complete_graph.add_edges_from(all_edges)
         | 
| 68 | 
            +
                    self.device_specs = device_specs
         | 
| 69 | 
            +
             | 
| 70 | 
            +
                    self.graph = support if isinstance(support, nx.Graph) else alltoall_graph(support)
         | 
| 63 71 |  | 
| 64 72 | 
             
                    if spacing is not None and self.min_distance != 0.0:
         | 
| 65 73 | 
             
                        _scale_node_positions(self.graph, self.min_distance, spacing)
         | 
| 66 74 |  | 
| 67 | 
            -
                    pos_values = nx.get_node_attributes(self.graph, "pos")
         | 
| 68 | 
            -
                    nx.set_node_attributes(self.complete_graph, pos_values, "pos")
         | 
| 69 | 
            -
             | 
| 70 75 | 
             
                @property
         | 
| 71 76 | 
             
                def n_qubits(self) -> int:
         | 
| 72 77 | 
             
                    return len(self.graph)
         | 
| @@ -77,27 +82,43 @@ class Register: | |
| 77 82 | 
             
                    coords: list[tuple],
         | 
| 78 83 | 
             
                    lattice: LatticeTopology | str = LatticeTopology.ARBITRARY,
         | 
| 79 84 | 
             
                    spacing: float | None = None,
         | 
| 85 | 
            +
                    device_specs: RydbergDevice = DEFAULT_DEVICE,
         | 
| 80 86 | 
             
                ) -> Register:
         | 
| 81 87 | 
             
                    graph = nx.Graph()
         | 
| 82 88 | 
             
                    for i, pos in enumerate(coords):
         | 
| 83 89 | 
             
                        graph.add_node(i, pos=pos)
         | 
| 84 | 
            -
                    return cls(graph, spacing)
         | 
| 90 | 
            +
                    return cls(graph, spacing, device_specs)
         | 
| 85 91 |  | 
| 86 92 | 
             
                @classmethod
         | 
| 87 | 
            -
                def line( | 
| 88 | 
            -
                     | 
| 93 | 
            +
                def line(
         | 
| 94 | 
            +
                    cls,
         | 
| 95 | 
            +
                    n_qubits: int,
         | 
| 96 | 
            +
                    spacing: float = 1.0,
         | 
| 97 | 
            +
                    device_specs: RydbergDevice = DEFAULT_DEVICE,
         | 
| 98 | 
            +
                ) -> Register:
         | 
| 99 | 
            +
                    return cls(line_graph(n_qubits), spacing, device_specs)
         | 
| 89 100 |  | 
| 90 101 | 
             
                @classmethod
         | 
| 91 | 
            -
                def circle( | 
| 102 | 
            +
                def circle(
         | 
| 103 | 
            +
                    cls,
         | 
| 104 | 
            +
                    n_qubits: int,
         | 
| 105 | 
            +
                    spacing: float = 1.0,
         | 
| 106 | 
            +
                    device_specs: RydbergDevice = DEFAULT_DEVICE,
         | 
| 107 | 
            +
                ) -> Register:
         | 
| 92 108 | 
             
                    graph = nx.grid_2d_graph(n_qubits, 1, periodic=True)
         | 
| 93 109 | 
             
                    graph = nx.relabel_nodes(graph, {(i, 0): i for i in range(n_qubits)})
         | 
| 94 110 | 
             
                    coords = nx.circular_layout(graph)
         | 
| 95 111 | 
             
                    values = {i: {"pos": pos} for i, pos in coords.items()}
         | 
| 96 112 | 
             
                    nx.set_node_attributes(graph, values)
         | 
| 97 | 
            -
                    return cls(graph, spacing)
         | 
| 113 | 
            +
                    return cls(graph, spacing, device_specs)
         | 
| 98 114 |  | 
| 99 115 | 
             
                @classmethod
         | 
| 100 | 
            -
                def square( | 
| 116 | 
            +
                def square(
         | 
| 117 | 
            +
                    cls,
         | 
| 118 | 
            +
                    qubits_side: int,
         | 
| 119 | 
            +
                    spacing: float = 1.0,
         | 
| 120 | 
            +
                    device_specs: RydbergDevice = DEFAULT_DEVICE,
         | 
| 121 | 
            +
                ) -> Register:
         | 
| 101 122 | 
             
                    n_points = 4 * (qubits_side - 1)
         | 
| 102 123 |  | 
| 103 124 | 
             
                    def gen_points() -> np.ndarray:
         | 
| @@ -122,35 +143,52 @@ class Register: | |
| 122 143 | 
             
                    graph = nx.relabel_nodes(graph, {(i, 0): i for i in range(n_points)})
         | 
| 123 144 | 
             
                    values = {i: {"pos": point} for i, point in zip(graph.nodes, gen_points())}
         | 
| 124 145 | 
             
                    nx.set_node_attributes(graph, values)
         | 
| 125 | 
            -
                    return cls(graph, spacing)
         | 
| 146 | 
            +
                    return cls(graph, spacing, device_specs)
         | 
| 126 147 |  | 
| 127 148 | 
             
                @classmethod
         | 
| 128 | 
            -
                def all_to_all( | 
| 129 | 
            -
                     | 
| 149 | 
            +
                def all_to_all(
         | 
| 150 | 
            +
                    cls,
         | 
| 151 | 
            +
                    n_qubits: int,
         | 
| 152 | 
            +
                    spacing: float = 1.0,
         | 
| 153 | 
            +
                    device_specs: RydbergDevice = DEFAULT_DEVICE,
         | 
| 154 | 
            +
                ) -> Register:
         | 
| 155 | 
            +
                    return cls(alltoall_graph(n_qubits), spacing, device_specs)
         | 
| 130 156 |  | 
| 131 157 | 
             
                @classmethod
         | 
| 132 158 | 
             
                def rectangular_lattice(
         | 
| 133 | 
            -
                    cls, | 
| 159 | 
            +
                    cls,
         | 
| 160 | 
            +
                    qubits_row: int,
         | 
| 161 | 
            +
                    qubits_col: int,
         | 
| 162 | 
            +
                    spacing: float = 1.0,
         | 
| 163 | 
            +
                    device_specs: RydbergDevice = DEFAULT_DEVICE,
         | 
| 134 164 | 
             
                ) -> Register:
         | 
| 135 165 | 
             
                    graph = nx.grid_2d_graph(qubits_col, qubits_row)
         | 
| 136 166 | 
             
                    values = {i: {"pos": node} for (i, node) in enumerate(graph.nodes)}
         | 
| 137 167 | 
             
                    graph = nx.relabel_nodes(graph, {(i, j): k for k, (i, j) in enumerate(graph.nodes)})
         | 
| 138 168 | 
             
                    nx.set_node_attributes(graph, values)
         | 
| 139 | 
            -
                    return cls(graph, spacing)
         | 
| 169 | 
            +
                    return cls(graph, spacing, device_specs)
         | 
| 140 170 |  | 
| 141 171 | 
             
                @classmethod
         | 
| 142 172 | 
             
                def triangular_lattice(
         | 
| 143 | 
            -
                    cls, | 
| 173 | 
            +
                    cls,
         | 
| 174 | 
            +
                    n_cells_row: int,
         | 
| 175 | 
            +
                    n_cells_col: int,
         | 
| 176 | 
            +
                    spacing: float = 1.0,
         | 
| 177 | 
            +
                    device_specs: RydbergDevice = DEFAULT_DEVICE,
         | 
| 144 178 | 
             
                ) -> Register:
         | 
| 145 | 
            -
                    return cls(triangular_lattice_graph(n_cells_row, n_cells_col), spacing)
         | 
| 179 | 
            +
                    return cls(triangular_lattice_graph(n_cells_row, n_cells_col), spacing, device_specs)
         | 
| 146 180 |  | 
| 147 181 | 
             
                @classmethod
         | 
| 148 182 | 
             
                def honeycomb_lattice(
         | 
| 149 | 
            -
                    cls, | 
| 183 | 
            +
                    cls,
         | 
| 184 | 
            +
                    n_cells_row: int,
         | 
| 185 | 
            +
                    n_cells_col: int,
         | 
| 186 | 
            +
                    spacing: float = 1.0,
         | 
| 187 | 
            +
                    device_specs: RydbergDevice = DEFAULT_DEVICE,
         | 
| 150 188 | 
             
                ) -> Register:
         | 
| 151 189 | 
             
                    graph = nx.hexagonal_lattice_graph(n_cells_row, n_cells_col)
         | 
| 152 190 | 
             
                    graph = nx.relabel_nodes(graph, {(i, j): k for k, (i, j) in enumerate(graph.nodes)})
         | 
| 153 | 
            -
                    return cls(graph, spacing)
         | 
| 191 | 
            +
                    return cls(graph, spacing, device_specs)
         | 
| 154 192 |  | 
| 155 193 | 
             
                @classmethod
         | 
| 156 194 | 
             
                def lattice(cls, topology: LatticeTopology | str, *args: Any, **kwargs: Any) -> Register:
         | 
| @@ -166,25 +204,29 @@ class Register: | |
| 166 204 | 
             
                    return self.graph.nodes[item]
         | 
| 167 205 |  | 
| 168 206 | 
             
                @property
         | 
| 169 | 
            -
                def  | 
| 170 | 
            -
                    return  | 
| 171 | 
            -
             | 
| 172 | 
            -
                @property
         | 
| 173 | 
            -
                def coords(self) -> dict:
         | 
| 174 | 
            -
                    return {i: tuple(node.get("pos", ())) for i, node in self.graph.nodes.items()}
         | 
| 207 | 
            +
                def nodes(self) -> NodeView:
         | 
| 208 | 
            +
                    return self.graph.nodes
         | 
| 175 209 |  | 
| 176 210 | 
             
                @property
         | 
| 177 211 | 
             
                def edges(self) -> EdgeView:
         | 
| 178 212 | 
             
                    return self.graph.edges
         | 
| 179 213 |  | 
| 180 214 | 
             
                @property
         | 
| 181 | 
            -
                def  | 
| 182 | 
            -
                    return self. | 
| 215 | 
            +
                def support(self) -> set:
         | 
| 216 | 
            +
                    return set(self.nodes)
         | 
| 217 | 
            +
             | 
| 218 | 
            +
                @property
         | 
| 219 | 
            +
                def coords(self) -> dict:
         | 
| 220 | 
            +
                    return {i: tuple(node.get("pos", ())) for i, node in self.nodes.items()}
         | 
| 221 | 
            +
             | 
| 222 | 
            +
                @property
         | 
| 223 | 
            +
                def all_node_pairs(self) -> EdgeView:
         | 
| 224 | 
            +
                    return list(filter(lambda x: x[0] < x[1], product(self.support, self.support)))
         | 
| 183 225 |  | 
| 184 226 | 
             
                @property
         | 
| 185 227 | 
             
                def distances(self) -> dict:
         | 
| 186 228 | 
             
                    coords = self.coords
         | 
| 187 | 
            -
                    return {edge: dist(coords[edge[0]], coords[edge[1]]) for edge in self. | 
| 229 | 
            +
                    return {edge: dist(coords[edge[0]], coords[edge[1]]) for edge in self.all_node_pairs}
         | 
| 188 230 |  | 
| 189 231 | 
             
                @property
         | 
| 190 232 | 
             
                def edge_distances(self) -> dict:
         | 
| @@ -197,21 +239,27 @@ class Register: | |
| 197 239 | 
             
                    value: float = min(self.distances.values()) if len(distances) > 0 else 0.0
         | 
| 198 240 | 
             
                    return value
         | 
| 199 241 |  | 
| 200 | 
            -
                @property
         | 
| 201 | 
            -
                def nodes(self) -> NodeView:
         | 
| 202 | 
            -
                    return self.graph.nodes
         | 
| 203 | 
            -
             | 
| 204 242 | 
             
                def rescale_coords(self, scaling: float) -> Register:
         | 
| 205 243 | 
             
                    g = deepcopy(self.graph)
         | 
| 206 244 | 
             
                    _scale_node_positions(g, min_distance=1.0, spacing=scaling)
         | 
| 207 | 
            -
                    return Register(g, spacing=None)
         | 
| 245 | 
            +
                    return Register(g, spacing=None, device_specs=self.device_specs)
         | 
| 208 246 |  | 
| 209 247 | 
             
                def _to_dict(self) -> dict:
         | 
| 210 | 
            -
                    return { | 
| 248 | 
            +
                    return {
         | 
| 249 | 
            +
                        "graph": nx.node_link_data(self.graph),
         | 
| 250 | 
            +
                        "device_specs": self.device_specs._to_dict(),
         | 
| 251 | 
            +
                    }
         | 
| 211 252 |  | 
| 212 253 | 
             
                @classmethod
         | 
| 213 254 | 
             
                def _from_dict(cls, d: dict) -> Register:
         | 
| 214 | 
            -
                     | 
| 255 | 
            +
                    device_dict = d.get("device_specs", None)
         | 
| 256 | 
            +
                    if device_dict is None:
         | 
| 257 | 
            +
                        device_dict = DEFAULT_DEVICE._to_dict()
         | 
| 258 | 
            +
             | 
| 259 | 
            +
                    return cls(
         | 
| 260 | 
            +
                        support=nx.node_link_graph(d["graph"]),
         | 
| 261 | 
            +
                        device_specs=RydbergDevice._from_dict(device_dict),
         | 
| 262 | 
            +
                    )
         | 
| 215 263 |  | 
| 216 264 | 
             
                def __eq__(self, other: object) -> bool:
         | 
| 217 265 | 
             
                    if not isinstance(other, Register):
         | 
    
        qadence/transpile/__init__.py
    CHANGED
    
    
| @@ -0,0 +1,40 @@ | |
| 1 | 
            +
            from __future__ import annotations
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            from typing import Any, Callable
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            from qadence.blocks import AbstractBlock, CompositeBlock, add, chain, kron
         | 
| 6 | 
            +
            from qadence.blocks.analog import AnalogChain
         | 
| 7 | 
            +
             | 
| 8 | 
            +
            COMPOSE_FN_DICT = {
         | 
| 9 | 
            +
                "ChainBlock": chain,
         | 
| 10 | 
            +
                "AnalogChain": chain,
         | 
| 11 | 
            +
                "KronBlock": kron,
         | 
| 12 | 
            +
                "AnalogKron": kron,
         | 
| 13 | 
            +
                "AddBlock": add,
         | 
| 14 | 
            +
            }
         | 
| 15 | 
            +
             | 
| 16 | 
            +
             | 
| 17 | 
            +
            def apply_fn_to_blocks(
         | 
| 18 | 
            +
                input_block: AbstractBlock, block_fn: Callable, *args: Any, **kwargs: Any
         | 
| 19 | 
            +
            ) -> AbstractBlock:
         | 
| 20 | 
            +
                """
         | 
| 21 | 
            +
                Recurses through the block tree and applies a given function to all the leaf blocks.
         | 
| 22 | 
            +
             | 
| 23 | 
            +
                Arguments:
         | 
| 24 | 
            +
                    input_block: tree of blocks on which to apply the recurse.
         | 
| 25 | 
            +
                    block_fn: callable function to apply to each leaf block.
         | 
| 26 | 
            +
                    args: any positional arguments to pass to the leaf function.
         | 
| 27 | 
            +
                    kwargs: any keyword arguments to pass to the leaf function.
         | 
| 28 | 
            +
                """
         | 
| 29 | 
            +
             | 
| 30 | 
            +
                if isinstance(input_block, (CompositeBlock, AnalogChain)):
         | 
| 31 | 
            +
                    parsed_blocks = [
         | 
| 32 | 
            +
                        apply_fn_to_blocks(block, block_fn, *args, **kwargs) for block in input_block.blocks
         | 
| 33 | 
            +
                    ]
         | 
| 34 | 
            +
                    compose_fn = COMPOSE_FN_DICT[type(input_block).__name__]
         | 
| 35 | 
            +
                    output_block = compose_fn(*parsed_blocks)  # type: ignore [arg-type]
         | 
| 36 | 
            +
                else:
         | 
| 37 | 
            +
                    # AnalogKrons are considered as a leaf block
         | 
| 38 | 
            +
                    output_block = block_fn(input_block, *args, **kwargs)
         | 
| 39 | 
            +
             | 
| 40 | 
            +
                return output_block
         | 
    
        qadence/types.py
    CHANGED
    
    | @@ -2,10 +2,11 @@ from __future__ import annotations | |
| 2 2 |  | 
| 3 3 | 
             
            import importlib
         | 
| 4 4 | 
             
            from enum import Enum
         | 
| 5 | 
            -
            from typing import Iterable, Tuple, Union
         | 
| 5 | 
            +
            from typing import Callable, Iterable, Tuple, Union
         | 
| 6 6 |  | 
| 7 7 | 
             
            import numpy as np
         | 
| 8 8 | 
             
            import sympy
         | 
| 9 | 
            +
            from numpy.typing import ArrayLike
         | 
| 9 10 | 
             
            from torch import Tensor, pi
         | 
| 10 11 |  | 
| 11 12 | 
             
            TNumber = Union[int, float, complex]
         | 
| @@ -39,6 +40,7 @@ __all__ = [ | |
| 39 40 | 
             
                "DiffMode",
         | 
| 40 41 | 
             
                "BackendName",
         | 
| 41 42 | 
             
                "Interaction",
         | 
| 43 | 
            +
                "DeviceType",
         | 
| 42 44 | 
             
                "OverlapMethod",
         | 
| 43 45 | 
             
                "AlgoHEvo",
         | 
| 44 46 | 
             
                "SerializationFormat",
         | 
| @@ -163,7 +165,7 @@ class QubitSupportType(StrEnum): | |
| 163 165 | 
             
            class Interaction(StrEnum):
         | 
| 164 166 | 
             
                """Interaction types used in.
         | 
| 165 167 |  | 
| 166 | 
            -
                - ` | 
| 168 | 
            +
                - `RydbergDevice`.
         | 
| 167 169 | 
             
                - [`hamiltonian_factory`][qadence.constructors.hamiltonians.hamiltonian_factory].
         | 
| 168 170 | 
             
                """
         | 
| 169 171 |  | 
| @@ -177,6 +179,16 @@ class Interaction(StrEnum): | |
| 177 179 | 
             
                """XYZ Interaction."""
         | 
| 178 180 |  | 
| 179 181 |  | 
| 182 | 
            +
            class DeviceType(StrEnum):
         | 
| 183 | 
            +
                """Supported types of devices for Pulser backend."""
         | 
| 184 | 
            +
             | 
| 185 | 
            +
                IDEALIZED = "IdealDevice"
         | 
| 186 | 
            +
                """Idealized device, least realistic."""
         | 
| 187 | 
            +
             | 
| 188 | 
            +
                REALISTIC = "RealisticDevice"
         | 
| 189 | 
            +
                """Device with realistic specs."""
         | 
| 190 | 
            +
             | 
| 191 | 
            +
             | 
| 180 192 | 
             
            class _BackendName(StrEnum):
         | 
| 181 193 | 
             
                """The available backends for running circuits."""
         | 
| 182 194 |  | 
| @@ -186,6 +198,8 @@ class _BackendName(StrEnum): | |
| 186 198 | 
             
                """The Braket backend."""
         | 
| 187 199 | 
             
                PULSER = "pulser"
         | 
| 188 200 | 
             
                """The Pulser backend."""
         | 
| 201 | 
            +
                HORQRUX = "horqrux"
         | 
| 202 | 
            +
                """The horqrux backend."""
         | 
| 189 203 |  | 
| 190 204 |  | 
| 191 205 | 
             
            # If proprietary qadence_extensions is available, import the
         | 
| @@ -368,3 +382,19 @@ class OpName(StrEnum): | |
| 368 382 | 
             
                """The entanglement operation."""
         | 
| 369 383 | 
             
                WAIT = "wait"
         | 
| 370 384 | 
             
                """The wait operation."""
         | 
| 385 | 
            +
                PROJ = "Projector"
         | 
| 386 | 
            +
                """The projector operation."""
         | 
| 387 | 
            +
             | 
| 388 | 
            +
             | 
| 389 | 
            +
            class ReadOutOptimization(StrEnum):
         | 
| 390 | 
            +
                MLE = "mle"
         | 
| 391 | 
            +
                CONSTRAINED = "constrained"
         | 
| 392 | 
            +
             | 
| 393 | 
            +
             | 
| 394 | 
            +
            class Engine(StrEnum):
         | 
| 395 | 
            +
                TORCH = "torch"
         | 
| 396 | 
            +
                JAX = "jax"
         | 
| 397 | 
            +
             | 
| 398 | 
            +
             | 
| 399 | 
            +
            ParamDictType = dict[str, ArrayLike]
         | 
| 400 | 
            +
            DifferentiableExpression = Callable[..., ArrayLike]
         | 
    
        qadence/utils.py
    CHANGED
    
    | @@ -205,3 +205,38 @@ def _round_complex(t: torch.Tensor, decimals: int = 4) -> torch.Tensor: | |
| 205 205 |  | 
| 206 206 | 
             
                fn = torch.vmap(_round)
         | 
| 207 207 | 
             
                return fn(t)
         | 
| 208 | 
            +
             | 
| 209 | 
            +
             | 
| 210 | 
            +
            def is_qadence_shape(state: torch.Tensor, n_qubits: int) -> bool:
         | 
| 211 | 
            +
                if len(state.size()) < 2:
         | 
| 212 | 
            +
                    raise ValueError(
         | 
| 213 | 
            +
                        f"Provided state is required to have atleast two dimensions. Got shape {state.shape}"
         | 
| 214 | 
            +
                    )
         | 
| 215 | 
            +
                return state.shape[1] == 2**n_qubits  # type: ignore[no-any-return]
         | 
| 216 | 
            +
             | 
| 217 | 
            +
             | 
| 218 | 
            +
            def infer_batchsize(param_values: dict[str, torch.Tensor] = None) -> int:
         | 
| 219 | 
            +
                """Infer the batch_size through the length of the parameter tensors."""
         | 
| 220 | 
            +
                try:
         | 
| 221 | 
            +
                    return max([len(tensor) for tensor in param_values.values()]) if param_values else 1
         | 
| 222 | 
            +
                except Exception:
         | 
| 223 | 
            +
                    return 1
         | 
| 224 | 
            +
             | 
| 225 | 
            +
             | 
| 226 | 
            +
            def validate_values_and_state(
         | 
| 227 | 
            +
                state: torch.Tensor | None, n_qubits: int, param_values: dict[str, torch.Tensor] = None
         | 
| 228 | 
            +
            ) -> None:
         | 
| 229 | 
            +
                if state is not None:
         | 
| 230 | 
            +
                    batch_size_state = (
         | 
| 231 | 
            +
                        state.shape[0] if is_qadence_shape(state, n_qubits=n_qubits) else state.size(-1)
         | 
| 232 | 
            +
                    )
         | 
| 233 | 
            +
                    batch_size_values = infer_batchsize(param_values)
         | 
| 234 | 
            +
                    if batch_size_state != batch_size_values and (
         | 
| 235 | 
            +
                        batch_size_values > 1 and batch_size_state > 1
         | 
| 236 | 
            +
                    ):
         | 
| 237 | 
            +
                        raise ValueError(
         | 
| 238 | 
            +
                            "Batching of parameter values and states is only valid for the cases:\
         | 
| 239 | 
            +
                                        (1) batch_size_values == batch_size_state\
         | 
| 240 | 
            +
                                        (2) batch_size_values == 1 and batch_size_state > 1\
         | 
| 241 | 
            +
                                        (3) batch_size_values > 1 and batch_size_state == 1."
         | 
| 242 | 
            +
                        )
         | 
| @@ -1,6 +1,6 @@ | |
| 1 1 | 
             
            Metadata-Version: 2.1
         | 
| 2 2 | 
             
            Name: qadence
         | 
| 3 | 
            -
            Version: 1. | 
| 3 | 
            +
            Version: 1.2.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>
         | 
| 6 6 | 
             
            License: Apache 2.0
         | 
| @@ -18,8 +18,9 @@ Requires-Dist: deepdiff | |
| 18 18 | 
             
            Requires-Dist: jsonschema
         | 
| 19 19 | 
             
            Requires-Dist: matplotlib
         | 
| 20 20 | 
             
            Requires-Dist: nevergrad
         | 
| 21 | 
            +
            Requires-Dist: numpy
         | 
| 21 22 | 
             
            Requires-Dist: openfermion
         | 
| 22 | 
            -
            Requires-Dist: pyqtorch==1.0. | 
| 23 | 
            +
            Requires-Dist: pyqtorch==1.0.3
         | 
| 23 24 | 
             
            Requires-Dist: rich
         | 
| 24 25 | 
             
            Requires-Dist: scipy
         | 
| 25 26 | 
             
            Requires-Dist: sympytorch>=0.1.2
         | 
| @@ -27,10 +28,25 @@ Requires-Dist: tensorboard>=2.12.0 | |
| 27 28 | 
             
            Requires-Dist: torch
         | 
| 28 29 | 
             
            Provides-Extra: all
         | 
| 29 30 | 
             
            Requires-Dist: amazon-braket-sdk; extra == 'all'
         | 
| 31 | 
            +
            Requires-Dist: einops; extra == 'all'
         | 
| 32 | 
            +
            Requires-Dist: flax; extra == 'all'
         | 
| 30 33 | 
             
            Requires-Dist: graphviz; extra == 'all'
         | 
| 34 | 
            +
            Requires-Dist: horqrux==0.3.0; extra == 'all'
         | 
| 35 | 
            +
            Requires-Dist: jax; extra == 'all'
         | 
| 36 | 
            +
            Requires-Dist: jaxopt; extra == 'all'
         | 
| 37 | 
            +
            Requires-Dist: optax; extra == 'all'
         | 
| 31 38 | 
             
            Requires-Dist: pulser>=0.15.2; extra == 'all'
         | 
| 39 | 
            +
            Requires-Dist: sympy2jax; extra == 'all'
         | 
| 32 40 | 
             
            Provides-Extra: braket
         | 
| 33 41 | 
             
            Requires-Dist: amazon-braket-sdk; extra == 'braket'
         | 
| 42 | 
            +
            Provides-Extra: horqrux
         | 
| 43 | 
            +
            Requires-Dist: einops; extra == 'horqrux'
         | 
| 44 | 
            +
            Requires-Dist: flax; extra == 'horqrux'
         | 
| 45 | 
            +
            Requires-Dist: horqrux==0.3.0; extra == 'horqrux'
         | 
| 46 | 
            +
            Requires-Dist: jax; extra == 'horqrux'
         | 
| 47 | 
            +
            Requires-Dist: jaxopt; extra == 'horqrux'
         | 
| 48 | 
            +
            Requires-Dist: optax; extra == 'horqrux'
         | 
| 49 | 
            +
            Requires-Dist: sympy2jax; extra == 'horqrux'
         | 
| 34 50 | 
             
            Provides-Extra: pulser
         | 
| 35 51 | 
             
            Requires-Dist: pasqal-cloud>=0.3.5; extra == 'pulser'
         | 
| 36 52 | 
             
            Requires-Dist: pulser>=v0.15.2; extra == 'pulser'
         | 
| @@ -74,12 +90,15 @@ Qadence is available on [PyPI](https://pypi.org/project/qadence/) and can be ins | |
| 74 90 | 
             
            pip install qadence
         | 
| 75 91 | 
             
            ```
         | 
| 76 92 |  | 
| 77 | 
            -
            The default, pre-installed backend for Qadence is [PyQTorch](https://github.com/pasqal-io/pyqtorch), a differentiable state vector simulator for digital-analog simulation | 
| 93 | 
            +
            The default, pre-installed backend for Qadence is [PyQTorch](https://github.com/pasqal-io/pyqtorch), a differentiable state vector simulator for digital-analog simulation based on `PyTorch`. It is possible to install additional, `PyTorch` -based backends and the circuit visualization library using the following extras:
         | 
| 78 94 |  | 
| 79 95 | 
             
            * `pulser`: The [Pulser](https://github.com/pasqal-io/Pulser) backend for composing, simulating and executing pulse sequences for neutral-atom quantum devices.
         | 
| 80 96 | 
             
            * `braket`: The [Braket](https://github.com/amazon-braket/amazon-braket-sdk-python) backend, an open source library that provides a framework for interacting with quantum computing hardware devices through Amazon Braket.
         | 
| 81 97 | 
             
            * `visualization`: A visualization library to display quantum circuit diagrams.
         | 
| 82 98 |  | 
| 99 | 
            +
            Qadence also supports a `JAX` engine which is currently supporting the [Horqrux](https://github.com/pasqal-io/horqrux) backend. `horqrux` is currently only available via the [low-level API](examples/backends/low_level/horqrux_backend.py).
         | 
| 100 | 
            +
             | 
| 101 | 
            +
             | 
| 83 102 | 
             
            To install individual extras, use the following syntax (**IMPORTANT** Make sure to use quotes):
         | 
| 84 103 |  | 
| 85 104 | 
             
            ```bash
         | 
| @@ -1,63 +1,72 @@ | |
| 1 | 
            -
            qadence/__init__.py,sha256= | 
| 2 | 
            -
            qadence/backend.py,sha256= | 
| 3 | 
            -
            qadence/circuit.py,sha256= | 
| 1 | 
            +
            qadence/__init__.py,sha256=XxVbw_UToWu0PUKxOg2C42lYT22cgQH_ysy8PRGT0q0,1707
         | 
| 2 | 
            +
            qadence/backend.py,sha256=M8uCxZhom7N2I454ghZBnMwy2_VoRLXoNJr1_IthNb0,15479
         | 
| 3 | 
            +
            qadence/circuit.py,sha256=EGBPRRWlK-mcXaaAhJnp-hxVWQ8NxngGKbvhPqrEeKM,6892
         | 
| 4 4 | 
             
            qadence/decompose.py,sha256=_L0hI3SbYErXEDp-aXFeNk0JR9ffJ_JD_EnRJbJKT20,5230
         | 
| 5 | 
            -
            qadence/divergences.py,sha256= | 
| 5 | 
            +
            qadence/divergences.py,sha256=JhpELhWSnuDvQxa9hJp_DE3EQg2Ban-Ta0mHZ_fVrHg,1832
         | 
| 6 6 | 
             
            qadence/execution.py,sha256=zczhPbBOf91PtAso0fe3uHxnseXyJ5QHMw7melB4XmQ,9134
         | 
| 7 | 
            -
            qadence/extensions.py,sha256= | 
| 7 | 
            +
            qadence/extensions.py,sha256=eqZ7_M2mht39zqXxWMHubDJCr9li9lLUu0XnWsfkbfE,4487
         | 
| 8 | 
            +
            qadence/finitediff.py,sha256=TijuaWUbX9VlbLyMYco6HkK9eCoRTVnKug4Ekd6mlTI,1592
         | 
| 8 9 | 
             
            qadence/logger.py,sha256=mdTr52nL30ipPRwp11nIHKLEoB3hqs7J-Mric5KVfyM,912
         | 
| 9 | 
            -
            qadence/operations.py,sha256= | 
| 10 | 
            +
            qadence/operations.py,sha256=7xsc3yXzngGoEHF6iaTeIHjrDKRuFhxgcxjPNoeQDH0,37143
         | 
| 10 11 | 
             
            qadence/overlap.py,sha256=3vsg0HLOO3X8LiVgvjSc5s-cs8Di4TpEA657LWZ5HEY,17294
         | 
| 11 | 
            -
            qadence/parameters.py,sha256= | 
| 12 | 
            +
            qadence/parameters.py,sha256=svZ3L-Z4pzm2PkPDIlb-DWkwGOQLAm1eECCtu7nd3W0,12334
         | 
| 12 13 | 
             
            qadence/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
         | 
| 13 14 | 
             
            qadence/qubit_support.py,sha256=Nkn1Q01RVViTcggSIom7EFKdWpAuM4TMGwBZ5feCUxA,2120
         | 
| 14 | 
            -
            qadence/register.py,sha256= | 
| 15 | 
            +
            qadence/register.py,sha256=cBMzwZ7GWZ5ieuFt0bpproEI6a2ncNwfjj7ic379zyg,10276
         | 
| 15 16 | 
             
            qadence/serialization.py,sha256=BmBCFVAeLOL7KCYhUIN38cA43mA0tc5R7l0Fm2xtABU,11702
         | 
| 16 17 | 
             
            qadence/states.py,sha256=p5J4-aceTHxLK89DLC191K1H5c3y6gb2dd-I5YPqBMo,14343
         | 
| 17 | 
            -
            qadence/types.py,sha256= | 
| 18 | 
            -
            qadence/utils.py,sha256= | 
| 19 | 
            -
            qadence/analog/__init__.py,sha256= | 
| 20 | 
            -
            qadence/analog/ | 
| 21 | 
            -
            qadence/analog/ | 
| 22 | 
            -
            qadence/ | 
| 18 | 
            +
            qadence/types.py,sha256=pidqyNqpyeYz4KBKjK15Tm70y26FZfKDUwdfYgU9hb8,9586
         | 
| 19 | 
            +
            qadence/utils.py,sha256=sWHQ8C6CVhXsaZif0jKnkiOaxKTG5EXSMDfk_lXmgRE,8257
         | 
| 20 | 
            +
            qadence/analog/__init__.py,sha256=BCyS9R4KUjzUXN0Ax3b0eMo8ZAuSkGoJQVtZ4_pvAFs,279
         | 
| 21 | 
            +
            qadence/analog/addressing.py,sha256=9KsZnmf-UDCy0rco2gvatd8ERlZd0QZGwt7SS_a_DZo,6410
         | 
| 22 | 
            +
            qadence/analog/constants.py,sha256=B2phQoN1ASL8CwM-Dsa1rbraYwGwwPSeiB3HbVe-MPA,1243
         | 
| 23 | 
            +
            qadence/analog/device.py,sha256=nY6esVJEHHJjK2tRZVMjdNy0SHcP3eSGh1Zi55KcX_4,2430
         | 
| 24 | 
            +
            qadence/analog/hamiltonian_terms.py,sha256=9LKidqqEMJTTdXeaxkxP_otTmcv9i4yeJ-JKCLOCK3Y,3421
         | 
| 25 | 
            +
            qadence/analog/parse_analog.py,sha256=L2mh0uU4JwTteInR07pe5gPM4kQz17y9yS2O7n8u-SU,4070
         | 
| 26 | 
            +
            qadence/backends/__init__.py,sha256=ibm7wmZxuIoMYAQxgAx0MsfLYWOVHNWgLwyS1HjMuuI,215
         | 
| 23 27 | 
             
            qadence/backends/adjoint.py,sha256=kX4QX_6UjVJcochm6dSjFHpFYmdV0DQRfXqybNnlRcU,6788
         | 
| 24 | 
            -
            qadence/backends/api.py,sha256= | 
| 28 | 
            +
            qadence/backends/api.py,sha256=6PoK4ydhi2tj9w0ePMQl1G4kEFROoWe3lrkrtQwWxkc,3224
         | 
| 25 29 | 
             
            qadence/backends/gpsr.py,sha256=nGNdXJi59vmEhrkysRscVQbWZs34A8YW9FlD1lolt4o,4356
         | 
| 26 | 
            -
            qadence/backends/ | 
| 27 | 
            -
            qadence/backends/utils.py,sha256= | 
| 30 | 
            +
            qadence/backends/jax_utils.py,sha256=RMs1sSZmPANEKb7ZrMz_H2VJwkrW4WMrfPdWUd5UvKI,1350
         | 
| 31 | 
            +
            qadence/backends/utils.py,sha256=E-IubQ5YWJnKxXlvh0vemof1G7zSBycva2xc_8KQIts,6402
         | 
| 28 32 | 
             
            qadence/backends/braket/__init__.py,sha256=eruyDZKMqkh1LE7eJ980vcrLJbia35uUX6krAP78clI,121
         | 
| 29 | 
            -
            qadence/backends/braket/backend.py,sha256= | 
| 33 | 
            +
            qadence/backends/braket/backend.py,sha256=oZkLQb6kEiFporjlHqJe3j6E8mXnCJZaCi9x5SddsfY,8603
         | 
| 30 34 | 
             
            qadence/backends/braket/config.py,sha256=b9aIdma0DRwC_3A6xUSLdXMCZe6z6kDcAgkp6MxcXIk,603
         | 
| 31 35 | 
             
            qadence/backends/braket/convert_ops.py,sha256=D-hHfYkvxZtMaiK3I286CSsBg8vf854dEigeFgxaQ5Y,3422
         | 
| 32 | 
            -
            qadence/backends/ | 
| 33 | 
            -
            qadence/backends/ | 
| 36 | 
            +
            qadence/backends/horqrux/__init__.py,sha256=0OdVy6cq0oQggV48LO1WXdaZuSkDkz7OYNEPIkNAmfk,140
         | 
| 37 | 
            +
            qadence/backends/horqrux/backend.py,sha256=tnW1jz3ScKQlwNeZ6n64sx33NeT0y4giDjq1NeDNmmA,8052
         | 
| 38 | 
            +
            qadence/backends/horqrux/config.py,sha256=FmXVkN5L01CCB7Ae9Cnmw9bgUWHYC9X3Kp2PAbyfIYI,540
         | 
| 39 | 
            +
            qadence/backends/horqrux/convert_ops.py,sha256=Aaq6SElReoJByE-XMn5OBDkMTKcmMQyfTshE6N-c41k,8717
         | 
| 40 | 
            +
            qadence/backends/pulser/__init__.py,sha256=capQ-eHqwtOeLf4mWsI0BIseAHhiLGie5cFD4-iVhUo,116
         | 
| 41 | 
            +
            qadence/backends/pulser/backend.py,sha256=Yl21WHl_IPVPt_4T1IytsMYN95cgto9BhnqLF2kpaEk,13499
         | 
| 34 42 | 
             
            qadence/backends/pulser/channels.py,sha256=ZF0yEXUFHAmi3IdeXjzdTNGR5NzaRRFTiUpUGVg2sO4,329
         | 
| 35 43 | 
             
            qadence/backends/pulser/cloud.py,sha256=0uUluvbFV9sOuCPraE-9uiVtC3Q8QaDY1IJMDi8grDM,2057
         | 
| 36 | 
            -
            qadence/backends/pulser/config.py,sha256= | 
| 44 | 
            +
            qadence/backends/pulser/config.py,sha256=DdboScn5TrtVwCcsHgZjNCQmWy46aSrf44FhOTJRxaw,3038
         | 
| 37 45 | 
             
            qadence/backends/pulser/convert_ops.py,sha256=0HGWe5kIwI1ZALHf2j68B8aBOhwFNZV-mDy1_6zsF5g,1227
         | 
| 38 | 
            -
            qadence/backends/pulser/devices.py,sha256= | 
| 39 | 
            -
            qadence/backends/pulser/pulses.py,sha256= | 
| 46 | 
            +
            qadence/backends/pulser/devices.py,sha256=KBgyBbdL1ZLllHHoWY5W6Z_aALhxFZMlXABkN7tQsmQ,2439
         | 
| 47 | 
            +
            qadence/backends/pulser/pulses.py,sha256=KwhiW3vcA7bKyYgADA2mHuUiah8J5Ytw2eocmAlasiA,11685
         | 
| 40 48 | 
             
            qadence/backends/pulser/waveforms.py,sha256=0uz95b7rUaUUtN0tuHBZmJ0H6UBmfHST_59ozwsRCzg,2227
         | 
| 41 49 | 
             
            qadence/backends/pyqtorch/__init__.py,sha256=0OdVy6cq0oQggV48LO1WXdaZuSkDkz7OYNEPIkNAmfk,140
         | 
| 42 | 
            -
            qadence/backends/pyqtorch/backend.py,sha256= | 
| 43 | 
            -
            qadence/backends/pyqtorch/config.py,sha256= | 
| 44 | 
            -
            qadence/backends/pyqtorch/convert_ops.py,sha256= | 
| 50 | 
            +
            qadence/backends/pyqtorch/backend.py,sha256=wKAzoKf_eoG2vpmFDD3PFsGGTtRva3UDUL5GH9oZAj8,9457
         | 
| 51 | 
            +
            qadence/backends/pyqtorch/config.py,sha256=f5BjWehCqm9do2OahNWrv2w55y3orkw0Wj2f6flwRaU,1907
         | 
| 52 | 
            +
            qadence/backends/pyqtorch/convert_ops.py,sha256=J20E5Lze2TyxA1ODClSH1d_TC32jr2VuEpDY2zb_yqY,15537
         | 
| 45 53 | 
             
            qadence/blocks/__init__.py,sha256=SXj5NbnJkFcsEeyP4WJ2EfV-frmoL3qzz0XTExpMQpg,940
         | 
| 46 | 
            -
            qadence/blocks/abstract.py,sha256= | 
| 47 | 
            -
            qadence/blocks/analog.py,sha256= | 
| 48 | 
            -
            qadence/blocks/block_to_tensor.py,sha256= | 
| 54 | 
            +
            qadence/blocks/abstract.py,sha256=35RcVlNvD1BmBoJ8bbYJ3LrdU72wixt9ZmTbCtEwNus,11796
         | 
| 55 | 
            +
            qadence/blocks/analog.py,sha256=ySzvniSF89dsTd_GzgAESkv3OVseBgUKkKTAQK7sqVc,10655
         | 
| 56 | 
            +
            qadence/blocks/block_to_tensor.py,sha256=bt28er90ltu1GzRQCz4hziBLKoBgQhC8VZwKTziM1JE,16279
         | 
| 49 57 | 
             
            qadence/blocks/composite.py,sha256=z_lXRBVnh-DdvfZdv6T0ZEmVhlU76zBt72P_FGGa-PQ,8897
         | 
| 50 | 
            -
            qadence/blocks/embedding.py,sha256= | 
| 58 | 
            +
            qadence/blocks/embedding.py,sha256=TQt620UIVaNYHP34tpK9slv-PFiLvTQRYw5Ez9RuImE,6513
         | 
| 51 59 | 
             
            qadence/blocks/manipulate.py,sha256=kPmzej7mnWFoqTJA2CkGulT7hcPha0GGPARC8rjZltg,2387
         | 
| 52 60 | 
             
            qadence/blocks/matrix.py,sha256=XQI6D4CWhCf3j-hvA0jRKOgprs0RA6su7OythCoH6Ls,3785
         | 
| 53 | 
            -
            qadence/blocks/primitive.py,sha256= | 
| 54 | 
            -
            qadence/blocks/utils.py,sha256= | 
| 55 | 
            -
            qadence/constructors/__init__.py,sha256= | 
| 61 | 
            +
            qadence/blocks/primitive.py,sha256=rM-l5wvf3nGCrYFMJ6cI2ULPv_vhw1gxt1zd-77bupM,16716
         | 
| 62 | 
            +
            qadence/blocks/utils.py,sha256=WQKx5e2Uq0TG8bwxFGaMsIbvYFJHfH95TBCVqlpuQ5s,16299
         | 
| 63 | 
            +
            qadence/constructors/__init__.py,sha256=d4ndrNCTCDS_kUYeigGFQOUFSAMaPKL--_FcdZy7eQo,1152
         | 
| 56 64 | 
             
            qadence/constructors/ansatze.py,sha256=PWC6ILioReF6vlS22UevCSLIHGR1HMQpUVPlCyZ4rNY,12026
         | 
| 57 | 
            -
            qadence/constructors/feature_maps.py,sha256= | 
| 58 | 
            -
            qadence/constructors/hamiltonians.py,sha256= | 
| 65 | 
            +
            qadence/constructors/feature_maps.py,sha256=PgbbwYcq2TrvJmn8BZefX2j20BTrVd7axmSVldbJxPk,10569
         | 
| 66 | 
            +
            qadence/constructors/hamiltonians.py,sha256=d-rdOSsI7gEp9pn89M60EYierBpPFmEP3Y3W7BrdbMM,8327
         | 
| 59 67 | 
             
            qadence/constructors/iia.py,sha256=12Dizl1BZwktmp4h4FNm-ISFCRVFkW_EsIAg7rqAo1E,4720
         | 
| 60 68 | 
             
            qadence/constructors/qft.py,sha256=h_wVAEvb6kIr_pzx9RWK8PVsosqDB8np3qvZFkFmbf4,7508
         | 
| 69 | 
            +
            qadence/constructors/rydberg_feature_maps.py,sha256=u_BTGfsgXqKSJb72DP_CyqBCfoSQFI6GRsc-Fqiuw5E,4729
         | 
| 61 70 | 
             
            qadence/constructors/rydberg_hea.py,sha256=GrIrboyjEe1fJEbhtRYeCZ5dYzDVpMt-SQucS9UyNtw,8372
         | 
| 62 71 | 
             
            qadence/constructors/utils.py,sha256=PKVkxD2Ev2OVl-aCC9jl6rTET6iEhDXOWIdXf30w4iw,3073
         | 
| 63 72 | 
             
            qadence/constructors/daqc/__init__.py,sha256=50_4Ak32d5A4CZeR65l0s-0lUsxgKerWNDK7GDmkNY4,140
         | 
| @@ -72,6 +81,14 @@ qadence/draw/assets/dark/measurement.png,sha256=hSMhZZCFKHNO2tCpYTTSYIF-nsAfNalR | |
| 72 81 | 
             
            qadence/draw/assets/dark/measurement.svg,sha256=6ALGjaCX3xZ1NqB6RW6yzOchzZV-j8ukW4aGhEWe4Lk,7282
         | 
| 73 82 | 
             
            qadence/draw/assets/light/measurement.png,sha256=q6AMI7Lmb1O42sEzvSiK9ZtyTpXOGj-zIAh4FiPbhsk,278
         | 
| 74 83 | 
             
            qadence/draw/assets/light/measurement.svg,sha256=kL424wtIEU7ihxecZnthyYnvHhNW_F75daoO9pBHNiw,7282
         | 
| 84 | 
            +
            qadence/engines/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
         | 
| 85 | 
            +
            qadence/engines/differentiable_backend.py,sha256=rrMA-54AC1wx4a1WFQKGZL_YIdgjoyvBGagT0H1bL1Y,5875
         | 
| 86 | 
            +
            qadence/engines/jax/__init__.py,sha256=qcW09lcnblwRVQM6mDmW9su5kDVPe--buWCCuvPbOVM,223
         | 
| 87 | 
            +
            qadence/engines/jax/differentiable_backend.py,sha256=W5rDA8wb-ECnFWoLj4dVugF9v1lecC0t9FTLBWnw2vM,3062
         | 
| 88 | 
            +
            qadence/engines/jax/differentiable_expectation.py,sha256=XBYHT1XKRuZfKxTcNy8KJpSDPt-2PR4ZCanImCPI9OI,3677
         | 
| 89 | 
            +
            qadence/engines/torch/__init__.py,sha256=iZFdD32ot0B0CVyC-f5dVViOBnqoalxa6M9Lj4WQuPE,160
         | 
| 90 | 
            +
            qadence/engines/torch/differentiable_backend.py,sha256=AWthwvKE8pCOih4dZ3tXxQX4W1ps9mBcvo7n4V9V24Y,3553
         | 
| 91 | 
            +
            qadence/engines/torch/differentiable_expectation.py,sha256=PoyglpSg6YGjm2P6y7-urB-oVx_Uq3HoMoyP43sFYuc,15344
         | 
| 75 92 | 
             
            qadence/exceptions/__init__.py,sha256=BU6vWrI9mshzr1aTPm1Ticr_o_42GjTrWI4OZXhThsI,203
         | 
| 76 93 | 
             
            qadence/exceptions/exceptions.py,sha256=4j_VJpx2sZ2Mir5BJUWu4nwb131FY1ygO4q8-XlyfRc,190
         | 
| 77 94 | 
             
            qadence/measurements/__init__.py,sha256=RIjG9tVJMqhNzyj7maZI250Um0KgHl2PizDcKJag-JU,161
         | 
| @@ -81,11 +98,11 @@ qadence/measurements/tomography.py,sha256=TiD6xwD9b7hK0cKoMccAZwpz56rCLz2xb-dZai | |
| 81 98 | 
             
            qadence/mitigations/__init__.py,sha256=RzaxYJftePFMloGhBVSixZ8fSe-ps_Jc-EyPm6xz-bs,159
         | 
| 82 99 | 
             
            qadence/mitigations/analog_zne.py,sha256=6B_rb0Od8sOvzyVwjAb6hM3hCe5Xcr1LnsxL3L9byRk,3579
         | 
| 83 100 | 
             
            qadence/mitigations/protocols.py,sha256=Jq9MyLujfTyWmc7XVUGYVRUkJT1MmZw-GgmWpVjmX2Y,1608
         | 
| 84 | 
            -
            qadence/mitigations/readout.py,sha256= | 
| 101 | 
            +
            qadence/mitigations/readout.py,sha256=HPfYmdjRlieUdOBMZTghFK4DRWfveM4KkDkEI0bMI0E,6262
         | 
| 85 102 | 
             
            qadence/ml_tools/__init__.py,sha256=_H5A_BWZRZVGoJszb9s8XRJnLnJxUNfYjuT9HT2yASo,786
         | 
| 86 103 | 
             
            qadence/ml_tools/config.py,sha256=X8dHyjq4D9-ITjs7UQo0vjJTcHkpbZC0gChH5eEN2G8,2356
         | 
| 87 104 | 
             
            qadence/ml_tools/data.py,sha256=GptMgStgpyLM0nLWT_SCWSkW8DWuhU7EcYEDgUTXXzs,3191
         | 
| 88 | 
            -
            qadence/ml_tools/models.py,sha256= | 
| 105 | 
            +
            qadence/ml_tools/models.py,sha256=BfGPb761riKjl5jpm2VFrk08IZPvDtCAc_lwqJ5QXuM,11096
         | 
| 89 106 | 
             
            qadence/ml_tools/optimize_step.py,sha256=HfDbRPt-sPxq4QT2-8Ur63r11Tty6mgJb3CFPb_7YWs,1540
         | 
| 90 107 | 
             
            qadence/ml_tools/parameters.py,sha256=gew2Kq_5-RgRpaTvs8eauVhgo0sTqqDQEV6WHFEiLGM,1301
         | 
| 91 108 | 
             
            qadence/ml_tools/printing.py,sha256=kwwD9yLVqezaqWX5OAsXr8GLdJUnGrY-t5SnoKHtl9g,707
         | 
| @@ -95,19 +112,20 @@ qadence/ml_tools/train_grad.py,sha256=wKltZZQ911tsUucjZp1uuqng_Zdr1D3vFmlqhqdXEc | |
| 95 112 | 
             
            qadence/ml_tools/train_no_grad.py,sha256=erwus-pUOg8q6WgoQsDW6MeH80wlRPBh69W1ZMHKoL8,4714
         | 
| 96 113 | 
             
            qadence/ml_tools/utils.py,sha256=_GZSN5Flk1nRFutkXih397Q3cWKdX0UP8c9CRXpUL7c,1654
         | 
| 97 114 | 
             
            qadence/models/__init__.py,sha256=0nZzAC2TGr8Yuf40-R7m2cSsr_BlNq_GsMOwaOYZLqM,193
         | 
| 98 | 
            -
            qadence/models/qnn.py,sha256= | 
| 99 | 
            -
            qadence/models/quantum_model.py,sha256= | 
| 115 | 
            +
            qadence/models/qnn.py,sha256=ne261gZn-1JDhCL2rzj-PykhkhP2MWhFlX7Ok7eCqFQ,8586
         | 
| 116 | 
            +
            qadence/models/quantum_model.py,sha256=lADpj_HY1393JjE558ckH4RiiEM5qkYyfdBJ-rVVvXM,12053
         | 
| 100 117 | 
             
            qadence/noise/__init__.py,sha256=r0nR8uEZeB1M9pI2UisjWq0bjw50fPFfVGzIMev923g,147
         | 
| 101 118 | 
             
            qadence/noise/protocols.py,sha256=-aZ06JvMnpxCeT5v5lI_RNPOLbb9Ju1Pi1AB6uAXxVE,1653
         | 
| 102 119 | 
             
            qadence/noise/readout.py,sha256=BqBIZbPXWqZaKi6EpBSpXXQ9NhQXdQ-YL6ZmwbSjgfE,6736
         | 
| 103 | 
            -
            qadence/transpile/__init__.py,sha256= | 
| 120 | 
            +
            qadence/transpile/__init__.py,sha256=lb5LwsYb6lN5YFBsU3YBey7-0OcUQpYa3Q4hG6zmgi0,457
         | 
| 121 | 
            +
            qadence/transpile/apply_fn.py,sha256=glZo2_wMOjw7_KgWKYbqg8j-9SDs-RefWIfxWgdQK8I,1336
         | 
| 104 122 | 
             
            qadence/transpile/block.py,sha256=kuDATVQm-e1EbI22_bl4KzSpby5jfzMtboC_k8T8n6g,11591
         | 
| 105 123 | 
             
            qadence/transpile/circuit.py,sha256=KTh6Gv1czZddFuA1JhNNszheZbwViVixiGh4rGvIgTM,451
         | 
| 106 124 | 
             
            qadence/transpile/digitalize.py,sha256=iWRwYAYQsD2INHj0HNbGJriv_3fRCuBW1nDBrwtKSuI,1523
         | 
| 107 125 | 
             
            qadence/transpile/flatten.py,sha256=EdhSG5WyF56nbnxINNLqrHgY84MRM1YFjT3fR4aph5Q,3427
         | 
| 108 126 | 
             
            qadence/transpile/invert.py,sha256=KAefHTG2AWr39aengVhXrzCtJPhrZC-ZnL6vYvmbnY0,4867
         | 
| 109 127 | 
             
            qadence/transpile/transpile.py,sha256=6MRRkk1OS279L1fwUQjazA6qlfpbd-T_EJMKT8hAhOU,2721
         | 
| 110 | 
            -
            qadence-1. | 
| 111 | 
            -
            qadence-1. | 
| 112 | 
            -
            qadence-1. | 
| 113 | 
            -
            qadence-1. | 
| 128 | 
            +
            qadence-1.2.1.dist-info/METADATA,sha256=S3d0CDfRPyXuASpiupmqW7j6eKkdPcZJcOt0BJ1WafI,7648
         | 
| 129 | 
            +
            qadence-1.2.1.dist-info/WHEEL,sha256=0wCxn4rnLsvRWBK-NC7mK2QMIQ_aZSl7Qvk-8IWl_pY,87
         | 
| 130 | 
            +
            qadence-1.2.1.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
         | 
| 131 | 
            +
            qadence-1.2.1.dist-info/RECORD,,
         |