Skip to content

Commit 0c49ae2

Browse files
committed
Add release notes for v1.6.1
1 parent d9df023 commit 0c49ae2

1 file changed

Lines changed: 201 additions & 0 deletions

File tree

RELEASE_1.6.1.md

Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
# Release Notes for TDSCHA v1.6.1
2+
3+
**Release Date:** March 25, 2026
4+
5+
This release introduces major performance optimizations and new computational capabilities, most notably the **q-space implementations** that dramatically accelerate calculations for periodic systems.
6+
7+
---
8+
9+
## Major New Features
10+
11+
### 1. QSpaceLanczos: Q-Space Spectral Calculations
12+
13+
A new module implementing the Lanczos algorithm in the Bloch (q-space) basis, exploiting momentum conservation for massive performance gains.
14+
15+
**Key Features:**
16+
- **Momentum Conservation:** The 2-phonon sector is block-diagonal with pairs satisfying **q₁ + q₂ = q_pert**, reducing the ψ-vector size by ~N_cell compared to real-space
17+
- **Hermitian Lanczos:** Uses complex arithmetic with Hermitian inner products for proper convergence
18+
- **Julia Backend:** High-performance implementation via `Modules/tdscha_qspace.jl`
19+
- **Bloch-Transformed Ensemble:** Direct q-space ensemble averaging without real-space supercell overhead
20+
21+
**Performance Impact:**
22+
- Memory reduction: O(N_modes²) → O(n_bands²) for the 2-phonon sector
23+
- Speedup scales as ~N_cell for spectral calculations
24+
- Essential for large supercells where real-space Lanczos becomes prohibitive
25+
26+
**Usage:**
27+
```python
28+
import tdscha.QSpaceLanczos as QL
29+
30+
# Initialize q-space Lanczos solver
31+
qlanc = QL.QSpaceLanczos(ensemble)
32+
qlanc.init(use_symmetries=True)
33+
34+
# Compute spectral function at specific q-point
35+
qlanc.prepare_q(0) # Gamma point
36+
qlanc.run_FT(n_steps=1000)
37+
green = qlanc.get_green_function_continued_fraction(energies)
38+
```
39+
40+
**Files Added:**
41+
- `Modules/QSpaceLanczos.py` (1,232 lines)
42+
- `Modules/tdscha_qspace.jl` (529 lines)
43+
- `tests/test_qspace/test_qspace_lanczos.py` (273 lines)
44+
45+
---
46+
47+
### 2. QSpaceHessian: Fast Free Energy Hessian
48+
49+
The **fastest and most memory-efficient** method in the SSCHA ecosystem for computing the full anharmonic free energy Hessian, including fourth-order contributions.
50+
51+
**Key Features:**
52+
- **Block-Diagonal Structure:** Translational symmetry makes the Liouvillian block-diagonal in q-space
53+
- **Iterative Solver:** GMRES with harmonic preconditioner; BiCGSTAB fallback for difficult cases
54+
- **Symmetry Exploitation:** Point-group symmetries reduce computation to the irreducible q-set
55+
- **Hermiticity Enforcement:** Explicit symmetrization ensures real eigenvalues
56+
- **Anharmonic Control:** `ignore_v3` and `ignore_v4` flags to exclude cubic/quartic terms
57+
58+
**Performance Impact:**
59+
60+
| Metric | Direct (`get_free_energy_hessian`) | **QSpaceHessian** |
61+
|--------|-----------------------------------|-------------------|
62+
| Memory | O(N_modes⁴) | O(n_bands⁴) |
63+
| Time | O(N_modes⁶) | O(n_bands³ × N_q,irr) |
64+
| Speedup (4×4×4 cell) || **~65,000×** |
65+
66+
For a 4×4×4 supercell (N_cell = 64, N_q,irr ≈ 4), calculations that would require **terabytes of RAM** are now feasible on a laptop.
67+
68+
**Usage:**
69+
```python
70+
import tdscha.QSpaceHessian as QH
71+
72+
# Compute full Hessian at all q-points
73+
hess = QH.QSpaceHessian(ensemble)
74+
hess.init()
75+
hessian_dyn = hess.compute_full_hessian(tol=1e-6, max_iters=500)
76+
77+
# Or compute at single q-point
78+
H_gamma = hess.compute_hessian_at_q(iq=0)
79+
```
80+
81+
**Advanced Features:**
82+
- **Dense Fallback:** For problematic q-points near phase transitions (`dense_fallback=True`)
83+
- **Acoustic Mode Handling:** Proper null-space projection for non-self-conjugate q-points
84+
- **Mode Degeneracy Exploitation:** Schur's lemma reduces GMRES solves for degenerate modes
85+
86+
**Files Added:**
87+
- `Modules/QSpaceHessian.py` (701 lines)
88+
- `tests/test_qspace/test_qspace_hessian.py` (170 lines)
89+
- `docs/qspace-hessian.md` (comprehensive documentation)
90+
91+
---
92+
93+
### 3. Gamma-Only Optimization: 8× Speedup for Γ-Point Calculations
94+
95+
Major performance enhancement for Γ-point (q = 0) spectral and response calculations.
96+
97+
**Optimizations:**
98+
- **Reduced Python-Julia Bridge Overhead:** Minimized data marshalling for gamma-only mode
99+
- **O(n²) Permutations:** Replaced O(n³) matrix multiplications with direct index permutations in `apply_L_translations`
100+
- **Symmetry-Aware:** Exploits point-group symmetries for additional speedup
101+
102+
**Impact:**
103+
- 8× speedup for gamma-point IR/Raman response calculations
104+
- Particularly effective for large supercells where the Python-Julia boundary crossing was a bottleneck
105+
- Maintains full accuracy (verified against non-optimized implementation)
106+
107+
**Usage:**
108+
The optimization is automatic when:
109+
1. The perturbation is at the Γ-point (`q_pert = 0`)
110+
2. `use_symmetries=True` is set
111+
3. The Julia backend is active (`MODE_FAST_JULIA`)
112+
113+
**Files Modified:**
114+
- `Modules/DynamicalLanczos.py` (gamma-only detection and optimization)
115+
- `Modules/tdscha_core.jl` (translational projection optimization)
116+
117+
---
118+
119+
## Additional Improvements
120+
121+
### Documentation Overhaul
122+
- **New Documentation Site:** Full mkdocs-based documentation at [sscha.eu/tdscha](http://sscha.eu/tdscha/)
123+
- **API Reference:** Auto-generated from docstrings
124+
- **Theory Guide:** Mathematical background on q-space methods
125+
- **Examples:** SnTe spectral function at X point, IR response calculations
126+
127+
### Command-Line Interface
128+
New executable scripts for common workflows:
129+
- `tdscha-convergence-analysis` — Analyze Lanczos convergence
130+
- `tdscha-plot-data` — Plot spectral functions
131+
- `tdscha-output2abc` — Convert output formats
132+
- `tdscha-hessian-convergence` — Monitor Hessian convergence
133+
134+
### Testing & Validation
135+
- **Q-Space Correctness Tests:** Verify q-space vs. real-space Green functions match within 2.4×10⁻⁷ relative error
136+
- **Wigner Representation Tests:** Compare Wigner vs. non-Wigner spectral functions
137+
- **MPI Parallel Tests:** CI-validated MPI correctness
138+
- **IR Perturbation Tests:** Modulus consistency between real-space and q-space Lanczos
139+
140+
### Bug Fixes
141+
- **Q-Point Mapping:** Fixed errors for q-points where `-q` does not map to itself
142+
- **Symmetry Construction:** Corrected point-group symmetry handling in q-space (Cartesian rotations, atom permutations)
143+
- **Acoustic Modes:** Proper masking of acoustic modes (ω < 10⁻⁶) in ensemble averages
144+
- **Version Synchronization:** Aligned version numbers across pyproject.toml, meson.build, and git tags
145+
146+
---
147+
148+
## Breaking Changes
149+
150+
None. This release is fully backward-compatible with v1.5.
151+
152+
---
153+
154+
## Migration Guide
155+
156+
### For Existing Users
157+
158+
No code changes required. Existing scripts will continue to work unchanged.
159+
160+
To benefit from new features:
161+
162+
1. **For faster Hessian calculations:** Replace `ensemble.get_free_energy_hessian()` with `QSpaceHessian`
163+
2. **For large-supercell spectra:** Use `QSpaceLanczos` instead of `Lanczos` when memory is constrained
164+
3. **For Γ-point response:** Ensure `use_symmetries=True` to activate 8× speedup automatically
165+
166+
### Dependencies
167+
168+
No new required dependencies. Optional dependencies:
169+
- `spglib` — For symmetry exploitation (recommended)
170+
- `julia` — Required for q-space modules and gamma-only optimization
171+
- `mpi4py` — For MPI parallelization
172+
173+
---
174+
175+
## Contributors
176+
177+
- Lorenzo Monacelli (main development)
178+
- Claude Opus 4.6 (q-space implementation assistance)
179+
180+
---
181+
182+
## References
183+
184+
1. R. Bianco, I. Errea, L. Paulatto, M. Calandra, and F. Mauri, *Phys. Rev. B* **96**, 014111 (2017) — Free energy Hessian theory
185+
2. L. Monacelli, *Phys. Rev. B* **112**, 014109 (2025) — Static susceptibility formulation
186+
3. L. Monacelli and F. Mauri, 2021 — Q-space Liouvillian block-diagonality
187+
188+
---
189+
190+
## Full Changelog
191+
192+
See the [git log](https://github.com/SSCHAcode/tdscha/compare/v1.5...v1.6.1) for all 43 commits since v1.5.
193+
194+
**Key Commits:**
195+
- `47ab893c` — Gamma-only implementation with tests
196+
- `31263868` — 8× speedup via reduced Python-Julia overhead
197+
- `1a65d466` — QSpaceLanczos module with Bloch momentum conservation
198+
- `b180a88f` — QSpaceHessian for free energy Hessian in q-space
199+
- `7cd005ef` — Mode degeneracy exploitation (Schur's lemma)
200+
- `a7ddc302` — Hermitian symmetry exploitation in q-pair blocks
201+
- `ed693e2c` — Raman perturbation methods for QSpaceLanczos

0 commit comments

Comments
 (0)