pytc.solver.bug_ccsd.low_rank_ccsd

pytc.solver.bug_ccsd.low_rank_ccsd(mf, tau=0.0001, maxiter=100, conv=1e-10, rmin=1, damp=0.7, init='mf', aug_k=None, aug_sel='residual', aug_precond=None, aug_warmup=False, amplitude_tol=None, energy_plateau_tolerance=None, quadratic_mode='device', quadratic_block=8, frozen=0, truncation='relative', callback=None, dense_core='device')[source]

Solve RCCSD with an adaptive symmetric low-rank doubles amplitude.

tau truncates the Galerkin core by eigenvalue magnitude, relative to the largest (truncation="relative") or absolute ("absolute"); it is not a CCSD residual tolerance. init="mf" is the matrix-free MP2 warm start; an explicit (U, S) pair, or (U, S, t1) to restart a run, is also accepted. callback receives a dict per iteration whose "state" is the current (U, S, t1), so a caller can checkpoint and later restart through init. frozen drops the lowest canonical orbitals.

Each iteration applies N(T) to the basis U, adds residual directions Q and remeasures the new block by the projected kernels: N is a symmetric pair-space matrix, so U^T N Q is the transpose of Q^T N U from the basis pass and only Q^T N Q is new.

aug_k caps the new directions per iteration (a count, or a fraction of the rank if < 1); aug_sel picks them by projected residual norm ("residual") or as the leading singular vectors of the external residual ("svd"). aug_precond="jacobi" divides residual column x by (D + e_x), e_x = u_x^T D u_x, so directions are ranked by approximate amplitude update. aug_warmup=True adds every direction (k = r) until the rank grows by at most 2% in one iteration.

The run stops when the amplitude step is below conv or the energy has changed by less than energy_plateau_tolerance (default tau^2 |E|) over three iterations; amplitude_tol additionally requires ||dT|| + ||dt1|| below amplitude_tol (||T|| + ||t1||).

quadratic_mode keeps the exact quadratic operator on the device ("device", nov^2 doubles) or its upper triangle in host RAM ("host"). dense_core runs the truncation eigh on the device ("device"; out of memory stops the run) or on the host CPU ("host"). JAX must run in float64 (JAX_ENABLE_X64=1).

Returns a LowRankResult with t1 set; diagnostics holds the per-iteration histories, stage and kernel times.