Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge developments in preparation for release v0.4 #121

Merged
merged 59 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
cd9a18f
Simplify `Tensor` struct (#99)
mofeing Sep 26, 2023
4af4b94
Remove `length` method for `TensorNetwork`
mofeing Sep 19, 2023
be2e2e9
Format code
mofeing Sep 26, 2023
146838d
Refactor `TensorNetwork` to `@class`
mofeing Oct 4, 2023
6f32e3d
Fix refactor in `ChainRulesCore`,`FiniteDifferences` extensions
mofeing Oct 4, 2023
dc00471
Fix `ProjectTo` to `TensorNetwork`
mofeing Oct 4, 2023
b5b3317
Import `EinExprs.inds` symbol
mofeing Oct 5, 2023
eb5094a
Fix invalidation of `EinExprs.inds` symbol import
mofeing Oct 5, 2023
2c91f0e
Fix refactor on `Makie` extension
mofeing Oct 5, 2023
a941fcd
Fix `Classes` import in `Makie` extension
mofeing Oct 6, 2023
270be2b
Split functionality from `append!(::TensorNetwork)` to `merge!`
mofeing Oct 6, 2023
79027fd
Autoimplement `copy` for `TensorNetwork` subtypes
mofeing Oct 6, 2023
7b48e03
Fix `replace!(::TensorNetwork)` for list of `Pair`s
mofeing Oct 6, 2023
e26b1f0
Fix mutation on `merge(::TensorNetwork)`
mofeing Oct 6, 2023
4e8ea4b
Refactor `Quantum` TNs
mofeing Oct 6, 2023
dac1cb8
Refactor `TNSampler` to new OOP architecture
mofeing Oct 7, 2023
7bcc2f7
Refactor `MatrixProduct`
mofeing Oct 7, 2023
462a161
Refactor `Quac` extension
mofeing Oct 9, 2023
2057a14
Test changes for MPO
mofeing Oct 9, 2023
ebcab1a
Refactor `replace`
mofeing Oct 9, 2023
f28bcf4
Refactor things for which I'm too lazy to name
mofeing Oct 9, 2023
64ed193
Fix `normalize!`
mofeing Oct 9, 2023
b872801
Remove legacy code
mofeing Oct 9, 2023
4ea6ab9
Update `ChainRules` extensions
mofeing Oct 9, 2023
e2e9721
Fix `copy` on `TensorNetwork`
mofeing Oct 9, 2023
62cce3b
Fix `PEP` constructor
mofeing Oct 9, 2023
b090cfc
Implement trace methods for `QuantumTensorNetwork` #110
mofeing Oct 9, 2023
7be0448
Fix docs
mofeing Oct 9, 2023
d3e4c11
Enable `norm` test on `MPO`
mofeing Oct 10, 2023
6567aa9
Fix `tensors` type in `TensorNetwork` constructor
mofeing Oct 10, 2023
86f3a05
Relax `Vector{Tensor}` conversion on `TensorNetwork` constructor
mofeing Oct 10, 2023
ecdc993
Update `contract` docstring
mofeing Oct 10, 2023
f1ae973
Trigger CI workflow on `develop` branch
mofeing Oct 10, 2023
41e4e7a
Remove legacy `Generate sysimage` workflow
mofeing Oct 10, 2023
d4d0f78
Merge pull request #103 from bsc-quantic/refactor/oop
arturgs Oct 25, 2023
43cf7c9
Fix type-unstability in `ImmutableVector`
mofeing Oct 16, 2023
4697c96
Set `develop` branch as "dev" branch for documentation
mofeing Oct 25, 2023
3891c62
Remove all references to `Infinite` trait (#111)
mofeing Oct 26, 2023
e7e5fae
Clean code
mofeing Oct 24, 2023
2089a76
Enhance `qr` function with `mode` argument (#114)
jofrevalles Oct 31, 2023
135b5ea
Format code (#119)
github-actions[bot] Nov 1, 2023
6057944
Remove `Quantum` TN code
mofeing Nov 3, 2023
28f0c32
Remove legacy QASM file
mofeing Nov 3, 2023
3424964
Remove `Classes` dependency
mofeing Nov 4, 2023
4322b45
Refactor `TensorNetwork` internals to incidence matrix representation…
mofeing Nov 10, 2023
1a23cd2
Fix "Inconsistent `node_attr` behavior for invisible "ghost" nodes in…
mofeing Nov 11, 2023
1524e56
Test `Makie.plot!` with node attrs
mofeing Nov 11, 2023
f2387db
Fix color type of ghost nodes in `Makie` code
mofeing Nov 11, 2023
005d8a4
Fix node color for ghost nodes in `Makie.plot`
mofeing Nov 11, 2023
5b3e11b
Refactor `select` method and add `getindex` function
mofeing Nov 11, 2023
c8669df
Refactor circle point calculation in
mofeing Nov 11, 2023
13742fb
Merge branch 'master' into develop
mofeing Nov 12, 2023
dd9b6d3
Add `lu` decomposition for `Tensor`s (#94)
jofrevalles Nov 13, 2023
aad0fe6
Format code
mofeing Nov 13, 2023
97ac71d
Add note of quantum code moving to Qrochet
mofeing Nov 13, 2023
6b29aaf
Remove checkboxes from feature list
mofeing Nov 13, 2023
069f118
Reorganize README
mofeing Nov 13, 2023
48f7dde
Set compat version of stdlibs
mofeing Nov 13, 2023
6ed272b
Remove unused bibliographic references
mofeing Nov 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ authors = ["Sergio Sánchez Ramírez <[email protected]>"]
version = "0.3.0"

[deps]
Bijections = "e2ed5e7c-b2de-5872-ae92-c73ca462fb04"
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
DeltaArrays = "10b0fc19-5ccc-4427-889b-d75dd6306188"
EinExprs = "b1794770-133b-4de1-afb4-526377e9f4c5"
GraphMakie = "1ecd5474-83a3-4783-bb4f-06765db800d2"
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
ImmutableArrays = "667c17eb-ab9b-4487-935f-1c621bb82497"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Muscle = "21fe5c4b-a943-414d-bf3e-516f24900631"
OMEinsum = "ebe7aa44-baf0-506c-a96f-8464559b3922"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
ValSplit = "0625e100-946b-11ec-09cd-6328dd093154"

Expand All @@ -22,26 +23,26 @@ ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
ChainRulesTestUtils = "cdddcdb0-9152-4a09-a978-84456f9df70a"
FiniteDifferences = "26cc04aa-876d-5657-8c51-4c34ba976000"
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
Quac = "b9105292-1415-45cf-bff1-d6ccf71e6143"

[extensions]
TenetChainRulesCoreExt = "ChainRulesCore"
TenetChainRulesTestUtilsExt = ["ChainRulesCore", "ChainRulesTestUtils"]
TenetFiniteDifferencesExt = "FiniteDifferences"
TenetMakieExt = "Makie"
TenetQuacExt = "Quac"

[compat]
Bijections = "0.1"
ChainRulesCore = "1.0"
Combinatorics = "1.0"
DeltaArrays = "0.1.1"
EinExprs = "0.5.5"
GraphMakie = "0.4,0.5"
Graphs = "1.7"
LinearAlgebra = "1.9"
Makie = "0.18, 0.19"
Muscle = "0.1"
OMEinsum = "0.7"
Quac = "0.2"
Random = "1.9"
SparseArrays = "1.9"
UUIDs = "1.9"
ValSplit = "0.1"
julia = "1.9"
45 changes: 20 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,32 @@
[![Documentation: stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://bsc-quantic.github.io/Tenet.jl/)
[![Documentation: dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://bsc-quantic.github.io/Tenet.jl/dev/)

> [!IMPORTANT]
> The code for quantum tensor networks has been moved to the new [`Qrochet`](https://github.com/bsc-quantic/Qrochet.jl) library.

A Julia library for **Ten**sor **Net**works. `Tenet` can be executed both at local environments and on large supercomputers. Its goals are,

- **Expressiveness** _Simple to use._ 👶
- **Flexibility** _Extend it to your needs._ 🔧
- **Performance** _Goes brr... fast._ 🏎️

A video of its presentation at JuliaCon 2023 can be seen here:
## Features

[![Watch the video](https://img.youtube.com/vi/8BHGtm6FRMk/maxresdefault.jpg)](https://youtu.be/8BHGtm6FRMk)
- Optimized Tensor Network contraction order, powered by [`EinExprs`](https://github.com/bsc-quantic/EinExprs.jl)
- Tensor Network slicing/cuttings
- Automatic Differentiation of TN contraction
- Distributed contraction
- Local Tensor Network transformations
- Hyperindex converter
- Rank simplification
- Diagonal reduction
- Anti-diagonal gauging
- Column reduction
- Split simplification
- 2D & 3D visualization of large networks, powered by [`Makie`](https://github.com/MakieOrg/Makie.jl)

## Features
## Preview

A video of its presentation at JuliaCon 2023 can be seen here:

- [x] Optimized Tensor Network contraction, powered by [`EinExprs`](https://github.com/bsc-quantic/EinExprs.jl)
- [x] Tensor Network slicing/cuttings
- [x] Automatic Differentiation of TN contraction
- [ ] Distributed contraction
- [ ] Quantum Tensor Networks
- [x] Matrix Product States (MPS)
- [x] Matrix Product Operators (MPO)
- [ ] Tree Tensor Networks (TTN)
- [x] Projected Entangled Pair States (PEPS)
- [ ] Multiscale Entanglement Renormalization Ansatz (MERA)
- [ ] Numerical Tensor Network algorithms
- [ ] Tensor Renormalization Group (TRG)
- [ ] Density Matrix Renormalization Group (DMRG)
- [x] Local Tensor Network transformations
- [x] Hyperindex converter
- [x] Rank simplification
- [x] Diagonal reduction
- [x] Anti-diagonal gauging
- [x] Column reduction
- [x] Split simplification
- [x] 2D & 3D visualization of large networks, powered by [`Makie`](https://github.com/MakieOrg/Makie.jl)
- [x] Translation from quantum circuits, powered by [`Quac`](https://github.com/bsc-quantic/Quac.jl)
[![Watch the video](https://img.youtube.com/vi/8BHGtm6FRMk/maxresdefault.jpg)](https://youtu.be/8BHGtm6FRMk)
1 change: 0 additions & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244"
EinExprs = "b1794770-133b-4de1-afb4-526377e9f4c5"
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
NetworkLayout = "46757867-2c16-5918-afeb-47bfcb05e46a"
QuacIO = "0dfb065c-ad45-4a42-9a50-cb82c165eb0b"
Tenet = "85d41934-b9cd-44e1-8730-56d86f15f3ec"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

Expand Down
19 changes: 4 additions & 15 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,10 @@ makedocs(
pages = Any[
"Home"=>"index.md",
"Tensors"=>"tensors.md",
"Tensor Networks"=>[
"Introduction" => "tensor-network.md",
"Contraction" => "contraction.md",
"Transformations" => "transformations.md",
"Visualization" => "visualization.md",
],
"Quantum Tensor Networks"=>[
"Introduction" => "quantum/index.md",
"Matrix Product States (MPS)" => "quantum/mps.md",
"Projected Entangled Pair States (PEPS)" => "quantum/peps.md",
],
"Examples"=>[
"Google's Quantum Advantage experiment" => "examples/google-rqc.md",
"Automatic Differentiation on Tensor Network contraction" => "examples/ad-tn.md",
],
"Tensor Networks"=>"tensor-network.md",
"Contraction"=>"contraction.md",
"Transformations"=>"transformations.md",
"Visualization"=>"visualization.md",
mofeing marked this conversation as resolved.
Show resolved Hide resolved
"Alternatives"=>"alternatives.md",
"References"=>"references.md",
],
Expand Down
64 changes: 0 additions & 64 deletions docs/refs.bib
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
{
@inproceedings{stoudenmire-tnml,
author = {Stoudenmire, Edwin and Schwab, David J},
booktitle = {Advances in Neural Information Processing Systems},
editor = {D. Lee and M. Sugiyama and U. Luxburg and I. Guyon and R. Garnett},
pages = {},
publisher = {Curran Associates, Inc.},
title = {Supervised Learning with Tensor Networks},
url = {https://proceedings.neurips.cc/paper_files/paper/2016/file/5314b9674c86e3f9d1ba25ef9bb32895-Paper.pdf},
volume = {29},
year = {2016}
}
@article{gray2018quimb,
title={quimb: A python package for quantum information and many-body calculations},
author={Gray, Johnnie},
Expand Down Expand Up @@ -44,16 +33,6 @@ @article{ramon2023tensorkrowch
pages={arXiv--2306},
year={2023}
}
@article{arute2019quantum,
title={Quantum supremacy using a programmable superconducting processor},
author={Arute, Frank and Arya, Kunal and Babbush, Ryan and Bacon, Dave and Bardin, Joseph C and Barends, Rami and Biswas, Rupak and Boixo, Sergio and Brandao, Fernando GSL and Buell, David A and others},
journal={Nature},
volume={574},
number={7779},
pages={505--510},
year={2019},
publisher={Nature Publishing Group}
}
@article{gray2021hyper,
title={Hyper-optimized tensor network contraction},
author={Gray, Johnnie and Kourtis, Stefanos},
Expand All @@ -63,47 +42,4 @@ @article{gray2021hyper
year={2021},
publisher={Verein zur F{\"o}rderung des Open Access Publizierens in den Quantenwissenschaften}
}
@article{boixo2018characterizing,
title={Characterizing quantum supremacy in near-term devices},
author={Boixo, Sergio and Isakov, Sergei V and Smelyanskiy, Vadim N and Babbush, Ryan and Ding, Nan and Jiang, Zhang and Bremner, Michael J and Martinis, John M and Neven, Hartmut},
journal={Nature Physics},
volume={14},
number={6},
pages={595--600},
year={2018},
publisher={Nature Publishing Group UK London}
}
@article{villalonga2020establishing,
title={Establishing the quantum supremacy frontier with a 281 pflop/s simulation},
author={Villalonga, Benjamin and Lyakh, Dmitry and Boixo, Sergio and Neven, Hartmut and Humble, Travis S and Biswas, Rupak and Rieffel, Eleanor G and Ho, Alan and Mandr{\`a}, Salvatore},
journal={Quantum Science and Technology},
volume={5},
number={3},
pages={034003},
year={2020},
publisher={IOP Publishing}
}
@article{markov2018quantum,
title={Quantum supremacy is both closer and farther than it appears},
author={Markov, Igor L and Fatima, Aneeqa and Isakov, Sergei V and Boixo, Sergio},
journal={arXiv preprint arXiv:1807.10749},
year={2018}
}
@misc{cotengra,
title={cotengra: Hyper optimized contraction trees for large tensor networks and einsums},
author={Gray, Johnnie},
year={2021},
howpublished={https://github.com/jcmgray/cotengra},
url={https://github.com/jcmgray/cotengra},
}
@article{arute2019quantum,
title={Quantum supremacy using a programmable superconducting processor},
author={Arute, Frank and Arya, Kunal and Babbush, Ryan and Bacon, Dave and Bardin, Joseph C and Barends, Rami and Biswas, Rupak and Boixo, Sergio and Brandao, Fernando GSL and Buell, David A and others},
journal={Nature},
volume={574},
number={7779},
pages={505--510},
year={2019},
publisher={Nature Publishing Group}
}
}
4 changes: 2 additions & 2 deletions docs/src/contraction.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Contraction path optimization and execution is delegated to the [`EinExprs`](https://github.com/bsc-quantic/EinExprs) library. A `EinExpr` is a lower-level form of a Tensor Network, in which the contraction path has been laid out as a tree. It is similar to a symbolic expression (i.e. `Expr`) but in which every node represents an Einstein summation expression (aka `einsum`).

```@docs
einexpr(::TensorNetwork)
contract(::TensorNetwork)
einexpr(::Tenet.AbstractTensorNetwork)
contract(::Tenet.AbstractTensorNetwork)
contract!
```
69 changes: 0 additions & 69 deletions docs/src/examples/ad-tn.md

This file was deleted.

93 changes: 0 additions & 93 deletions docs/src/examples/google-rqc.md

This file was deleted.

Loading
Loading