Advanced Topics
This section is under development.
Entanglement with Pair Operators
For studying entanglement, use pair operator bases that can create correlations.
Kubo-Mori (Duhamel) Derivatives
For a matrix exponential family \(\rho(\theta) = e^H\) with \(H = \sum_a \theta_a F_a - \psi(\theta) I\), the exact derivative is
This is the Kubo-Mori (Duhamel) derivative, and it is what
rho_derivative() computes.
Choosing a method
Three numerical strategies are available via the method argument:
|
Cost |
Accuracy |
When to use |
|---|---|---|---|
|
1 |
Machine precision |
Robust default; handles ill-conditioned \(H\) |
|
1 |
Machine precision |
When eigendecomposition is cheap and \(H\) is well-conditioned |
|
50 |
~10⁻⁵ |
Validation / cross-checking only |
The block method (default since January 2026) implements Higham’s identity:
so the Duhamel integral is “compiled away” into a single matrix exponential.
This avoids explicit quadrature and eigendecomposition, and delegates all
numerical work to the highly-optimised scipy.linalg.expm (Padé + scaling
and squaring).
Higher-order derivatives and cumulants
The block trick extends to 2nd and 3rd Fréchet derivatives via 3×3 / 4×4 block
matrices. These are available as utilities in qig.duhamel for computing:
the Hessian of \(\psi(\theta)\) (2nd cumulant / BKM Fisher metric),
the 3rd cumulant contraction \((\nabla G)[\theta]\) for small systems.
Third-Order Cumulants
The third cumulant \(\nabla G = \nabla \nabla \nabla \psi\) describes how
the Fisher metric varies across the manifold. It is available via the block
Fréchet method in qig.duhamel and is used internally for validation.
Optimisation on Manifolds
Constrained optimisation techniques for quantum state spaces are implemented in
qig.dynamics and qig.generic_decomposition.
See Also
qig.duhamel— Duhamel derivative implementations and API referenceqig.duhamel — Method comparison table
qig.pair_operators— Entangling operator bases