Tensorkrowch

Latest version: v1.1.2

Safety actively analyzes 626604 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

1.1.2

This release fixes some things regarding the new features added in releases v1.1.0 and v1.1.1:

1. Add `log_scale` argument to `norm` of `MPS`, to return the norm in logarithmic scale.
2. Allow to apply `renormalize` to `StackNodes`, returning also `StackNodes`.
3. Add `tensors` method to `MPS` and `MPO`, to recover the list of all their tensors.
4. Add `update_bond_dim` to update the bond dim of `MPS` and `MPO` when this is changed.
5. Remove the need to set `rank` in `canonicalize` of `MPS` and `MPO` when one wants to set as rank the previous `bond_dim`.
6. Fix renormalization factors in `canonicalize` and `entropy`.

Also, we have added a new section with example notebooks, and an automated test workflow.

1.1.1

This release solves many bugs of release v1.1.0, and adds some new features that should have been in v1.1.0:

1. Change `unit` initialization of `MPS` by `canonical`, and add a new `unit` initialization.
2. Add operation `div`.
3. Add operation `renormalize`.
4. Add argument `renormalize` in `contract` and `partial_density` of `MPS`. Also in `contract` of `MPO`.
5. Change `mi` by `entropy` in `MPS`.
6. Add `canonicalize` to MPO.

1.1.0

The new release adds many new features, mainly affecting the MPS classes:

1. All MPS classes have been restructured. Now, `UMPS`, `MPSLayer` and `UMPSLayer` inherit from `MPS`. Also, the convolutional versions (`ConvMPS`, `ConvUMPS`, `ConvMPSLayer` and `ConvUMPSLayer`) inherit from the respective MPS classes and a new `AbstractConvClass` which defines the convolutional version of the `forward` method.
2. All classes can be instantiated with a given list of `tensors`.
3. The `MPS` class is now more general. One can specify which nodes are used as input, and the rest will be used as output. This is specified via `in_features` or `out_features`. This allows to pass input data with different number of features.
4. Also, the `contract` method is much more flexible. It allows to marginalize all output nodes that have not been contracted with input data. Also, in between this MPS-MPS contraction that is performed when marginalizing, one can add `embedding_matrices`, or an `mpo`.
5. Canonical forms in MPS allow to `renormalize`.
6. Methods `copy` and `parametrize` have been overriden to work better for MPS classes.
7. New methods have been added: `norm`, `partial_density` and `mi`.
8. New class `MPSData` that do not inherit from `MPS` has been added.
9. New classes `MPO` and `UMPO` have been added. These can be used to be contracted with input data nodes, with a `MPSData`, or used as input to a `MPS`.
10. `initialize` method has been extended for all `MPS` classes and `MPO`. For `MPS`, the methods `"randn_eye"` and `"unit"` have been included, in addition to the usual initialization methods of nodes.
11. New embedding functions have been added: `discretize` and `basis`.
12. New submodule `decompositions` has been added, with functions to turn vectors into MPSs (`vec_to_mps`), and matrices into MPOs (`mat_to_mpo`).
13. `StackNodes` can now be reconnected via `stack_1 ^ stack_2`, instead of having to reconnect all their edges.
14. All functions derived from or that call `split`, allow for passing some or all of the arguments `rank`, `cum_percentage` and `cutoff`, instead of only one of them.
15. In-place operations for edges have got their respective non in-place operations, including `contract`, `svd`, `svdr`, `qr` and `rq`.
16. New methods for nodes: `numel`, `change_type` and `is_connected_to`.
17. New methods for `TensorNetwork`: `delete`.
18. `reattach_edges` method of nodes now admits a list of axes, to reattach only the selected edges.
19. The reserved name `"virtual_stack"` has been replaced by `"virtual_result"`.

1.0.1

The C++ extension has been eliminated in favor of pure Python optimizations. These optimizations primarily impact the following operations:

- contract_edges
- contract_between
- stack
- unbind
- einsum

1.0.0

First release of TensorKrowch!

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.