CollectiveTransiton implementation#211
Conversation
There was a problem hiding this comment.
Benchmark Results
Details
| Benchmark suite | Current: f11b699 | Previous: e7e7648 | Ratio |
|---|---|---|---|
Accumulation/Many-mode H/foldl M=16 |
10671 ns |
10980 ns |
0.97 |
Accumulation/Many-mode H/foldl M=24 |
23163 ns |
24876 ns |
0.93 |
Accumulation/Many-mode H/foldl M=8 |
2719.5555555555557 ns |
2800.777777777778 ns |
0.97 |
Accumulation/Many-mode H/sum M=16 |
1639.1 ns |
1697.1 ns |
0.97 |
Accumulation/Many-mode H/sum M=24 |
2260.8888888888887 ns |
2305.4444444444443 ns |
0.98 |
Accumulation/Many-mode H/sum M=8 |
706.1102941176471 ns |
729.7297297297297 ns |
0.97 |
Accumulation/Same-site/foldl |
6342 ns |
6275.6 ns |
1.01 |
Accumulation/Same-site/sum |
2287.6666666666665 ns |
2295.3333333333335 ns |
1.00 |
Commutator/Nested JC/depth=1 |
1677.2 ns |
1705.1 ns |
0.98 |
Commutator/Nested JC/depth=2 |
18114 ns |
17583 ns |
1.03 |
Commutator/Nested JC/depth=3 |
67427 ns |
66503 ns |
1.01 |
Commutator/Nested JC/depth=4 |
169008 ns |
168372 ns |
1.00 |
Commutator/Nested JC/depth=5 |
372422 ns |
372361 ns |
1.00 |
Commutator/Schrieffer-Wolff/[S, V] |
195909 ns |
198388 ns |
0.99 |
Commutator/Schrieffer-Wolff/[S, [S, H0]] |
361582 ns |
367321 ns |
0.98 |
Indexing/Diagonal collapse/[H_Dicke, S_j] |
41959 ns |
44253 ns |
0.95 |
Indexing/Diagonal collapse/[H_JC, σ_j] |
60214 ns |
63227 ns |
0.95 |
Indexing/Simplify/double-sum spin-spin |
16000 ns |
16551 ns |
0.97 |
Indexing/Simplify/indexed JC H |
1200.3 ns |
1169.1 ns |
1.03 |
Indexing/Sum construction/double Σ_ij(J_ij*S_i*S_j) |
7980 ns |
8766 ns |
0.91 |
Indexing/Sum construction/single Σ_i(σ_i*σ_j) |
10219 ns |
10669 ns |
0.96 |
Normal Order/Fock (c*c')^n/n=2 |
608.7865168539325 ns |
611.7403314917127 ns |
1.00 |
Normal Order/Fock (c*c')^n/n=3 |
877.290909090909 ns |
892.1754385964912 ns |
0.98 |
Normal Order/Fock (c*c')^n/n=4 |
1178.2 ns |
1183.2 ns |
1.00 |
Normal Order/Fock (c*c')^n/n=5 |
1562 ns |
1565.9 ns |
1.00 |
Normal Order/Ground state/3-level rewrite |
826.0298507462686 ns |
809.5487804878048 ns |
1.02 |
Normal Order/Multi-mode/2-mode 6-op chain |
967.5714285714286 ns |
964.421052631579 ns |
1.00 |
Simplify/Jaynes-Cummings/H |
1082 ns |
1050 ns |
1.03 |
Simplify/Jaynes-Cummings/H² |
2421.1111111111113 ns |
2412.3333333333335 ns |
1.00 |
Simplify/Two cavities/H |
1129.1 ns |
1103 ns |
1.02 |
Simplify/Two cavities/H² |
4399.714285714285 ns |
4495.428571428572 ns |
0.98 |
Simplify/Λ-system/H |
1370.6 ns |
1352.5 ns |
1.01 |
Simplify/Λ-system/H² |
2341.1111111111113 ns |
2276.4444444444443 ns |
1.03 |
This comment was automatically generated by workflow using github-action-benchmark.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #211 +/- ##
==========================================
+ Coverage 94.51% 94.53% +0.01%
==========================================
Files 27 27
Lines 2937 3001 +64
==========================================
+ Hits 2776 2837 +61
- Misses 161 164 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| if cmp === Equal && !_can_commute(a, b) | ||
| sw_b, sw_a, residual_coeff, residual_ops = _commute_pair(a, b) | ||
| sw_b, sw_a, residual_coeff, residual_ops, residual2_coeff, residual2_ops = | ||
| _commute_pair(a, b) |
There was a problem hiding this comment.
pre-exisiting bug:
commutator(Spin(hs,:A,1), Spin(hs,:B,2)) on one SpinSpace returns im*Bz via the fast path, while simplify(A*B − B*A) returns 0 (the pipeline treats different-named spins as commuting).
| insert!(residual2, i + k - 1, op) | ||
| end | ||
| _commute_ops_at(sink, residual2, new_c2, max(i - 1, 1)) | ||
| end |
There was a problem hiding this comment.
_commute_ops_at now computes _mul_cnum(c, residual2_coeff) on every non-commuting swap even for roles whose second slot is always zero; with a symbolic c that's a wasted poly scale. A cheap _iszero_cnum(residual2_coeff) || guard before the multiply would restore the old cost exactly.
|
We need to bump to 0.9.4 |
Bring the backend-agnostic numeric refactor up to date with main. Carry over the op_type/sparse-default contract (#208) into the new numeric_materialize hook (QOB sparse default; QTB keeps its solver-native lazy VecSum), port CollectiveTransition numeric support on ManyBodyBasis (#211), and bump to 0.10.0.
No description provided.