wavefunction_analysis.opt package
Submodules
wavefunction_analysis.opt.grassmann module
- class Grassmann(mf=None, S=None, Q=None, Y=None, P=None, update_method='steepest_descent')[source]
Bases:
object
- class Involution_Grassmann(mf=None, S=None, Q=None, Y=None, P=None, update_method='steepest_descent')[source]
Bases:
Grassmann
- class Projection_Grassmann(mf=None, S=None, Q=None, Y=None, P=None, update_method='steepest_descent')[source]
Bases:
Grassmann
wavefunction_analysis.opt.optimization module
- conjugate_gradient(func, gradf, retraction, transport, preconditioner, x0, ls_method='armijo', cg_method='fletcher_reeves', nmax=50, thresh=1e-08, *args, **kwargs)[source]
- gradient_descent(func, gradf, retraction, x0, ls_method='armijo', nmax=50, thresh=1e-08, *args, **kwargs)[source]
- ls_armijo(func, gradf, retraction, x0, tau=0.5, r=0.0001, alpha=1.0)
alpha is the step size we need to determine reduce it from a large value
- ls_backtracking(func, gradf, retraction, x0, tau=0.5, r=0.0001, alpha=1.0)[source]
alpha is the step size we need to determine reduce it from a large value
wavefunction_analysis.opt.riemannian module
- class Grassmann_Quotient(ndim=None, x0=None, A=None, B=None, retraction='qr', **kwargs)[source]
Bases:
StiefelGrassmann is a quotient space from Stiefel with extra idempotency condition for density matrix P = p p^dagger this class uses point p rather than P `Gr(k,n) = St(k,n) / O(k)
= {p in F^{n*k} | p^dagger B p = I_k, PBP = P}
T_p Gr(k,n) = {V in F^{n*n} | p^dagger V = 0}`
- property dimension
- property dist
calculate the distance between two tangent vectors at one point
- exp(x, v, dt=1.0)[source]
exp_p (V) = p V cos(s) V^dagger + U sin(s) V^dagger qr is needed for numerically stablity
- horizontal_lift(x, v, lift=True)[source]
Delta = (0 & - B^T \ B & 0) Delta_p^horizontal = Delta * p = p_perp * B in Stiefel representation
- log(x1, x2, dt=1.0)[source]
adopted from alg. 1 from 10.1007/s10444-023-10090-8 recovers Stiefel from exp operation and avoids matrix inverse
- class OrthogonalGroup(ndim=None, x0=None, A=None, B=None, retraction='qr', **kwargs)[source]
Bases:
Riemannianthe points are n*n square matrix, n-dimensions and n-planes
- property eigenvalue
- exp(x, v, dt=1.0)[source]
geodesic mapping tangent vector v of x to other points on manifold exp_p: T_p M -> M
- log(x1, x2, dt=1.0)[source]
geodesic mapping points on manifold to the tangent space of the first point log_p: M -> T_p M
- class Riemannian(ndim=None, x0=None, A=None, B=None, retraction='qr', **kwargs)[source]
Bases:
object- conjugate_gradient(method=None, cg_method='fletcher_reeves', nmax=50, thresh=1e-08, *args, **kwargs)[source]
- property dimension
- property dist
calculate the distance between two tangent vectors at one point
- exp(x, v, dt=1.0)[source]
geodesic mapping tangent vector v of x to other points on manifold exp_p: T_p M -> M
- geodesic(x, v, dt=1.0)
geodesic mapping tangent vector v of x to other points on manifold exp_p: T_p M -> M
- inverse_retraction()[source]
approximation to logrithrim geodesic mapping project points to get the connecting tangent vector at first point
- log(x1, x2, dt=1.0)[source]
geodesic mapping points on manifold to the tangent space of the first point log_p: M -> T_p M
- property norm
calculate the length of a tangent vector v of point x use euclidean norm by default
- projection(x, v)[source]
project a general matrix v to the tangent space of a point x on the manifold
- retraction(x, v)[source]
approximation to exponential geodesic mapping project new vector x+v from point x to the manifold
- riemannian_gradient(x, grad)[source]
project euclidean gradient to riemannian gradient of a function
- riemannian_hessian(x, v, grad, hess, normal=None)[source]
project euclidean hessian to riemannian hessian of a function
- to_tangent_space(x, v)
project a general matrix v to the tangent space of a point x on the manifold
- class Stiefel(ndim=None, x0=None, A=None, B=None, retraction='qr', **kwargs)[source]
Bases:
OrthogonalGroupSt(k,n) = {p in F^{n*k} | p^dagger B p = I_k} the point p is a n*k matrix, n-dimensions and k-planes quotient space from OrthogonalGroup where k<n whose tangent vector V is on the tangent space of point p T_p St(k,n) = {V in F^{n*k} | p^dagger B V + V^dagger B p = 0_k}
- property dimension
- property dist
calculate the distance between two tangent vectors at one point
- exp(x, v, dt=1.0)[source]
exp_p V = (p \ V) exp((p^dagger V & - V^dagger V \ I_n & p^dagger V)) (exp(-p^dagger V) \ 0_n)