Discopy

Latest version: v1.1.7

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

Scan your dependencies

Page 1 of 7

1.1.7

What's Changed
* Add example to README.md by toumix in https://github.com/discopy/discopy/pull/253
* Fix docs, remove architecture from readme by toumix in https://github.com/discopy/discopy/pull/255
* Fix pregroup swap rotation by toumix in https://github.com/discopy/discopy/pull/258
* Fix documentation, update its dependencies by boldar99 in https://github.com/discopy/discopy/pull/260
* feat: Do not infer dtype when `data` is `None` in `tensor.Box` by boldar99 in https://github.com/discopy/discopy/pull/261
* Update build.yml with versions 3.10 and 3.11 by toumix in https://github.com/discopy/discopy/pull/262
* Fix CRz and CRx gate conversion by y-richie-y in https://github.com/discopy/discopy/pull/263
* Fix scalar too by y-richie-y in https://github.com/discopy/discopy/pull/264
* Fix CZ scalar too by y-richie-y in https://github.com/discopy/discopy/pull/265
* TypeVar argument must be str by toumix in https://github.com/discopy/discopy/pull/267


**Full Changelog**: https://github.com/discopy/discopy/compare/1.1.6...1.1.7

1.1.6

Bug fixes:

- Fix caching mechanism of `NamedGeneric`
- Fix pickling of parametrised classes

1.1.5

New features:
- Unpickling is now backward compatible: pickled diagrams from DisCoPy v0.6 can be unpickled into the current version.
- `Tensor` is now parametrised by the `dtype`.
- A hypergraph equality context manager has been.
- `Discard` has been defined on `Markov` categories
- `Tensor.copy` has been added
- The term "polygynous" has been changed to "left monogamous"

Bug fixes:
- Missing qiskit-aer import has been added
- Missing `Sum` classes has been added to markov
- Broken links in QNLP tutorial has been fixed
- Ribbon rotation has been fixed
- Matrix.swap has been fixed

Notable updates in the documentation:
- Examples from [arXiv:2205.05190](https://arxiv.org/abs/2205.05190) has been added into `docs/notebooks/examples.ipynb`

1.1.4

Fix PennyLane Sympy substitution

1.1.3

- Revert symmetric diagram hashing and equality back to old behaviour, see PR 179
- Fix flake8 coding style 178

1.1.2

New features:

- the `interaction` module implements the Int-construction from balanced to ribbon categories, see PR https://github.com/discopy/discopy/pull/144
- equality of `symmetric.Diagram` computes hypergraph isomorphism, so that we get all the axioms for free
- similarly, we get the axioms of `traced`, `compact`, `markov` and `frobenius` for free
- `Diagram.from_callable` allows to build diagrams as decorated python functions

Main changes:

- `Matrix` now infers the `dtype` if it is not specified, see PR https://github.com/discopy/discopy/pull/161
- `balanced.Diagram` is now a subclass of `traced.Diagram`
- `cartesian` is renamed to `markov` and `frobenius.Diagram` is now a subclass of `markov.Diagram`
- `hypergraph.Diagram` is renamed to just `hypergraph.Hypergraph`
- the new `Hypergraph` class is a named generic parameterised by a `category`, in this way it does not depend on any of symmetric, compact or frobenius
- the `hypergraph.Box` class is not needed anymore, it is replaced by a method `Hypergraph.from_box`
- `upgrade` and `downgrade` are renamed to `from_` and `to_diagram`
- `Hypergraph.is_progressive` now allows spiders to from one input to many outputs

* an extended signature for `Diagram.encode` to allow easier transition from the old v0.5 syntax `(dom, cod, boxes, offsets)`
* a new class `pregroup.Ty` is introduced, it subclasses `rigid.Ty`. It overrides the adjointness check to be more flexible and allow for forbidden cups and caps, e.g. `Cup(n.r, n)`
* `pregroup.Diagram` is now a subclass of `frobenius.Diagram` instead of `rigid`. This allows for spiders and swaps in pregroup diagrams, while retaining the distinction between left and right adjoints
* two new methods `closed.Ty.is_under` and `is_over` to account for the fact that tensoring an exponential object with the empty type does not yield an exponential object
* refactoring of the `quantum` module to make the gate application methods cleaner, removing the need for `Circuit.__getattr__`

Page 1 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.