Releases: Quantinuum/lambeq-docs
Releases · Quantinuum/lambeq-docs
0.5.0-001
0.5.0
Added:
- A new experimental
lambeq.experimental.discocircmodule that contains an efficientlambeq.experimental.discocirc.DisCoCircReaderand all the required functionality for converting long texts and entire multi-paged documents into quantum circuits, based on theDisCoCircframework. - A new tree representation of a pregroup diagram, termed
pregroup tree, is implemented through thelambeq.text2diagram.pregroup_tree.PregroupTreeNodeclass. This lays the groundwork for drastically improving the parsing and internal processing of diagrams. - A new experimental end-to-end parser class,
lambeq.text2diagram.OncillaParser, that simplifies the process of generating diagrams from text, minimizing or even eliminating exposure of the user to CCG representations and functionality. This parser utilises thepregroup treerepresentation of diagrams. This does not replaceBobcatParseras the default parser. - A new
lambeq.backend.grammar.Framedata structure that allows the recursive grouping oflambeqboxes and diagrams and can be seen as aquantum supermapacting on the enclosed arguments. Frames are used inDisCoCircdiagrams. - A new
lambeq.training.PytorchQuantumModelclass that allows Pytorch autograd to be used on quantum circuits, while so far it was possible to use it only on tensor networks (credit: Kin Ian Lo). - A new native
lambeq.backend.symbol.Symbolclass that eliminates any dependencies with SymPy and improves efficiency. - A new rewrite rule class,
lambeq.rewrite.CollapseDomainRewriteRule, that converts boxes into domain-less boxes by uncurrying (credit: Kin Ian Lo). - New
lambeq.backend.Diagram.remove_snakesandlambeq.backend.Diagram.rigid_normal_formmethods that make the specific rewrites also available outside of the originallambeq.backend.Diagram.normal_formmethod (credit: Kin Ian Lo). - Caching options for fast access to already computed tensor contraction paths for tensor network models, specifically
PytorchModelandPytorchQuantumModel. The constructor of these models now takes atn_path_optimizerargument, which can be aTnPathOptimizerobject, replicating the old un-cached behaviour, or aCachedTnPathOptimizerwhich allows caching of the computed tensor contraction paths for quick lookup. - Support for evaluating mixed-scalar PennyLane circuits, i.e. circuits where all qubits are either discarded or post-selected.
- Two new ansätze from the Sim et al. paper (arXiv:1905.10876),
Sim9AnsatzandSim9CxAnsatz. - Support for ancilla qubits in
lambeq's ansätze.
Changed:
- Significantly improved the efficiency of the
PennyLaneModel. - Refactored all models so that they do not depend on
tketas an intermediate step for their conversions. CircuitAnsatznow acts as a dagger functor (credit: Kin Ian Lo).- Refactored
QuantumModelto be less numpy-specific and easier to extend with other backends. - Made the split tensor ansätze, i.e.
SpiderAnsatzandMPSAnsatz, work on boxes with domains. This utilises the newly-implementedCollapseDomainRewriteRule(credit: Kin Ian Lo). - Changed the
devicekeyword argument for model-based parsers, e.g.BobcatParser, so that it follows PyTorch convention and supports multiple types. - Added the new
lambeq.text2diagram.OncillaParseras a parser option to the CLI via the-p oncillaargument. - Removed the deprecated
lambeq.text2diagram.DepCCGParseras a parser option from the CLI. - Refactored tokeniser loading from
SpacyTokeniserinto a new utility functionlambeq.core.utils.get_spacy_tokeniser. - Significantly extended and restructured the documentation pages, fixed various issues, and added more material and tutorials.
- Made
tketan optional dependency.
Fixed:
- Fixed an enum incompatibility with Python > 3.10.
- Fixed the behaviour of tensoring a type with the identity diagram.
- Fixed a
lambeq.backend.Diagram.lambdifymethod error when used with a daggered tensor box (credit: Kin Ian Lo).
0.4.3-007
0.4.3-006
0.4.3-005
0.4.3-004
0.4.3-003
0.4.3-002
0.4.3-001
0.4.3
Changed:
- Documentation has now been moved to a dedicated repository and got a new URL (https://docs.quantinuum.com/lambeq).
- Changed the landing page and some visuals in the online documentation.
- Updated README to reflect the new docs structure.
Fixed:
- Fixed minor issues on some documentation pages and the README file.