You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bd78e23
Browse filesBrowse the repository at this point in the historyBrowse files
authored
feat: ✨ oversample SRC sketches before exact SVD truncation (#63)
* Initial plan
* feat: ✨ oversample SRC before exact SVD truncation
Assisted-by: GitHub Copilot:unknown
Co-authored-by: robertodr <3708689+robertodr@users.noreply.github.com>
* fix: 🐛 release discarded SVD storage
Assisted-by: GitHub Copilot:unknown
Co-authored-by: robertodr <3708689+robertodr@users.noreply.github.com>
* perf(sweep): ⚡️ reduce the final truncation to a small SVD after a QR
Assisted-by: GitHub Copilot:claude-sonnet-5.5
* feat: ✨ make oversampling opt-in with a default of 1.0
Assisted-by: GitHub Copilot:claude-opus-5.5
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: robertodr <3708689+robertodr@users.noreply.github.com>
Co-authored-by: Roberto Di Remigio Eikås <robertodr@users.noreply.github.com>
Co-authored-by: Ramón L. Panadés-Barrueta <rpana92@gmail.com>
Copy file name to clipboardExpand all lines: README.md
+17-1Lines changed: 17 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,22 @@ Whether a train is an MPS or an MPO is inferred from the rank of its first site
33
33
34
34
**NOTE**: the current implementation targets tensor networks with 3 or more sites. For smaller networks, an exact SVD-based fallback is dispatched, with a warning.
35
35
36
+
### Oversampling and Truncation
37
+
38
+
By default, `apply`, `compress` and `src` sketch at `chi_out` and return
39
+
**right-canonical** output. For better accuracy at the same `chi_out`, pass
40
+
`oversample`: a finite factor of at least `1.0` sketches at
41
+
`ceil(oversample * chi_out)`, and `None` at the paper's
42
+
`max(ceil(1.5 * chi_out), chi_out + 10)`. A final left-to-right SVD sweep then
43
+
truncates to `chi_out`, and the result is **left-canonical**, with the norm on
44
+
the last site. When positive, `cutoff` discards Schmidt values below
45
+
`cutoff * sigma_max` at each cut in this final pass. Two-site trains keep the
46
+
exact, right-canonical fallback and ignore both options.
47
+
48
+
Larger sketches improve accuracy but increase time and memory costs, often
49
+
several-fold; compare factors at the same `chi_out` when choosing an
50
+
accuracy/runtime trade-off.
51
+
36
52
### Tensor Indexing Conventions
37
53
38
54
The array layout follows the default `quimb` tensor indexing conventions, so results round-trip through [Quimb](https://quimb.readthedocs.io/en/latest/autoapi/quimb/tensor/index.html) without any permutation:
@@ -81,7 +97,7 @@ bra = src([t.conj() for t in psi], A, B, chi_out=64)
81
97
82
98
The result then pairs with a ket by plain contraction, with no further conjugation.
83
99
84
-
**Cost.** The per-site cost of the sweep grows with `chi_out**2` times the product of the bond dimensions of the layers. Compressing a whole stack at once pays off for shallow stacks of thin layers, such as two or three Trotter layers; apply anything else pairwise. See [the stack depth benchmarks](benches/stack/README.md) for measurements.
100
+
**Cost.** The per-site cost of the sweep grows with the sketch size squared times the product of the bond dimensions of the layers. Compressing a whole stack at once pays off for shallow stacks of thin layers, such as two or three Trotter layers; apply anything else pairwise. See [the stack depth benchmarks](benches/stack/README.md) for measurements.
0 commit comments