arXiv is now an independent nonprofit! Learn more
License: arXiv.org perpetual non-exclusive license
arXiv:2608.06536v1 [physics.chem-ph] 06 Aug 2026

Density-Functional Excited-State Gradients and Nonadiabatic Couplings on a Consumer GPU from a Contraction-DAG

Rubén D. Guerrero rudaguerman@gmail.com NeuroTechNet S.A.S., 1108831, Bogotá, Colombia Quantum and Computational Chemistry Group (QCCG), Universidad Nacional de Colombia, Bogotá, Colombia
Abstract

Nonadiabatic dynamics needs an excited-state gradient and an interstate nonadiabatic coupling matrix element (NACME) at every nuclear geometry, and a double-hybrid functional’s accuracy has been unavailable for the coupling. We report the first analytic derivative NACME for a double-hybrid excited state—deferred in the original hh-TDA method and supplied for hybrids only by Yu et al.—derived, with the hole-hole and particle-particle Tamm–Dancoff (hh-TDA/pp-TDA) gradients and NACMEs, as a single reverse-mode transpose of one contraction graph closed under a non-symmetric atomic-orbital-direct J/KJ/K kernel. Its double-hybrid excitation energy lowers the vertical-excitation mean absolute deviation from bare-hh-TDA 0.860.86 to 0.470.47 eV and removes the +0.53→+0.05+0.53\!\rightarrow\!+0.05 eV over-excitation bias, improving seven of ten states while over-correcting the ionic π​π∗\pi\pi^{*} states—the expected perturbative-doubles failure, reported not trimmed. Every coupling is validated to ∼10−4\sim\!10^{-4} against an independent literal many-electron wavefunction-overlap oracle that shares no code path with the method, and is physically meaningful at the ammonia n→σ∗n\!\rightarrow\!\sigma^{*} covalent conical intersection, where the hh-TDA/pp-TDA manifolds recover the F−2F\!-\!2 seam and adiabatic linear-response TDDFT gives τ≡0\tau\!\equiv\!0 by construction. Gradients, NACMEs, and the double-hybrid coupling all run device-resident and AO-direct through one shared Cholesky-decomposed J/KJ/K engine within the 8 GB of a consumer RTX 4060 (a profile-guided ∼102×\sim\!10^{2}\times launch collapse preserving double-precision bit-identity)—placing on a commodity desktop card a correlated excited-state derivative capability that has until now required datacenter hardware.

I Introduction

Photochemistry—the fate of a molecule once it has absorbed a photon—plays out on excited-state potential-energy surfaces and is funnelled, wherever those surfaces touch, through conical intersections: points of exact electronic degeneracy at which the Born–Oppenheimer separation collapses and population passes rapidly between states [40]. Following such a process—in vision, in photosynthesis, in organic photovoltaics, in the photoprotection of DNA—by nonadiabatic dynamics demands, at every step of every trajectory, two derivatives of the electronic wavefunction: the excited-state gradient that propagates the nuclei, and the nonadiabatic coupling matrix element (NACME) that fixes the rate at which neighbouring states trade population. These must be simultaneously accurate and cheap enough to evaluate many thousands of times along a trajectory—and it is precisely this pairing, accuracy at sampling cost, that has stayed the practical bottleneck.

Density-functional theory is the workhorse for excited states through its linear-response (TDDFT/TDA) form, but linear response has a well-known qualitative failure precisely where NACMEs matter most: at a conical intersection involving the ground state it produces a seam of the wrong dimensionality (F−1F\!-\!1 instead of F−2F\!-\!2) [23, 14], because the ground state is not one of the response eigenvectors and its coupling to the excited manifold structurally vanishes. Two routes repair this. The particle-particle and hole-hole Tamm–Dancoff manifolds (pp-TDA, hh-TDA) [36, 39, 4, 41] reach the NN-electron ground and excited states as eigenvectors of a common Hermitian matrix built on an (N∓2)(N\!\mp\!2)-electron reference, so their mutual coupling does not vanish and the F−2F\!-\!2 seam is recovered. Independently, double-hybrid functionals add a second-order perturbative (PT2) correlation correction to the excited state [the CIS(D)-type term of Grimme and Neese [15, 29, 12, 13]], sharpening excitation energies but at the cost of a doubles-sector contribution to every derivative that is non-variational and has resisted a clean analytic, low-scaling formulation.

These two routes have never been combined. Efficient GPU realizations of the topology-correct manifolds already exist: Bannwarth, Yu, Hohenstein, and Martínez established hh-TDA as a method [4], and Yu and co-workers [41] computed hh-TDA energies, gradients, and nonadiabatic coupling vectors on a datacenter GPU stack and propagated photochemical dynamics with them—so hh-TDA/pp-TDA forces and couplings on a GPU are not, in themselves, new. Both realizations are, however, confined to global and range-separated hybrid functionals. The double-hybrid regime—where a second-order (PT2) correction supplies the dynamic correlation those functionals lack—has remained out of reach: no analytic derivative coupling for a double-hybrid excited state has been reported. We report the first such coupling—extending the analytic-coupling capability deferred in the original hh-TDA method paper of Bannwarth et al. [4], and later implemented for hybrids by Yu et al. [41] as CASCI-type analytic couplings, into the double-hybrid regime—from a single reverse-mode contraction-DAG engine, oracle-validated; the reference SCF, the hh-TDA/pp-TDA gradients and NACMEs, and the double-hybrid coupling all run device-resident and AO-direct within the 8 GB of a consumer GPU, each validated against its determinant/finite-difference oracle (Table 4). Supplying it is the central result of this work, and it is reached without leaving the engine that produces the hh-TDA/pp-TDA forces themselves. Around that headline sit three enabling contributions that distinguish the present construction from the prior efficient implementations: every electronic response is obtained as one reverse-mode transpose of a single contraction graph—one engine spanning hh-TDA, pp-TDA, and the double-hybrid coupling, rather than per-method hand-derived response code [32, 43, 44]; the pipeline is fully AO-direct and never forms a four-index molecular-orbital tensor [30, 1, 20]; and the whole calculation fits the 8 GB of a consumer RTX 4060, whereas the prior efficient realizations of these methods ran on datacenter GPUs [4, 41, 34, 35].

Obtaining analytic gradients and NACMEs for any one of these methods has traditionally meant re-deriving the response (relaxation) equations by hand and implementing them, per method and per property, in the molecular-orbital basis on capable hardware. Here we obtain all of them automatically—as the reverse-mode transpose (the same mechanism as backpropagation in machine learning) of a single contraction graph—and engineer the resulting non-symmetric Coulomb/exchange kernels to run within the 8 GB budget of a consumer NVIDIA GeForce RTX 4060, putting a capability that today needs a cluster allocation onto a card a student already owns.

Each ingredient has a mature literature, and we engage it directly so the contribution is not overstated. The hh-TDA/pp-TDA energy methods are those of van Aggelen, Yang, and co-workers [36, 39] and, in the range-separated-hybrid form used here, Bannwarth, Yu, Hohenstein, and Martínez [4]; the double-hybrid excited-state scaling is Grimme–Neese [15] with the CIS(D) parent of Head-Gordon and co-workers [21]. The reverse-mode view of relaxation is likewise not new: differentiable programming through electronic structure yields gradients and response densities by automatic differentiation, from the Hartree–Fock proof of concept of Tamayo-Mendoza et al. [32] to the PySCFAD framework of Zhang and Chan [43] and the reverse-mode coupled-cluster response of Zhang et al. [44]. Resolving correlated denominators directly in the atomic-orbital basis by a Laplace transform [1, 20] underlies the AO-direct Laplace MP2 gradient of Ochsenfeld and co-workers [30, 8]. What remains open is their union for the density-functional excited-state family: (i) relaxation obtained as one reverse-mode graph transpose, uniform across hh-TDA/pp-TDA and the double-hybrid coupling and across gradients and NACMEs; (ii) a fully AO-direct pipeline that never forms a four-index molecular-orbital tensor; and (iii) an ordered, non-symmetric transition-density J/KJ/K kernel that runs under a consumer memory budget. This work is that union, and it is a companion to our equation-of-motion coupled-cluster realization of the same construction [17].

A methodological thread runs throughout: because the doubles-sector coupling is non-variational and has no eigenvalue-stationarity to lean on, we validate not against an internal consistency identity—which a plausible but wrong ansatz can satisfy—but against a literal many-electron wavefunction-overlap finite-difference oracle that shares no code path with the analytic method (Sec. III). That oracle caught an earlier gradient-Lagrangian construction modeling the wrong physical object, and it is the standard against which every analytic term below is gated.

II Theory

II.1 Relaxation as the contraction-DAG transpose

Let a scalar molecular property EE be computed by a directed acyclic graph whose nodes are elementary operations—arithmetic, and coarse matrix-level operations such as the Coulomb build J​(P)J(P), exchange K​(P)K(P), long-range exchange KLR​(P)K_{\mathrm{LR}}(P), the exchange-correlation potential Vx​c​(P)V_{xc}(P), and the generalized eigensolve F​C=S​C​EFC=SCE. A first derivative of EE with respect to any input—a nuclear coordinate ξ\xi, an orbital rotation, an amplitude—is a single reverse (adjoint) pass over the same DAG, in which each node y=f​(x)y=f(x) contributes its vector–Jacobian product x¯+=(∂f/∂x)⊤y¯\bar{x}\mathrel{+}=(\partial f/\partial x)^{\!\top}\bar{y}. For electronic-structure energies this reproduces exactly the Lagrangian/ZZ-vector machinery of analytic-derivative theory [26, 19], derived mechanically rather than by hand.

Two properties make it exact and practical. First, every two-electron and response operation is self-adjoint with respect to the Frobenius pairing ⟨A,B⟩=Tr​[A⊤​B]\langle A,B\rangle=\mathrm{Tr}[A^{\!\top}B],

J​(P)→J​(P¯),K​(P)→K​(P¯),KLR​(P)→KLR​(P¯),Vx​c​(P)→fx​c⋅P¯,J(P)\to J(\bar{P}),\qquad K(P)\to K(\bar{P}),\qquad K_{\mathrm{LR}}(P)\to K_{\mathrm{LR}}(\bar{P}),\qquad V_{xc}(P)\to f_{xc}\!\cdot\!\bar{P}, (1)

so the adjoint reuses the forward kernel. Second, the self-consistent (SCF/eigenvalue) reference is handled by one adjoint solve: differentiating through the SCF fixed point yields the orbital-relaxation response as a single ZZ-vector (CPHF-transpose),

L​z=b,L​[z]=(εa−εi)​za​i+(A+B)​[z]a​i,L\,z=b,\qquad L[z]=(\varepsilon_{a}-\varepsilon_{i})\,z_{ai}+(A\!+\!B)[z]_{ai}, (2)

restricted to the occupied–virtual block, replacing one CPHF solve per perturbation; the Hellmann–Feynman part of a simple eigenvalue λk\lambda_{k} seeds the cotangent ∂λk/∂A=xk​xk⊤\partial\lambda_{k}/\partial A=x_{k}x_{k}^{\!\top}. The engine is implemented once, as a set of graph-optimization passes over a common transposable-DAG protocol, and is reused for ground-state forces, TDDFT, hh-TDA/pp-TDA, and the double-hybrid coupling. A machine-precision cross-check of the engine—analytic versus symbolic differentiation, and transpose-of-transpose versus analytic second derivatives—carries no finite-difference floor.

II.2 The AO-direct Laplace representation

The conventional route to a correlated gradient forms molecular-orbital (MO) two-electron integrals by an O​(N5)O(N^{5}) four-index transformation and stores an O​(o2​v2)O(o^{2}v^{2}) tensor. Both are avoided by never leaving the AO basis. Writing an orbital-energy denominator as a Laplace transform [1, 20] and discretizing with a short minimax quadrature [31, 6],

1Di​j​a​b≈∑k=1nLwk​e−αk​Di​j​a​b=∑kwk​[eαk​εi]​[e−αk​εa]​[eαk​εj]​[e−αk​εb],\frac{1}{D_{ijab}}\approx\sum_{k=1}^{n_{L}}w_{k}\,e^{-\alpha_{k}D_{ijab}}=\sum_{k}w_{k}\big[e^{\alpha_{k}\varepsilon_{i}}\big]\big[e^{-\alpha_{k}\varepsilon_{a}}\big]\big[e^{\alpha_{k}\varepsilon_{j}}\big]\big[e^{-\alpha_{k}\varepsilon_{b}}\big], (3)

the denominator factorizes over the four orbital indices (nL∼8n_{L}\!\sim\!8–1010). Each amplitude or pseudo-density is then assembled from energy-scaled orbital coefficients C~μ​p(k)=Cμ​p​e∓αk​εp/2\tilde{C}^{(k)}_{\mu p}=C_{\mu p}e^{\mp\alpha_{k}\varepsilon_{p}/2} and contracted through the ordinary AO J/KJ/K build on the same integrals the SCF already uses, at a cost of nLn_{L} builds and O​(N2)O(N^{2}) storage rather than an O​(N5)O(N^{5}) transformation [3, 8]. For the CIS(D) doubles the denominator is Di​j​a​b+ΩKD_{ijab}+\Omega_{K}; the same factorization holds with an Ω\Omega-shifted quadrature. This “LT-AO” choice is what makes the J/KJ/K build—not a four-index MO transform—the natural and only integral primitive for gradients and couplings alike.

II.3 The non-symmetric AO-Laplace J/KJ/K kernel

Single-state energy gradients contract a derivative integral with a single density (or a symmetric density pair), so the geometry J/KJ/K build is symmetric in its two arguments. Interstate and response quantities are different: they contract a derivative integral with a left weight density from one state and a right density from another. The required primitive is therefore

Jξ​(WL,WR)=∂ξ∑μ​ν​λ​σWLμ​ν​(μ​ν|λ​σ)​WRλ​σ,WL≠WL⊤,WR≠WR⊤,J^{\xi}(W_{\mathrm{L}},W_{\mathrm{R}})=\partial_{\xi}\sum_{\mu\nu\lambda\sigma}W_{\mathrm{L}}^{\mu\nu}(\mu\nu|\lambda\sigma)W_{\mathrm{R}}^{\lambda\sigma},\qquad W_{\mathrm{L}}\neq W_{\mathrm{L}}^{\!\top},\ \ W_{\mathrm{R}}\neq W_{\mathrm{R}}^{\!\top}, (4)

and analogously for KξK^{\xi}. The novelty is per-argument: the left and right weight densities are independent (WL≠WRW_{\mathrm{L}}\neq W_{\mathrm{R}} in general) and each is itself non-symmetric (W≠W⊤W\neq W^{\!\top})—the structural signature of a bra≠\,\neq\,ket contraction (the antisymmetric part of WW contributes only through the KK channel; JJ retains its symmetric part). This is not a non-commutativity under argument swap: the fully index-contracted object in Eq. (4) is a scalar, invariant under WL↔WRW_{\mathrm{L}}\!\leftrightarrow\!W_{\mathrm{R}} by the bra–ket symmetry (μ​ν|λ​σ)=(λ​σ|μ​ν)(\mu\nu|\lambda\sigma)=(\lambda\sigma|\mu\nu) that the derivative integral retains. The general primitive is this non-symmetric build; ordinary symmetric J/KJ/K is its WL=WRW_{\mathrm{L}}=W_{\mathrm{R}} (with W=W⊤W=W^{\!\top}) special case. Every gradient and coupling here is one of these two cases, fixed entirely by the symmetry of the density pair the response derivation produces: symmetric self-density energy terms use symmetric J/KJ/K; cross-density terms already present in energy gradients (e.g. the separable correlation force, Jξ​(P(2),DSCF)J^{\xi}(P^{(2)},D^{\mathrm{SCF}})) and interstate couplings (bra and ket transition densities, Jξ​(WL(I),WR(J))J^{\xi}(W_{\mathrm{L}}^{(I)},W_{\mathrm{R}}^{(J)})) use the non-symmetric kernel. The kernel is implemented in the Cholesky-decomposed (RI-free) representation [5, 22, 2], taking independent left/right weight densities. The energy-level non-symmetric CD J/KJ/K build—K=BV⊤​BUK=B_{V}^{\!\top}B_{U} with distinct left/right half-transforms BU=U​BB_{U}\!=\!UB, BV=V​BB_{V}\!=\!VB, of which the symmetric build is the U=VU\!=\!V special case—and the per-quartet Head-Gordon–Pople/Obara–Saika recurrence kernel—emitted by the recurrence-relation code-generation framework of Ref. [18]—are the shared device engine of the companion work [17]; here we reuse that engine and add the kernels the geometry derivative and the density functional demand (Sec. IV.1).

II.4 From response density to gradient: the J/KJ/K contraction

The two-electron term of the assembled gradient Eξ=∑Pμ​ν​hμ​νξ+∑Wμ​ν​Sμ​νξ+∑Γμ​ν​λ​σ​(μ​ν|λ​σ)ξE^{\xi}=\sum P_{\mu\nu}h^{\xi}_{\mu\nu}+\sum W_{\mu\nu}S^{\xi}_{\mu\nu}+\sum\Gamma_{\mu\nu\lambda\sigma}(\mu\nu|\lambda\sigma)^{\xi} is the single point at which every symbolic response equation meets the nuclear gradient. When the relaxed two-particle density factorizes over a pair of one-particle weight densities—as it does for each response block generated by the reverse pass— the contraction with the derivative integrals is a Laplace J/KJ/K build,

∑μ​ν​λ​σΓμ​ν​λ​σ​(μ​ν|λ​σ)ξ=aJ​Jξ​(WL,WR)+aK​Kξ​(WL,WR).\sum_{\mu\nu\lambda\sigma}\Gamma_{\mu\nu\lambda\sigma}(\mu\nu|\lambda\sigma)^{\xi}=a_{J}\,J^{\xi}(W_{\mathrm{L}},W_{\mathrm{R}})+a_{K}\,K^{\xi}(W_{\mathrm{L}},W_{\mathrm{R}}). (5)

The symbolic response term lists are generated with a second-quantization algebra tool and cross-checked against the numerical densities at machine precision; each object maps to one contraction of Eq. (5) with WLW_{\mathrm{L}} (bra) and WRW_{\mathrm{R}} (ket) identified term by term (Supp. Mat.).

II.5 The two topology-correct manifolds: hh-TDA and pp-TDA

The hh-TDA states are eigenvectors XIX_{I} of a Hermitian matrix Ah​hA^{hh} built on an (N+2)(N\!+\!2)-electron (dianion) range-separated-hybrid reference [36, 39, 4]; the NN-electron ground and excited states are two eigenvectors of the same problem, reached by double annihilation over the occupied space. pp-TDA is the mirror on an (N−2)(N\!-\!2) (dication) reference, with Ap​pA^{pp} over the virtual (particle) space [38, 37]. Because S0S_{0} and S1S_{1} are eigenvectors of one Hermitian problem, their coupling does not structurally vanish and the conical-intersection seam has the correct F−2F\!-\!2 dimensionality. The excited-state eigenvalue gradient is a Rayleigh quotient derivative, d​λk/d​R=⟨Xk|d​A/d​R|Xk⟩\mathrm{d}\lambda_{k}/\mathrm{d}R=\langle X_{k}|\,\mathrm{d}A/\mathrm{d}R\,|X_{k}\rangle, and reduces (Sec. II.1) to a geminal skeleton term Jξ/Kξ​(PX,PX)J^{\xi}/K^{\xi}(P^{X},P^{X}) plus a single combined ZZ-vector whose relaxed density PeffP^{\mathrm{eff}} and energy-weighted density WeffW^{\mathrm{eff}} contract the Fock and overlap derivatives—one CPHF engine, no per-state hand derivation [26, 19, 42]. The interstate coupling τI​J=⟨ΨI|∂/∂R|ΨJ⟩\tau_{IJ}=\langle\Psi_{I}|\partial/\partial R|\Psi_{J}\rangle factorizes through a two-hole (two-particle) Löwdin/Slater–Condon reduction into an amplitude-response and an orbital-connection term, both built from the same non-symmetric J/KJ/K primitive [24, 9]. The range-separated exchange (wB97X) enters through the long-range KLRK_{\mathrm{LR}} channel, evaluated device-resident.

II.6 The double-hybrid coupling: working equations

The double-hybrid capability that distinguishes this work from prior efficient excited-state implementations rests on a first-principles derivation of the doubles-sector derivative coupling, which we give here in full because it is both new and subtle. The reference is the B2PLYP Kohn–Sham determinant [16], whose exchange mixes 53%53\% exact (HF) exchange with 47%47\% B88 and whose correlation mixes 73%73\% LYP with a second-order perturbative (PT2) contribution scaled by cPT2=0.27c_{\mathrm{PT2}}=0.27; the singles enter through TDA on this hybrid part, and the PT2 scaling cPT2c_{\mathrm{PT2}} multiplies the entire doubles-sector correction derived below. A double-hybrid excited state adds to the CIS/TDA root a first-order Rayleigh–Schrödinger doubles correction [21, 29],

|ΨK⟩=|SK⟩+|DK⟩,|SK⟩=∑i​aRi​aK​|Φia⟩,|DK⟩=∑i<j,a<bc(i​j)​(a​b)K​|Φi​ja​b⟩,|\Psi_{K}\rangle=|S_{K}\rangle+|D_{K}\rangle,\qquad|S_{K}\rangle=\sum_{ia}R^{K}_{ia}|\Phi_{i}^{a}\rangle,\qquad|D_{K}\rangle=\sum_{i<j,\,a<b}c^{K}_{(ij)(ab)}|\Phi_{ij}^{ab}\rangle, (6)

with the doubles coefficient carrying the CIS(D) numerator over a shifted denominator,

c(i​j)​(a​b)K=ui​j​a​bKDi​j​a​b+ΩK,Di​j​a​b=εa+εb−εi−εj,c^{K}_{(ij)(ab)}=\frac{u^{K}_{ijab}}{D_{ijab}+\Omega_{K}},\qquad D_{ijab}=\varepsilon_{a}+\varepsilon_{b}-\varepsilon_{i}-\varepsilon_{j}, (7)

ΩK\Omega_{K} the CIS excitation energy and uK=ℒ​[RK]u^{K}=\mathcal{L}[R^{K}] the denominator-free, antisymmetrized numerator—linear in the singles amplitude and in the molecular two-electron integrals, ui​j​a​b=∑c(⟨a​b∥c​j⟩​Ri​c−⟨a​b∥c​i⟩​Rj​c)+∑k(⟨k​a∥i​j⟩​Rk​b−⟨k​b∥i​j⟩​Rk​a)u_{ijab}=\sum_{c}(\langle ab\|cj\rangle R_{ic}-\langle ab\|ci\rangle R_{jc})+\sum_{k}(\langle ka\|ij\rangle R_{kb}-\langle kb\|ij\rangle R_{ka}). Because ⟨ΨI|ΨJ⟩=0\langle\Psi_{I}|\Psi_{J}\rangle=0 at a single geometry, 1/NI​NJ1/\sqrt{N_{I}N_{J}} (with NK=12+∑(cK)2N_{K}=\tfrac{1}{2}+\sum(c^{K})^{2}) is an exact constant prefactor, and the doubles-sector coupling separates into three physically distinct contributions,

dI​J(D)=d[sd]+d[ds]⏟singles×doubles+d[dd,amp]⏟DD amplitude-response+d[dd,orb]⏟DD orbital-connection.d^{(D)}_{IJ}=\underbrace{d^{[\mathrm{sd}]}+d^{[\mathrm{ds}]}}_{\text{singles}\times\text{doubles}}+\underbrace{d^{[\mathrm{dd,amp}]}}_{\begin{subarray}{c}\text{DD amplitude-}\\ \text{response}\end{subarray}}+\underbrace{d^{[\mathrm{dd,orb}]}}_{\begin{subarray}{c}\text{DD orbital-}\\ \text{connection}\end{subarray}}. (8)

The doubles coefficient of Eq. (7) is the unscaled CIS(D) form: the PT2 weight cPT2c_{\mathrm{PT2}} appears nowhere in uKu^{K}, in Di​j​a​bD_{ijab}, or in cKc^{K}. In a double hybrid cPT2c_{\mathrm{PT2}} is the single empirical prefactor multiplying the entire second-order correlation correction to the energy, ΩKDH=ΩKTDA+cPT2​Δ​EK(2)\Omega^{\mathrm{DH}}_{K}=\Omega^{\mathrm{TDA}}_{K}+c_{\mathrm{PT2}}\,\Delta E^{(2)}_{K}, exactly as EDH=Ehyb+cPT2​E(2)E^{\mathrm{DH}}=E^{\mathrm{hyb}}+c_{\mathrm{PT2}}E^{(2)} for the ground state. The doubles-sector contribution to every property therefore carries this single prefactor cPT2c_{\mathrm{PT2}}, which pulls through the auxiliary-ansatz (Send–Furche/Ou) construction of the coupling, so the coupling is exactly affine in cPT2c_{\mathrm{PT2}}, dI​J=dI​Jref+cPT2​dI​J(D)d_{IJ}=d^{\mathrm{ref}}_{IJ}+c_{\mathrm{PT2}}\,d^{(D)}_{IJ} with cPT2=0.27c_{\mathrm{PT2}}=0.27, a single, uniform cPT2c_{\mathrm{PT2}} on the whole d(D)=d[sd]+d[ds]+d[dd]d^{(D)}=d^{[\mathrm{sd}]}+d^{[\mathrm{ds}]}+d^{[\mathrm{dd}]}—without the coupling being a derivative of the energy. Here drefd^{\mathrm{ref}} is the TDA (CIS-like) coupling of the B2PLYP hybrid reference—built from the B2PLYP Kohn–Sham orbitals and the hybrid-kernel TDA response (53%53\% exact exchange, 47%47\% B88, 73%73\% LYP), not an HF-based CIS coupling. The differing homogeneity of the blocks in the doubles coefficient cKc^{K}—d[sd],d[ds]d^{[\mathrm{sd}]},d^{[\mathrm{ds}]} linear in cc, d[dd]d^{[\mathrm{dd}]} bilinear—does not translate into differing powers of cPT2c_{\mathrm{PT2}}: this structure is intrinsic to the plain CIS(D) ansatz, which contains no cPT2c_{\mathrm{PT2}}, and cKc^{K} is itself cPT2c_{\mathrm{PT2}}-independent. A block-dependent weighting such as cPT2​(d[sd]+d[ds])+cPT22​d[dd]c_{\mathrm{PT2}}(d^{[\mathrm{sd}]}+d^{[\mathrm{ds}]})+c_{\mathrm{PT2}}^{2}d^{[\mathrm{dd}]} would not be the geometric derivative of the B2PLYP energy and is excluded. The oracle validation of Sec. V.5 targets the unscaled d(D)d^{(D)} and is therefore independent of the value of cPT2c_{\mathrm{PT2}}. Which term dominates flips between state pairs, so all three are required; a naive gradient-Lagrangian ansatz reproduces none, because the CIS(D) doubles are a non-variational first-order correction with no eigenvalue stationarity and hence no numerator-over-gap form (this is what the oracle of Sec. III exposed). The nearest prior doubles-sector excited-state derivative is the SOS-CIS(D0) analytic gradient of Rhee and co-workers [28]; the object here is instead the doubles-sector derivative coupling between two states, generated by the graph transpose rather than a hand-coded Lagrangian. The closest existing analytic derivative coupling of a doubles-corrected wavefunction is that of Teh and Subotnik [33] for CIS plus a single double, which the double-hybrid CIS(D) coupling generalizes.

DD amplitude-response.

Differentiating the doubles overlap ∑LcLI​∂ξcLJ\sum_{L}c^{I}_{L}\,\partial_{\xi}c^{J}_{L} with the quotient rule on Eq. (7), and defining the fixed reference weight bL=cLI/(DL+ΩJ)b_{L}=c^{I}_{L}/(D_{L}+\Omega_{J}),

d[dd,amp]∝∑LbL​∂ξuLJ−∑L(bL​cLJ)​∂ξDL−(∑LbL​cLJ)​∂ξΩJ,d^{[\mathrm{dd,amp}]}\!\propto\!\sum_{L}b_{L}\,\partial_{\xi}u^{J}_{L}-\!\sum_{L}(b_{L}c^{J}_{L})\,\partial_{\xi}D_{L}-\!\Big(\!\sum_{L}b_{L}c^{J}_{L}\!\Big)\partial_{\xi}\Omega_{J}, (9)

a numerator response plus an orbital-energy (∂ξDL\partial_{\xi}D_{L}) and an excitation-energy (∂ξΩJ\partial_{\xi}\Omega_{J}) response. Since uJ=ℒ​[RJ]u^{J}=\mathcal{L}[R_{J}] is bilinear in (MO-ERI,RJ)(\text{MO-ERI},R_{J}), the leading scalar ∑LbL​uLJ=⟨w,RJ⟩\sum_{L}b_{L}u^{J}_{L}=\langle w,R_{J}\rangle with the adjoint numerator w=ℒ†​[b]w=\mathcal{L}^{\dagger}[b] splits additively,

∂ξ⟨w,RJ⟩=⟨b,(∂ξℒ)​[RJ]⟩⏟ERI/​C​-response+⟨w,∂ξRJ⟩⏟R​-response.\partial_{\xi}\!\langle w,R_{J}\rangle=\underbrace{\langle b,(\partial_{\xi}\mathcal{L})[R_{J}]\rangle}_{\text{ERI/}C\text{-response}}+\underbrace{\langle w,\partial_{\xi}R_{J}\rangle}_{R\text{-response}}. (10)

The ERI/CC-response collapses the four uu-block terms into a pair of one-particle weight densities—left from bb (state II), right from RJR_{J} (state JJ)—whose skeleton is exactly the non-symmetric build Jξ​(WL,WR)J^{\xi}(W_{\mathrm{L}},W_{\mathrm{R}}) of Eq. (4) with WL(I)≠WR(J)W_{\mathrm{L}}^{(I)}\!\neq\!W_{\mathrm{R}}^{(J)}, and whose orbital-relaxation part folds into one SCF ZZ-vector [Eq. (2), L=2​J−ax​K+2​fx​cL=2J-a_{x}K+2f_{xc}]. The RR-response is the eigenvector derivative, folded into one CIS-space ZZ-vector,

(A−ΩJ)​λ=P⟂​w,P⟂=1−RJ​RJ⊤,⟨w,∂ξRJ⟩=−⟨λ,(∂ξA)​RJ⟩,(A-\Omega_{J})\,\lambda=P_{\perp}w,\qquad P_{\perp}=1-R_{J}R_{J}^{\!\top},\qquad\langle w,\partial_{\xi}R_{J}\rangle=-\langle\lambda,(\partial_{\xi}A)R_{J}\rangle, (11)

where (∂ξA)​RJ(\partial_{\xi}A)R_{J} is the transition CIS AA-matrix derivative (skeleton integrals +∂ξε++\,\partial_{\xi}\varepsilon\,+ the moving-grid fx​cf_{xc} response). This eigenvector response is not obtainable by polarizing the excitation-energy gradient—that is the eigenvalue derivative—and requires the genuine coupled-perturbed-CIS solve of Eq. (11) [11, 25].

DD orbital-connection.

With amplitudes frozen, the determinant-overlap derivative ∂ξ⟨ΦL|ΦM⟩\partial_{\xi}\langle\Phi_{L}|\Phi_{M}\rangle is a one-body operator surviving only when L,ML,M differ by ≤1\leq 1 spin-orbital; summed against cLI​cMJc^{I}_{L}c^{J}_{M} it is the doubles transition one-particle density contracted with the orbital connection TT,

d[dd,orb]∝∑a​bγv​va​b​Tv​va​b+∑i​jγo​oi​j​To​oj​i,γv​va​b=12​∑i​j​cti​j​a​cI​ti​j​b​cJ,γo​oi​j=−12​∑k​a​bti​k​a​bI​tj​k​a​bJ,d^{[\mathrm{dd,orb}]}\propto\sum_{ab}\gamma_{vv}^{ab}\,T_{vv}^{ab}+\sum_{ij}\gamma_{oo}^{ij}\,T_{oo}^{ji},\qquad\gamma_{vv}^{ab}=\tfrac{1}{2}\sum_{ijc}t^{I}_{ijac}t^{J}_{ijbc},\qquad\gamma_{oo}^{ij}=-\tfrac{1}{2}\sum_{kab}t^{I}_{ikab}t^{J}_{jkab}, (12)

with T=C0⊤​[∂ξS]AO​C0+C0⊤​S​∂ξCT=C_{0}^{\!\top}[\partial_{\xi}S]_{\mathrm{AO}}C_{0}+C_{0}^{\!\top}S\,\partial_{\xi}C: an AO overlap-derivative (electron-translation-factor/Pulay) part [9, 27] plus the same orbital response ∂ξC\partial_{\xi}C as above. This is the doubles-sector analogue of the force’s energy-weighted-density term [26, 19].

Singles×\timesdoubles connection.

Since ⟨SI|DJ⟩=0\langle S_{I}|D_{J}\rangle=0 at δ=0\delta=0, the product rule kills the amplitude-response, leaving a pure orbital connection in which a single and a double join at first order only through exactly one spin-orbital—routing d[sd]d^{[\mathrm{sd}]} to the occupied–virtual and d[ds]d^{[\mathrm{ds}]} to the virtual–occupied block of TT. Every two-electron piece of all three contributions is one instance of the single non-symmetric J/KJ/K primitive Eq. (4); the orbital and eigenvector relaxations are two reusable ZZ-vector solves. The complete term-by-term derivation, the second-quantization–generated response lists, and the per-contribution numerical validation are in the Supplementary Material.

III Validation: the literal wavefunction-overlap oracle

An analytic derivative that reuses response machinery in its own validation can be consistently wrong: a shared error is invisible to a shared-machinery test. We therefore validate against a finite difference of the literal many-electron overlap

SI​J​(δ)=⟨ΨI​(R)|ΨJ​(R+δ)⟩,dI​Jξ=∂ξSI​J/NI​NJ,S_{IJ}(\delta)=\langle\Psi_{I}(R)|\Psi_{J}(R+\delta)\rangle,\qquad d^{\xi}_{IJ}=\partial_{\xi}S_{IJ}/\sqrt{N_{I}N_{J}}, (13)

built only from the states’ amplitudes and the cross-geometry molecular-orbital overlaps —no orbital response, no energy-weighted density, no derivative integral, and no line of the analytic assembler. Each block is a sum over configuration pairs of a cross-geometry Slater-determinant overlap, expressed through a generalized biorthogonal replacement determinant obtained from the matrix determinant lemma; two parameter-free anchors pin it (bit-exact agreement with brute-force replacement determinants, and an exact u→0u\!\to\!0 scaling reduction with integer ratios 33 and 99), and at one replacement it reduces algebraically to the trusted singles (TDA) overlap. Choosing what is frozen during the finite difference isolates each contribution of Sec. II.6 against its own ground truth, so every analytic term is gated separately rather than only in the assembled total. This oracle is what exposed an earlier gradient-Lagrangian ansatz as modeling a rescaled configuration-interaction singles coupling rather than the doubles sector.

IV Computational Details

All device kernels run on a single NVIDIA GeForce RTX 4060 (8 GB), in the GPU quantum-chemistry tradition of TeraChem [34, 35]. Device memory is arena-owned (a single allocation, sub-allocated by bump); dense linear algebra uses cuBLAS/cuSOLVER. The Coulomb/exchange derivative kernel evaluates analytical Head-Gordon–Pople/Obara–Saika derivative integrals on Cholesky-factored densities via the non-symmetric build of Eq. (4); range-separated exchange uses the long-range Boys route. Grid-based exchange-correlation contributions use a moving-grid kernel on a level-4 SSF quadrature, and the reference SCF is converged to 10−10​Eh10^{-10}\,E_{h} in energy. The reference SCF is a Kohn–Sham calculation (B2PLYP [16]—53%53\% HF plus 47%47\% B88 exchange, 73%73\% LYP plus 27%27\% PT2 correlation, cPT2=0.27c_{\mathrm{PT2}}=0.27—for the double-hybrid coupling, whose PT2 scaling multiplies the doubles-sector energy and coupling corrections; range-separated wB97X [7] on the (N±2)(N\!\pm\!2) references for hh-TDA/pp-TDA). Correctness is reported at two substrates: a double-precision Cholesky factor (machine-exact) and a single-precision factor (the production substrate, whose accumulation-order floor is ∼10−5\sim\!10^{-5}, an order of magnitude inside the coupling’s ∼10−4\sim\!10^{-4} achieved analytic-vs-oracle agreement). Every device numerical gate includes an ff-shell (L=3L=3) system and reports the maximum angular momentum, and all reported performance numbers use the ahead-of-time-compiled kernel library. Validation systems are H2​O\text{H}{\vphantom{\text{X}}}_{\smash[t]{\text{2}}}\text{O} in STO-3G (where the overlap oracle is tractable) and cc-pVTZ (the ff-shell kernel scale); the chromophore performance series (Sec. V.6) spans seven calculations of 236236–472472 AOs across the def2-SVP, pcseg-0, and def2-TZVP basis sets, with ff-shell (L=3L=3) cases (ferrocene, octane) among them.

IV.1 New device kernels beyond the shared engine

The energy-level non-symmetric CD J/KJ/K build and the per-quartet HGP–OS recurrence kernel are the shared engine of the companion EOM-CC work [17]; two kernel families are new here (Fig. 1).

The split derivative-Fock build. The two-electron geometry derivative of a coupling would naively loop the non-symmetric build of Eq. (4) over all novn_{\rm ov} orbital pairs. Instead a single “split” kernel emits the full derivative Fock tensor H​[atom,ξ,μ,ν]=∂ξ(2​J−ax​K)​[P0]H[\text{atom},\xi,\mu,\nu]=\partial_{\xi}(2J-a_{x}K)[P_{0}] in O​(Natom)O(N_{\rm atom}) device launches, from which the coupling’s occupied–virtual projection gi​a=Co⊤​H​Cvg_{ia}=C_{o}^{\!\top}HC_{v} is a pair of cuBLAS GEMMs (Fig. 1a). The profile-guided collapse of its dominant two-center metric term—65,26865{,}268 single-column micro-launches at ∼2%\sim\!2\% streaming-multiprocessor throughput rebuilt as 196196 full-occupancy launches—is the final 3.9×3.9\times stage of the ∼133×\sim\!133\times cascade quantified in Sec. V.6, FP64 bit-identical throughout.

The DFT grid stack. A double-hybrid excited-state coupling needs the exchange-correlation grid at three derivative orders, none of which exists in a wavefunction engine: the Kohn–Sham potential Vx​cV_{xc}, its first functional derivative fx​cf_{xc} (the CPHF/response Fock), and its second gx​cg_{xc} (the transition-density force), all on a device-resident Stratmann–Scuseria–Frisch (SSF) quadrature (Fig. 1b). The SSF partition weights are themselves a new kernel: the textbook host build materializes an O​(Natom2​ng)O(N_{\rm atom}^{2}\,n_{g}) array (∼27\sim\!27 TB for an illustrative 9494-atom system) and cannot run at scale, so each weight is computed with O​(1)O(1) memory per grid point—one thread per point, the partition product accumulated on the fly with an early cull exploiting SSF locality—FP32-safe to 2×10−42\times 10^{-4}. On this grid Vx​cV_{xc} is a persistent per-iteration operator: the geometry-fixed inputs (grid, primitive tables, screened pair lists) are baked into a shared library compiled once, then driven each SCF step by the density alone through a three-pass density-gather →\to functional →\to  potential-scatter pipeline. The response operator fx​cf_{xc} reuses that same gather and scatter verbatim; the transition-density force gx​cg_{xc} adds the moving-grid nuclear derivative—a Pulay AO-derivative term, a grid-point-motion term, and a weight-response term contracting the SSF weight derivative—carrying the third functional derivatives. Because Vx​cV_{xc}’s functional kernel is nvcc-compiled once per geometry, it is the single component evaluated outside the ahead-of-time-frozen library (a one-time per-geometry compile, disclosed; the J/KJ/K and derivative-Fock kernels are fully frozen).

(a) split derivative-Fock kernel per-pair reference novn_{\rm ov} builds, O​(nov)O(n_{\rm ov}) launches split kernel H​[atom,ξ,μ​ν]H[\text{atom},\xi,\mu\nu] O​(Natom)O(N_{\rm atom}) launches cuBLAS projection gi​a=Co⊤​H​Cvg_{ia}=C_{o}^{\!\top}H\,C_{v} collapse2 GEMMs non-symmetric Jx​(WL,WR)J^{x}(W_{L},W_{R}): each W≠W⊤W\!\neq\!W^{\top}, WL≠WRW_{L}\!\neq\!W_{R} (bra≠\neqket); symmetric is WL=WRW_{L}{=}W_{R} DJ2C metric: 65,26865{,}268 launches @ ∼2%\sim\!2\% SM one-pass: 196196 @ 5555–72%72\% SM bit-exact(b) DFT grid stack (new to DFT) SSF weights O​(1)O(1)/point (host O​(N2​ng)=27O(N^{2}n_{g})\!=\!27 TB) gather ρ,∇ρ\rho,\nabla\rho Pass 1 ω\omegaB97X / B2PLYP functional Vx​cV_{xc} scatter Pass 3 fx​c⋅Xf_{xc}\!\cdot\!X response gx​cg_{xc} force moving grid: gdens+gmot+gwtg_{\rm dens}{+}g_{\rm mot}{+}g_{\rm wt}
Figure 1: The two device-kernel families new to this work, beyond the shared non-symmetric CD J/KJ/K engine of Ref. [17]. (a) The split derivative-Fock kernel emits the full geometry-derivative Fock tensor H​[atom,ξ,μ​ν]=∂ξ(2​J−ax​K)​[P0]H[\text{atom},\xi,\mu\nu]=\partial_{\xi}(2J-a_{x}K)[P_{0}] in O​(Natom)O(N_{\rm atom}) launches (blue: custom CUDA kernel), whose occupied–virtual projection is two cuBLAS GEMMs (teal); its dominant two-center metric (DJ2C) term is the launch-collapse of Sec. V.6. (b) The DFT exchange-correlation grid stack—absent from any wavefunction engine—built on device-resident SSF partition weights (O​(1)O(1) memory per grid point, versus an infeasible O​(Natom2​ng)O(N_{\rm atom}^{2}n_{g}) host array): a three-pass Vx​cV_{xc} operator (density-gather / functional / potential-scatter), the response Fock fx​cf_{xc} reusing the same gather and scatter, and the transition-density XC force gx​cg_{xc} adding the three moving-grid nuclear-derivative terms. Orange: grid/functional evaluation; blue: custom CUDA kernels.

V Results and Discussion

This section is organized around three advances beyond the hh-TDA method paper of Bannwarth et al. [4], which reported excitation energies and conical-intersection topology but neither analytic derivative couplings—explicitly named there as future work—nor a double-hybrid treatment. Each subsection below is the support for one of them. (A) The couplings themselves. We deliver analytic interstate derivative couplings for the hh-TDA and pp-TDA manifolds and for the double-hybrid, each validated against a literal determinant-overlap oracle (Secs. V.2, V.5) and evaluated exactly at the intersection seam—the regime where adiabatic linear-response TD-DFT gives τ≡0\tau\equiv 0 by construction, because S0S_{0} lies outside its response manifold. Only the double-hybrid coupling is first of its kind; the hh-TDA coupling reproduces on consumer hardware the datacenter-GPU capability of Yu and co-workers [41], and the pp-TDA coupling is its mirror on the (N−2)(N\!-\!2) reference—all three obtained from one uniform single-engine derivation. This is the quantity that turns a topology-correct energy method into one usable for nonadiabatic dynamics. (B) A double-hybrid accuracy hh-TDA cannot reach. The first-of-kind double-hybrid coupling arrives with a double-hybrid energy; the CIS(D) dynamic-correlation correction it carries measurably tightens the excitation energies and removes the systematic over-excitation bias that bare hh-TDA exhibits (Sec. 2). (C) Consumer hardware. The reference SCF and the shared Cholesky-decomposed J/KJ/K engine through which every method here is expressed are device-resident and timed on a single RTX 4060, where the efficient realizations of Refs. [4, 41] used datacenter GPUs; every excited-state object (gradients, NACMEs, the double-hybrid coupling) runs device-resident and AO-direct, oracle-validated. We quote no end-to-end device wall-clock, representing the device cost through the aot_frozen CD J/KJ/K primitives to which these paths reduce (Sec. V.6).

V.1 The license: the device engine reproduces hh-TDA

Before extending hh-TDA we confirm the device engine is hh-TDA. On the local subset of the Thiel gas-phase benchmark set (MP2/6-31G* geometries), the same molecules and states for which Bannwarth et al. [4] tabulate their own hh-TDA-ω\omegaB97X statistics, the device excitations reproduce Bannwarth’s published error statistics (MD/MAD/RMSD/SD\mathrm{MD}/\mathrm{MAD}/\mathrm{RMSD}/\mathrm{SD}: device 0.40/0.57/0.75/0.650.40/0.57/0.75/0.65 eV vs. reference 0.40/0.59/0.77/0.670.40/0.59/0.77/0.67 eV over N=30N=30 states) to within 0.030.03 eV in every statistic—a Cartesian-versus-spherical basis-convention shift, not a method difference. The two error distributions (Fig. 2) and the π​π∗\pi\pi^{*}/n​π∗n\pi^{*} splittings, including the characteristic hh-TDA over-splitting of the azine π​π∗\pi\pi^{*} states (Fig. 3), coincide with the reference.

Refer to caption
Figure 2: Device hh-TDA-ω\omegaB97X vertical-excitation error distribution versus the Thiel TBE reference (local set, N=30N=30 states), overlaid with the published hh-TDA-ω\omegaB97X distribution of Bannwarth et al. [4] (a Fig. 3 analog). The two Gaussians nearly coincide (device MD/MAD/SD=0.40/0.57/0.65\mathrm{MD}/\mathrm{MAD}/\mathrm{SD}=0.40/0.57/0.65 eV vs. reference 0.40/0.59/0.670.40/0.59/0.67 eV); the rug marks individual n​π∗n\pi^{*} and π​π∗\pi\pi^{*} errors.

Notably, the device even reproduces the reference’s systematic deviations—the azine π​π∗\pi\pi^{*} over-splitting is present at the same magnitude (Fig. 3, s-tetrazine and pyridazine)—which is the strongest possible parity check: the engine tracks not just where hh-TDA is right but where it is characteristically wrong. Having certified that the device engine reproduces hh-TDA where it is right and, more tellingly, where it is characteristically wrong, we now build on it the analytic derivative couplings it was constructed to deliver—beginning with the two topology-correct manifolds.

Refer to caption
Figure 3: π​π∗\pi\pi^{*}/n​π∗n\pi^{*} splittings across eleven chromophores (a Fig. 4 analog of Bannwarth et al. [4]): device hh-TDA-ω\omegaB97X (bars) versus the Thiel TBE reference, with Bannwarth’s published hh-TDA-ω\omegaB97X values overlaid as markers. The device reproduces the reference splittings, including the known hh-TDA over-splitting of the azine π​π∗\pi\pi^{*} states.

V.2 The topology-correct manifolds: hh-TDA and pp-TDA

The hh-TDA and pp-TDA excited-state eigenvalue gradients and the S0/S1S_{0}/S_{1} through-CI derivative couplings are obtained from the same reverse-mode ZZ-vector and non-symmetric J/KJ/K primitive as the double-hybrid coupling—one engine, three formalisms. The eigenvalue-gradient core is validated against finite differences to ∼10−6​Eh/a0\sim\!10^{-6}\,E_{h}/a_{0} on pure-exchange dication/dianion anchors across two basis sets, and the full range-separated-hybrid device gradient and NACME are validated against an independent explicit-UU (CPHF) reference and a many-electron two-hole/two-particle cofactor finite-difference overlap oracle: all four device gates—hh-TDA and pp-TDA gradient and NACME—pass at both L≤\leq2 and ff-shell (L=3L=3), with device gradients matching the host reference to ≤10−6\leq\!10^{-6}, interstate couplings to ≤10−4\leq\!10^{-4} against the overlap oracle, and exact translational invariance (∑AτA∼10−14\sum_{A}\tau_{A}\sim 10^{-14}). The through-CI couplings, computed exactly where couplings matter (at and near the seam), close the arc for the manifolds that carry the correct conical-intersection topology.

Table 1: Device gate results for the topology-correct manifolds (range-separated wB97X on the (N±2)(N\!\pm\!2) references). Eigenvalue gradients are checked against finite differences and against an explicit-UU (CPHF) host reference; interstate NACMEs against the two-hole/two-particle cofactor finite-difference overlap oracle. All four gates pass at both L≤2L\leq 2 and ff-shell (L=3L=3); entries are the established bounds (Sec. V.2). ∑AτA\sum_{A}\tau_{A} is the translational-invariance residual.
grad vs FD grad vs host NACME vs oracle ∑AτA\sum_{A}\tau_{A} max
method (Eh/a0E_{h}/a_{0}) (Eh/a0E_{h}/a_{0}) (rel.) (a−10{}_{0}^{-1}) LL
hh-TDA ∼10−6\sim\!10^{-6} ≤10−6\leq\!10^{-6} ≤10−4\leq\!10^{-4} ∼10−14\sim\!10^{-14} 3
pp-TDA ∼10−6\sim\!10^{-6} ≤10−6\leq\!10^{-6} ≤10−4\leq\!10^{-4} ∼10−14\sim\!10^{-14} 3

Table 1 collects the four device gates. That a single reverse-mode engine—one ZZ-vector solve and one non-symmetric J/KJ/K primitive—passes the gradient check against both finite differences and an independent CPHF reference, and the NACME check against a two-hole/two-particle cofactor overlap oracle, for both manifolds and at ff-shell (L=3L=3), is the concrete evidence that the derivation is not per-method: hh-TDA and pp-TDA differ only in which (N±2)(N\!\pm\!2) reference the same machinery is transposed through. Concretely, pp-TDA shares identical machinery with hh-TDA—only the (N−2)(N\!-\!2) dication (rather than (N+2)(N\!+\!2) dianion) reference differs—and is gated on formaldehyde: the S0/S1S_{0}/S_{1} NACME on the H2​CO\text{H}{\vphantom{\text{X}}}_{\smash[t]{\text{2}}}\text{CO} (N−2)(N\!-\!2) reference and the eigenvalue gradient on the H2​CO2+\text{H}{\vphantom{\text{X}}}_{\smash[t]{\text{2}}}\text{CO}{\vphantom{\text{X}}}^{\text{2+}} dication; the conical-intersection physics is showcased on the hh-TDA manifold (Sec. V.4). The vanishing coupling sum ∑AτA∼10−14\sum_{A}\tau_{A}\sim 10^{-14} confirms exact translational invariance of the interstate coupling, a nontrivial check that the electron-translation-factor/overlap-derivative term is assembled correctly. Because the couplings are evaluated exactly at and near the intersection seam—not extrapolated from an away-from-degeneracy region—the manifolds that carry the correct F−2F\!-\!2 topology come with couplings valid precisely where nonadiabatic dynamics needs them.

V.3 Conical-intersection topology on the twisted-ethylene benchmark

Refer to caption
Figure 4: Device hh-TDA reproduction of the twisted-ethylene S0/S1S_{0}/S_{1} double-cone conical-intersection topology of twisted ethylene, a canonical photochemical benchmark; the rigid torsion×\,\times\,pyramidalization hh-TDA scan reproduced here follows Bannwarth et al. [4] (hh-TDA-ω\omegaB97X/def2-SVP, RTX 4060). (a) The S0S_{0} and S1S_{1} surfaces over the torsion×\,\times\,pyramidalization branching plane form the characteristic double cone; the star marks the minimum-energy S0/S1S_{0}/S_{1} crossing. (b) The S1S_{1} energy (filled contours) with the S0/S1S_{0}/S_{1} gap “funnel” (red) closing onto the conical intersection (star). Because S0S_{0} is itself an eigenvector of the hh-TDA matrix, this S0S_{0}-involving intersection is described with the correct F−2F\!-\!2 branching-space dimensionality and the interstate derivative coupling is generically nonzero at the seam; adiabatic linear-response TD-DFT/TDA excludes S0S_{0} from its response manifold and gives τ≡0\tau\!\equiv\!0 there (F−1F\!-\!1), in every basis [23, 14].

Figure 4 reproduces on consumer hardware the twisted-ethylene S0/S1S_{0}/S_{1} conical-intersection topology that Ref. [4] established for hh-TDA: the rigid torsion×\,\times\,pyramidalization scan of 90∘90^{\circ}-twisted ethylene (hh-TDA-ω\omegaB97X/def2-SVP) yields the characteristic double cone and the minimum-energy S0/S1S_{0}/S_{1} crossing that adiabatic linear-response TDDFT structurally cannot produce. The distinction is not adiabaticity but manifold membership: because the hh-TDA ground and excited states are eigenvectors of one Hermitian matrix, S0S_{0} lies inside the response manifold, the S0S_{0}-involving intersection retains the correct F−2F\!-\!2 branching-space dimensionality, and ⟨S0|∂R|S1⟩\langle S_{0}|\partial_{R}|S_{1}\rangle does not vanish by construction—whereas ph-TDDFT, with S0S_{0} outside its manifold, gives τ≡0\tau\!\equiv\!0 at an S0S_{0}-involving crossing in every basis [23, 14]. What we add to Ref. [4] on this canonical system is the fully device-resident analytic machinery—the (N+2)(N\!+\!2) reference SCF, the AhhA^{\mathrm{hh}} eigenproblem, and the analytic energy gradients (finite-difference- and translational-invariance-validated to the Cholesky-factor floor, Table 1)—the on-surface ingredients a nonadiabatic propagation requires, all produced by one reverse-mode engine on a single RTX 4060. The quantitative analytic derivative coupling is reported separately, at the covalent ammonia n→σ∗n\!\rightarrow\!\sigma^{*}/X~\tilde{X} conical intersection where |τ|=|⟨S0|∂R|S1⟩|/Δ​E|\tau|=|\langle S_{0}|\partial_{R}|S_{1}\rangle|/\Delta E rides on a physical gap (Sec. V.4); the twisted-ethylene coupling magnitude, put on trial at that ammonia seam, is deferred to a forthcoming dedicated study, ethylene here establishing the F−2F\!-\!2 topology and the device-resident gradients on the canonical benchmark.111The twisted-ethylene seam is not a clean magnitude test: the ionic (π​π∗\pi\pi^{*}/VV) character of S1S_{1} makes its energetics—and hence the closing gap that enters |τ||\tau|—sensitive to dynamic correlation beyond the range-separated-hybrid reference. The forthcoming study analyzes the hh-TDA coupling magnitude on that ionic seam, including its comparison to the purpose-built treatment of Filatov, Lee, and Choi [10].

The scan is device-computed: the (N+2)(N\!+\!2) dianion ω\omegaB97X reference SCF (device J/K/KLRJ/K/K_{\mathrm{LR}}, DeviceVxc, cuSOLVER eigensolve), the AhhA^{\mathrm{hh}} built from device occupied-MO exchange integrals and diagonalized on the device, the term(c) connection, and every geometry-derivative integral of the frame-covariant numerator ⟨XI|∂RA|XJ⟩\langle X_{I}|\partial_{R}A|X_{J}\rangle all run on the RTX 4060 (peak 99%99\% utilization, 10451045 MiB resident). The last of these closes a subtlety: the numerator is contracted from the derivative overlap, core-Hamiltonian, and 2​J−ax​K2J-a_{x}K (full- and long-range) skeleton matrices, each a device kernel validated against its host reference to the Cholesky-factor floor including the ff-shell (Table 4). These are now fused into a single device-resident, AO-direct path—the production NACME forms no four-index host tensor and reproduces both the host analytic coupling and the determinant oracle—so what remains is only a certified codegen-free (aot_frozen) end-to-end wall-clock, which awaits capturing the long-range kernels in the ahead-of-time-compiled library.

V.4 The quantitative coupling at a covalent conical intersection: ammonia photodissociation

Ethylene fixes the intersection topology; the coupling magnitude is put on trial where it is physically trustworthy. The ammonia n→σ∗n\!\rightarrow\!\sigma^{*} photodissociation seam is the complement to the twisted-ethylene case in exactly the way the coupling demands: it is a covalent S0/S1S_{0}/S_{1} intersection with no low-lying ionic manifold, so the closing gap that enters |τ|=|⟨S0|∂R|S1⟩|/Δ​E|\tau|=|\langle S_{0}|\partial_{R}|S_{1}\rangle|/\Delta E is set by valence physics the range-separated-hybrid reference already describes well, not by the dynamic correlation of an ionic π​π∗\pi\pi^{*}/VV state. Here the analytic derivative coupling is a quantitative result, not a diagnostic. Figure 5 shows the device hh-TDA-ω\omegaB97X/def2-SVP scan of a planar single-N–H dissociation on the RTX 4060: the S0/S1S_{0}/S_{1} gap closes from 1.261.26 eV to a genuine cusp of 0.0310.031 eV at RN−H=2.50R_{\mathrm{N-H}}=2.50 Å and reopens to 0.630.63 eV toward the NH2\text{NH}{\vphantom{\text{X}}}_{\smash[t]{\text{2}}} fragment (panel a), and the interstate coupling tracks 1/Δ​E1/\Delta E, rising from 0.370.37 to a seam spike of 39.5​a0−139.5\,a_{0}^{-1} (panel b). At this S0S_{0}-involving crossing adiabatic linear-response TD-DFT gives τ≡0\tau\!\equiv\!0 by construction [23, 14]; the hh-TDA coupling does not vanish, and because it rides a physically correct gap at a covalent intersection it is quantitatively trustworthy here—not the structural zero of linear response.

Refer to caption
Figure 5: Device hh-TDA-ω\omegaB97X/def2-SVP scan of the ammonia n→σ∗n\!\rightarrow\!\sigma^{*}/X~\tilde{X} photodissociation S0/S1S_{0}/S_{1} conical intersection (planar single-N–H dissociation, RTX 4060). (a) Adiabatic S0S_{0} and S1S_{1} energies: a covalent V-shaped seam closing to Δ​E=0.031\Delta E=0.031 eV at RN−H=2.50R_{\mathrm{N-H}}=2.50 Å. (b) The interstate derivative coupling |τ||\tau| (log scale) rides 1/Δ​E1/\Delta E and spikes to 39.5​a0−139.5\,a_{0}^{-1} at the seam; adiabatic linear-response TD-DFT gives τ≡0\tau\!\equiv\!0 there (F−1F\!-\!1) in every basis [23, 14]. Couplings are shown with electron-translation factors imposing strict translational invariance (text).

This pair also exposes—and lets us resolve cleanly—a translational-invariance subtlety that the momentum-free H2​CO\text{H}{\vphantom{\text{X}}}_{\smash[t]{\text{2}}}\text{CO} and ethylene pairs never raise. The exact center-of-mass sum rule is ∑AτA=−⟨S0|∇|S1⟩\sum_{A}\tau_{A}=-\langle S_{0}|\nabla|S_{1}\rangle, which is finite whenever the transition carries electronic momentum; the out-of-plane nz→σ∗n_{z}\!\rightarrow\!\sigma^{*} character here does (∑AτA,z≈0.08\sum_{A}\tau_{A,z}\!\approx\!0.08–0.120.12 across the scan), so the strict ∑AτA→0\sum_{A}\tau_{A}\!\to\!0 certificate that holds automatically for the symmetric pairs does not apply to the raw coupling. The gauge-invariant determinant oracle confirms the raw coupling is nonetheless correct—it reproduces the same physical momentum to ∼0.3%\sim\!0.3\% (rising to 1.55%1.55\% at the exact R=2.50R=2.50 Å seam, a finite-difference truncation of the 0.0310.031 eV near-degeneracy). To report the strictly translation-invariant coupling that nonadiabatic dynamics requires, we attach electron-translation factors [9]: a partition-of-unity envelope that removes the net interstate momentum, driving ∑AτA\sum_{A}\tau_{A} to machine zero while changing the peak coupling by ≤0.2%\leq\!0.2\% at the seam and leaving the momentum-free pairs untouched (their gates unchanged); the ff-shell (def2-TZVP, L=3L=3) check passes with the factors on. The per-atom partition freedom—the literal antisymmetric-overlap (E1) versus population-partition (E2) forms, which remove the same net momentum but distribute it differently per atom—and the physical criterion that selects E2 are derived and quantified in the Supporting Information.

The hh-/pp-TDA couplings of the preceding sections reproduce and extend, on consumer hardware, a capability the field already possesses. The doubles-sector double-hybrid coupling is the object no prior implementation supplies. We validate it against the same class of literal determinant-overlap oracle, and then show the double-hybrid energy it necessarily brings with it.

V.5 The double-hybrid coupling and the accuracy it brings

The doubles-sector double-hybrid coupling d(D)d^{(D)} is the central result of this work and the object no prior implementation supplies; we validate it against the same class of literal determinant-overlap oracle. The first-principles double-hybrid coupling d(D)=d[sd]+d[ds]+d[dd]d^{(D)}=d^{[\mathrm{sd}]}+d^{[\mathrm{ds}]}+d^{[\mathrm{dd}]} reproduces the literal determinant oracle to ∼10−4\sim\!10^{-4} relative on every state pair at a generic (distorted C1C_{1}) geometry (Table 2); the STO-3G B2PLYP setting there is a validation-tractability vehicle that keeps the many-electron overlap oracle affordable, not a production recommendation. At the symmetric C2​vC_{2v} reference one state pair is 14%14\% off—not a method error but a step-size-independent eigenvector discontinuity at the symmetry point, which the analytic method (using the reference amplitude) is immune to; re-running at C1C_{1}, where the pair is no longer degenerate, restores agreement to 1.9×10−41.9\times 10^{-4}. Each of the three contributions passes its own per-contribution sub-oracle at ≤10−4\leq\!10^{-4}. A subtlety we flag: the near-degenerate pair required correcting a silent under-convergence of the iterative CIS eigensolver, which returned a non-eigenvector as a “state”; a dense eigensolve is the fix, and is essential for any eigenvector-response quantity.

Table 2: Relative error of the analytic double-hybrid coupling d(D)d^{(D)} versus the literal determinant overlap oracle (H2​O\text{H}{\vphantom{\text{X}}}_{\smash[t]{\text{2}}}\text{O}, STO-3G, B2PLYP-hybrid). Per-contribution errors at the C2​vC_{2v} reference; total errors at a distorted C1C_{1} geometry where no pair is symmetry-degenerate. Acceptance tolerance 10−310^{-3}; achieved agreement ∼10−4\sim\!10^{-4}.
per-contribution dd-amp dd-orb sd ds
rel. error 2.8×10−52.8\times 10^{-5} 9.6×10−59.6\times 10^{-5} 2.3×10−42.3\times 10^{-4} 5.7×10−55.7\times 10^{-5}
total (C1C_{1}) pair (0,1) pair (1,2) pair (0,2)
rel. error 9.8×10−59.8\times 10^{-5} 1.9×10−41.9\times 10^{-4} 1.5×10−41.5\times 10^{-4}

The coupling does not arrive alone. The same CIS(D) doubles amplitude that corrects the coupling dresses the excitation energy; its effect on the energies is a direct, independently checkable corollary of the object just validated. The CIS(D)-type correction [21, 28] that dresses the TD-B2PLYP excitations with second-order dynamic correlation should tighten the excitation energies just as it tightens the couplings—where the double-hybrid buys accuracy bare hh-TDA cannot reach. Figure 6 verifies this on the ten states shared between the benchmark and the double-hybrid evaluation. Moving from bare hh-TDA to the TD-B2PLYP substrate to the (D)-corrected result, the accuracy improves monotonically in the aggregate: MAD\mathrm{MAD} falls 0.86→0.55→0.470.86\rightarrow 0.55\rightarrow 0.47 eV and RMSD\mathrm{RMSD} falls 1.09→0.68→0.611.09\rightarrow 0.68\rightarrow 0.61 eV, while the substrate’s systematic bias collapses from MD=+0.53\mathrm{MD}=+0.53 eV to +0.05+0.05 eV—the (D) correction removes the over-excitation almost entirely. These ten (D)-evaluated states are the harder valence subset of the local set, so bare hh-TDA’s MAD here (0.860.86 eV) is larger than its 0.570.57 eV over the full N=30N=30 set. The improvement is not universal: it helps seven of the ten states, and on strongly ionic/doubly-excited π​π∗\pi\pi^{*} states the CIS(D) doubles amplitude over-corrects (formaldehyde π​π∗\pi\pi^{*} swings to −1.14-1.14 eV, pyridazine π​π∗\pi\pi^{*} to −0.81-0.81 eV, s-tetrazine π​π∗\pi\pi^{*} to −0.90-0.90 eV), consistent with the known breakdown of a perturbative doubles treatment where the reference is multiconfigurational. We report this honestly rather than trimming it: the net gain is real and the failure mode is the expected one. The correction is device-resident through the ff-shell—the formaldehyde/def2-TZVP (L=3L=3) π​π∗\pi\pi^{*} state moves 4.22→4.024.22\rightarrow 4.02 eV under (D), evaluated with the same device kernels validated in Table 4.

Refer to caption
Figure 6: The double-hybrid energy improvement on the ten shared benchmark states. Left: per-state excitation-energy error versus the Thiel TBE for bare hh-TDA-ω\omegaB97X, the TD-B2PLYP substrate (no (D)), and the (D)-corrected TD-B2PLYP result of this work. Right: aggregate MAD/RMSD, falling 0.86/1.09→0.55/0.68→0.47/0.610.86/1.09\rightarrow 0.55/0.68\rightarrow 0.47/0.61 eV; the systematic bias collapses from MD=+0.53\mathrm{MD}=+0.53 to +0.05+0.05 eV. The (D) correction over-corrects the strongly ionic π​π∗\pi\pi^{*} states (e.g. formaldehyde), the expected failure mode of a perturbative doubles treatment.

V.6 Integrated device coupling and performance on the RTX 4060

The doubles-sector coupling is device-resident: the two-electron derivative work is a single “split” kernel that emits the full derivative Fock matrix H​[atom,ξ,μ,ν]=∂ξ(2​J−ax​K)​[P0]H[\text{atom},\xi,\mu,\nu]=\partial_{\xi}(2J-a_{x}K)[P_{0}] in O​(Natom)O(N_{\mathrm{atom}}) device launches, replacing an O​(Nov)O(N_{\mathrm{ov}}) loop of per-orbital-pair builds; the O​(Nov)O(N_{\mathrm{ov}}) projection Co⊤​H​CvC_{o}^{\!\top}HC_{v} is a pair of cuBLAS matrix products. At ff-shell (H2​O\text{H}{\vphantom{\text{X}}}_{\smash[t]{\text{2}}}\text{O}, cc-pVTZ, Nov=225N_{\mathrm{ov}}=225) this replaces an estimated 28352835 s of per-pair builds with 83.783.7 s—a 33.9×33.9\times reduction—while the projection is machine-exact against a host reference (7×10−147\times 10^{-14}).

A profile-guided optimization then attacks the derivative-Fock build itself. Nsight Compute attribution showed the dominant cost was the two-center metric term of the exchange channel, built as 6.5×1046.5\times 10^{4} single-column kernel launches each at ∼2%\sim\!2\% streaming-multiprocessor throughput: the card appeared busy while ∼98%\sim\!98\% of its throughput sat idle. Rebuilding that tensor in one full-occupancy pass (196196 launches at 5555–72%72\% throughput), fusing two kernels that redundantly evaluated the same vertical recurrence, and deriving one channel from the other by a matrix product together take the warm build from 83.783.7 s to 21.421.4 s—a further 3.9×3.9\times. Figure 7 shows the throughput recovery behind that gain—the streaming-multiprocessor occupancy climbing from ∼2%\sim\!2\% to 5555–72%72\% as 65,26865{,}268 micro-launches collapse to 196196—and Fig. 8 the resulting three-stage wall-clock cascade, ∼133×\sim\!133\times cumulative over the per-pair reference. Every optimization is bit-identical: in double precision the full 2​J−ax​K2J-a_{x}K derivative-Fock matrix agrees with the per-pair reference to 2.2×10−132.2\times 10^{-13} at ff-shell (L=3L=3), block-independent to 5×10−145\times 10^{-14}; the production single-precision substrate floor is ∼10−5\sim\!10^{-5}, inside the ∼10−4\sim\!10^{-4} achieved analytic-vs-oracle agreement—itself an order of magnitude inside the 10−310^{-3} acceptance gate (Table 3)—and the assembled NACME output is byte-identical run to run. Table 3 reads as the safety margin of the optimization: the double-precision substrate certifies that the launch collapse changed only the kernel’s launch geometry and not its arithmetic, while the single-precision production floor sits an order of magnitude inside the tolerance the physics actually demands. That single-kernel tuning is only half the performance story; we now step back from the one optimized kernel to the whole production Cholesky-decomposed (CD) J/KJ/K engine, measured across a set of real chromophores (Figs. 9–11).

Refer to caption
Figure 7: Nsight Compute attribution of the derivative-Fock kernel’s dominant two-center metric (DJ2C) term before and after the launch collapse. Left: streaming-multiprocessor throughput rises from ∼2%\sim\!2\% (the 65,26865{,}268 single-column micro-launches) to 5555–72%72\% (the one-pass build, 196196 launches). Right: kernel launches per build. The tensor is bit-identical across the two implementations.
Refer to caption
Figure 8: Wall-clock of the ff-shell derivative-Fock build: O​(Nov)O(N_{\mathrm{ov}}) per-pair reference (28352835 s, est.), O​(Natom)O(N_{\mathrm{atom}}) split kernel (83.783.7 s), and after profile-guided optimization (21.421.4 s), a cumulative ∼133×\sim\!133\times. All variants bit-identical in double precision (Table 3).
Table 3: Correctness of the split derivative-Fock kernel versus the per-pair reference, across optimization stages, at ff-shell (H2​O\text{H}{\vphantom{\text{X}}}_{\smash[t]{\text{2}}}\text{O}, cc-pVTZ, L=3L=3). Double-precision substrate is machine-exact; block-independence confirms the aux-index blocking is a pure memory knob. The three coupling tolerances are nested: the single-precision floor (∼10−5\sim\!10^{-5}) sits inside the achieved analytic-vs-oracle agreement (∼10−4\sim\!10^{-4}), which sits inside the 10−310^{-3} acceptance gate.
substrate / check rel. error block-indep.
fp64, full 2​J−ax​K2J-a_{x}K 2.2×10−132.2\times 10^{-13} 5×10−145\times 10^{-14}
fp32 factor (production) ∼10−5\sim\!10^{-5} (floor) 6×10−146\times 10^{-14}
achieved oracle agreement ∼10−4\sim\!10^{-4} —
acceptance gate (coupling) 10−310^{-3} —
Refer to caption
Figure 9: Speedup of the device Cholesky-decomposed J+KJ{+}K Fock build (RTX 4060, ahead-of-time-compiled, FP64) over a conventional single-thread PySCF FP64 four-index get_jk, at the same xTB-optimized geometry and converged density, for seven calculations across six systems (five chromophores plus an alkane ff-shell reference) spanning three basis sets: ferrocene (def2-SVP, 236236 AO, ff-shell L=3L=3), 32×32\times; DNA nucleoside (def2-SVP, 335335 AO), 323×323\times; DNA 22-mer strand (pcseg-0, 376376 AO), 550×550\times; octane (def2-TZVP, 396396 AO, ff-shell L=3L=3), 384×384\times; Mg-porphine (def2-SVP, 439439 AO), 373×373\times; phycocyanobilin (pcseg-0, 463463 AO), 421×421\times; ferrocene (def2-TZVP, 472472 AO, ff-shell L=3L=3), 849×849\times. Range 3232–849×849\times, geometric mean 313×313\times. The device build reproduces the exact four-index J/KJ/K to ∼10−6\sim\!10^{-6} (JJ) and ∼10−5\sim\!10^{-5} (KK).

Figure 9 reports the practical speedup of the device CD J+KJ{+}K Fock build over a conventional single-thread PySCF FP64 four-index get_jk, at the same xTB-optimized geometry and converged density, for seven calculations across six systems—five chromophores plus an alkane ff-shell reference—spanning 236236–472472 atomic orbitals and three basis sets (def2-SVP, pcseg-0, def2-TZVP). The device build is 3232–849×849\times faster (geometric mean 313×313\times); across the larger systems (≥335\geq\!335 AO) the range is 323323–849×849\times. The floor of the range is ferrocene at def2-SVP (32×32\times, 236236 AO, ff-shell L=3L=3), where the CPU reference is only 792792 ms and the small absolute work leaves little to amortize; the advantage grows with system size—the same molecule at def2-TZVP (472472 AO) reaches 849×849\times. Two disclosures keep this honest. First, the device CD J/KJ/K reproduces PySCF’s exact four-index J/KJ/K to ∼10−6\sim\!10^{-6} (JJ) and ∼10−5\sim\!10^{-5} (KK): this is a time-to-the-same-result speedup, not an accuracy shortcut. Second, it is a combined method-and-hardware advantage—Cholesky-decomposed ERIs on the GPU against conventional four-index ERIs on the CPU—and is the speedup a user actually obtains, not a pure-hardware claim; the baseline is conventional PySCF (not density-fitted), single-threaded (a verified 11-vs-66-thread control gives only 4.84.8–6.0×6.0\times), and the device KK runs in FP64, so the reported factors are a conservative lower bound.

Refer to caption
Figure 10: Twelve production CD-DFT kernels on the RTX 4060 (AD107, sm_89) roofline—the eight two-electron kernels plus the four XC-grid kernels of Fig. 1(b). The two-electron side is bandwidth-region: the exchange (KK) kernels ride 6767–80%80\% of the FP32 DRAM-bandwidth roof, the Coulomb (JJ) build is bandwidth-bound at ∼94%\sim\!94\%, and the FP64 Γ\Gamma-density build reaches 82%82\% of the FP64 compute peak (the wall motivating the FP32-mixed production substrate). The four grid kernels are compute-bound at high arithmetic intensity: Vx​cV_{xc} scatter and the fx​cf_{xc} response run in FP32 (6%6\% and 14%14\% of the FP32 roof), while the mostly-FP64 gx​cg_{xc} transition-density force and SSF weight-response reach 37%37\% and 16%16\% of the FP64 peak.

Figure 10 places the twelve production CD-DFT kernels on the RTX 4060 (AD107, sm_89) roofline—the eight two-electron kernels and the four XC-grid kernels of Fig. 1(b)—showing that the engine is well-placed against the hardware ceilings across its whole footprint, not only at the single kernel of Fig. 7. The two-electron kernels populate the bandwidth region: the exchange (KK) kernels ride 6767–80%80\% of the FP32 DRAM-bandwidth roof; the Coulomb (JJ) build is bandwidth-bound at ∼94%\sim\!94\%; and the FP64 Γ\Gamma-density build reaches 82%82\% of the FP64 compute peak—the compute wall that motivates the mixed-precision (FP32) production substrate. The four grid-based XC kernels sit instead in the compute region at high arithmetic intensity, as expected for grid-pointwise work: the FP32 Vx​cV_{xc} scatter and fx​cf_{xc} response reach 6%6\% and 14%14\% of the FP32 roof, and the mostly-FP64 gx​cg_{xc} transition-density force and SSF weight-response reach 37%37\% and 16%16\% of the FP64 peak (the gx​cg_{xc} force being the strongest FP64 fraction, saturating the scalar FP64 pipe). Each kernel sits against its relevant ceiling, so the measured throughput is close to what the hardware allows rather than an artifact of an under-resolved workload.

Refer to caption
Figure 11: Device J+KJ{+}K Fock-build performance across the chromophore series on a single RTX 4060. (a) Wall-clock versus basis size NN: t∝N2.02t\propto N^{2.02} overall (JJ: N2.04N^{2.04}; KK: N2.00N^{2.00}, both near-quadratic), near the ∼N2.0\sim\!N^{2.0} of the efficient hh-TDA of Ref. [4]. (b) Per-system J+KJ{+}K Fock-build wall-clock, annotated with each system’s Cartesian AO count NN. The series spans three basis sets of differing maximum angular momentum, so the exponent is a practical size-scaling, not a fixed-basis asymptote.

Figure 11 fits the device J+KJ{+}K wall-clock across the series to t∝N2.02t\propto N^{2.02} (JJ: N2.04N^{2.04}; KK: N2.00N^{2.00}, both near-quadratic), close to the ∼N2.0\sim\!N^{2.0} reported for the efficient hh-TDA of Bannwarth and co-workers [4]. Because the series deliberately spans three basis sets of differing maximum angular momentum, this exponent is a practical size-scaling of the production workload, not a fixed-basis asymptote. All series numbers were collected under the ahead-of-time-compiled kernel library with zero just-in-time compilation (generator modules 0, new cubins 0), and the ff-shell case (ferrocene, L=3L=3) is included per our standing gate rule, so the ff-shell blind spot is exercised at production scale.

These performance numbers are for the shared two-electron engine—the CD J/KJ/K Fock build through which every method in this work is expressed. The excited-state objects that headline the paper—the hh-TDA/pp-TDA gradients and NACMEs and the double-hybrid derivative coupling—now run device-resident and AO-direct on this same engine (Table 4): the frame-covariant numerators, the relaxed-density gradient assembly, and the double-hybrid response are assembled on the device without forming a four-index host tensor, each validated against its determinant- or finite-difference oracle. We nonetheless quote no end-to-end device wall-clock for these paths: the range-separated (KLRK_{\mathrm{LR}}) kernels they invoke are not yet captured in the ahead-of-time-compiled library, so a codegen-free aot_frozen end-to-end time—the only kind our standing rule permits—awaits that infrastructure extension. The device cost meanwhile reduces to the aot_frozen CD J/KJ/K/2​e2e-gradient primitives timed in the roofline (Fig. 10).

Table 4: Response objects reported here and their device-residency status. All three run device-resident and AO-direct through the shared CD J/KJ/K engine—no four-index host tensor—and each is validated against an independent determinant/finite-difference oracle; of these, only the double-hybrid CIS(D) coupling is first of its kind, the hh/pp gradient and NACME being consumer-hardware reproductions of the hybrid-only realizations of Refs. [4, 41]. Each reduces to the CD J/KJ/K/2​e2e-gradient primitives that are ahead-of-time-compiled and timed in the roofline (Fig. 10). Per our standing rule, no end-to-end device wall-clock is quoted: the range-separated kernels these paths invoke are not yet in the aot_frozen library, so a codegen-free end-to-end time awaits that extension (an honest partial).
object validation device-residency status (this branch)
hh-TDA/pp-TDA excited-state gradient [4, 41] finite differences, ≤10−6​Eh/a0\leq\!10^{-6}\,E_{h}/a_{0} (Table 1) fully device-resident: eigenvalue gradient and relaxed-density assembly, FD-validated
hh-TDA/pp-TDA NACME two-hole/two-particle overlap oracle, ≤10−4\leq\!10^{-4} (Table 1) device-resident end-to-end—AO-direct frame-covariant numerator ++ term(c), no host four-index tensor—validated to the overlap oracle including the ff-shell (L=3L=3)
double-hybrid CIS(D) coupling d(D)d^{(D)} literal determinant-overlap oracle, ∼10−4\sim\!10^{-4} (Table 2) device-resident and AO-direct: ERI/C 4-index derivative, CPHF/CIS response ++ B88/LYP fx​cf_{xc}, and make_h1 RHS; frozen-reference amplitudes remain host by design

VI Conclusions

A single reverse-mode contraction-DAG engine, closed under one non-symmetric AO-Laplace J/KJ/K primitive and never forming a four-index MO tensor, delivers analytic nuclear gradients and interstate nonadiabatic couplings across a family of density-functional excited-state methods—the topology-correct hh-TDA/pp-TDA manifolds and the non-variational doubles sector of a double-hybrid coupling—validated against an independent literal-wavefunction oracle, with the gradients, NACMEs, and the double-hybrid coupling all executed device-resident and AO-direct—through one shared two-electron engine—within the 8 GB of a consumer GPU. The construction is uniform: each method’s gradient and NACME is a corollary of the same transpose plus the same kernel, and the hardest object (the double-hybrid coupling) is reached by the same machinery that gives the topology-correct manifolds their forces. A profile-guided ∼133×\sim\!133\times launch collapse, with double-precision bit-identity preserved, brings the coupling’s dominant two-electron kernel into interactive wall-clock on hardware a student owns, and across a chromophore series of up to 472472 AOs spanning three basis sets the production CD J/KJ/K engine runs 3232–849×849\times faster than a conventional four-index CPU reference at the same accuracy. A certified codegen-free (aot_frozen) end-to-end wall-clock for the range-separated NACME path—which requires the ahead-of-time-compiled library to capture the long-range kernels—and coupling the engine to nonadiabatic dynamics through the correct conical-intersection topology are the natural next steps.

Supplementary Material

The supplementary material provides the full theoretical and validation record behind the results reported here: the reverse-mode “relaxation is DAG transpose” principle and its shared adjoint facility (Sec. S2); the AO-direct Laplace representation and the non-symmetric J/KJ/K geometry kernel that interstate responses require (Sec. S3); the response templates for the analytic gradients (Sec. S4); the complete from-first-principles working equations for the double-hybrid CIS(D) derivative coupling, derived as its three physical contributions (Sec. S5); the literal determinant-overlap (p†​qp^{\dagger}q) oracles—the four-block CIS(D) wavefunction overlap, the generalized biorthogonal replacement-determinant formula, the parameter-free u→0u\!\to\!0 consistency anchors, and the per-contribution sub-oracles (Sec. S6); the numerical validation results (Sec. S7); the twisted-ethylene S0/S1S_{0}/S_{1} sign-fixed coupling booking and its determinant-oracle convergence (Sec. S8); the electron-translation-factor construction and the per-atom partition freedom (Sec. S9); and a reproducibility map of the host-side verification modules (Sec. S10). The determinant oracles and the host-side scripts that certify every working equation on CPU hardware, together with these derivations, are additionally deposited as described in the Data Availability statement.

Acknowledgements.
We acknowledge financial support and computational resources provided by NeuroTechNet S.A.S.

Author Declarations

Conflict of Interest

The author has no conflicts to disclose.

Data Availability

The data that support the findings of this study—the literal determinant-overlap (p†​qp^{\dagger}q) oracles and the host-side scripts that verify every working equation of the analytic couplings and gradients against them, together with the detailed derivations— are openly available. They are archived on Zenodo under a permanent DOI and mirrored in a public GitHub repository under the MIT license, pinned to a tagged commit; the bundle is provided to reviewers through an anonymized link at submission and released publicly upon acceptance. The bundle is self-contained: it reproduces every entry of the verification tables (Tables 2 and 1) on CPU hardware from PySCF and NumPy alone, without access to any GPU code, so that every accuracy claim—which carries the scientific content of this work—is independently checkable.

Withheld: the performance-tuned CUDA J/KJ/K and derivative kernels, and the code generators that emit them (a tuned application of the framework of Ref. [18]), are proprietary to the funder (NeuroTechNet S.A.S.) and are available from the corresponding author on reasonable request. The per-system timing, roofline, and scaling data these kernels produced are released with the bundle, so the reported speedups can be recomputed from the deposited files, although re-measuring them requires the withheld kernels. We regard this as a real limitation on the reproducibility of the performance claims only; the correctness claims are unaffected.

References

  • [1] J. Almlöf (1991) Elimination of energy denominators in Møller–Plesset perturbation theory by a Laplace transform approach. Chem. Phys. Lett. 181 (4), pp. 319–320. External Links: Document Cited by: §I, §I, §II.2.
  • [2] F. Aquilante, R. Lindh, and T. B. Pedersen (2008) Analytic derivatives for the Cholesky representation of the two-electron integrals. J. Chem. Phys. 129 (3), pp. 034106. External Links: Document Cited by: §II.3.
  • [3] P. Y. Ayala and G. E. Scuseria (1999) Linear scaling second-order Møller–Plesset theory in the atomic orbital basis for large molecular systems. J. Chem. Phys. 110 (8), pp. 3660–3671. External Links: Document Cited by: §II.2.
  • [4] C. Bannwarth, J. K. Yu, E. G. Hohenstein, and T. J. Martínez (2020) Hole-hole tamm-dancoff-approximated density functional theory: a highly efficient electronic structure method incorporating dynamic and static correlation. J. Chem. Phys. 153, pp. 024110. External Links: Document Cited by: §I, §I, §I, §II.5, Figure 11, Figure 2, Figure 3, Figure 4, §V.1, §V.3, §V.6, Table 4, Table 4, §V.
  • [5] N. H. F. Beebe and J. Linderberg (1977) Simplifications in the generation and transformation of two-electron integrals in molecular calculations. Int. J. Quantum Chem. 12 (4), pp. 683–705. External Links: Document Cited by: §II.3.
  • [6] D. Braess and W. Hackbusch (2005) Approximation of 1/x1/x by exponential sums in [1,∞)[1,\infty). IMA J. Numer. Anal. 25 (4), pp. 685–697. External Links: Document Cited by: §II.2.
  • [7] J. Chai and M. Head-Gordon (2008) Systematic optimization of long-range corrected hybrid density functionals. J. Chem. Phys. 128 (8), pp. 084106. External Links: Document Cited by: §IV.
  • [8] B. Doser, D. S. Lambrecht, J. Kussmann, and C. Ochsenfeld (2009) Linear-scaling atomic orbital-based second-order Møller–Plesset perturbation theory by rigorous integral screening criteria. J. Chem. Phys. 130 (6), pp. 064107. External Links: Document Cited by: §I, §II.2.
  • [9] S. Fatehi, E. Alguire, Y. Shao, and J. E. Subotnik (2011) Analytic derivative couplings between configuration-interaction-singles states with built-in electron-translation factors for translational invariance. J. Chem. Phys. 135 (23), pp. 234105. External Links: Document Cited by: §II.5, §II.6, §V.4.
  • [10] M. Filatov, S. Lee, and C. H. Choi (2021) Description of sudden polarization in the excited electronic states with an ensemble density functional theory method. J. Chem. Theory Comput. 17 (8), pp. 5123–5139. External Links: Document Cited by: footnote 1.
  • [11] J. B. Foresman, M. Head-Gordon, J. A. Pople, and M. J. Frisch (1992) Toward a systematic molecular orbital theory for excited states. J. Phys. Chem. 96 (1), pp. 135–149. External Links: Document Cited by: §II.6.
  • [12] L. Goerigk and S. Grimme (2010) Assessment of TD-DFT methods and of various spin scaled CIS(D) and CC2 versions for the treatment of low-lying valence excitations of large organic dyes. J. Chem. Phys. 132 (18), pp. 184103. External Links: Document Cited by: §I.
  • [13] L. Goerigk and S. Grimme (2011) Double-hybrid density functionals provide a balanced description of excited La1{}^{1}L_{a} and Lb1{}^{1}L_{b} states in polycyclic aromatic hydrocarbons. J. Chem. Theory Comput. 7 (10), pp. 3272–3277. External Links: Document Cited by: §I.
  • [14] S. Gozem, F. Melaccio, A. Valentini, M. Filatov, M. Huix-Rotllant, N. Ferré, L. M. Frutos, C. Angeli, A. I. Krylov, A. A. Granovsky, R. Lindh, and M. Olivucci (2014) Shape of multireference, equation-of-motion coupled-cluster, and density functional theory potential energy surfaces at a conical intersection. J. Chem. Theory Comput. 10 (8), pp. 3074–3084. External Links: Document Cited by: §I, Figure 4, Figure 5, §V.3, §V.4.
  • [15] S. Grimme and F. Neese (2007) Double-hybrid density functional theory for excited electronic states of molecules. J. Chem. Phys. 127, pp. 154116. External Links: Document Cited by: §I, §I.
  • [16] S. Grimme (2006) Semiempirical hybrid density functional with perturbative second-order correlation. J. Chem. Phys. 124 (3), pp. 034108. External Links: Document Cited by: §II.6, §IV.
  • [17] R. D. Guerrero (2026) EOM-CC excited-state gradients and nonadiabatic couplings on a consumer GPU from a contraction-DAG with laplace-transform J/K kernels. Note: companion manuscript External Links: 2607.05622 Cited by: §I, §II.3, Figure 1, §IV.1.
  • [18] R. D. Guerrero (2026) RECURSUM: automated code generation for recurrence relations exceeds expert optimization via LayeredCodegen. Note: companion methods manuscript External Links: 2604.18585 Cited by: §II.3, Data Availability.
  • [19] N. C. Handy and H. F. Schaefer (1984) On the evaluation of analytic energy derivatives for correlated wave functions. J. Chem. Phys. 81 (11), pp. 5031–5033. External Links: Document Cited by: §II.1, §II.5, §II.6.
  • [20] M. Häser and J. Almlöf (1992) Laplace transform techniques in Møller–Plesset perturbation theory. J. Chem. Phys. 96 (1), pp. 489–494. External Links: Document Cited by: §I, §I, §II.2.
  • [21] M. Head-Gordon, R. J. Rico, M. Oumi, and T. J. Lee (1994) A doubles correction to electronic excited states from configuration interaction in the space of single substitutions. Chem. Phys. Lett. 219, pp. 21–29. External Links: Document Cited by: §I, §II.6, §V.5.
  • [22] H. Koch, A. Sánchez de Merás, and T. B. Pedersen (2003) Reduced scaling in electronic structure calculations using Cholesky decompositions. J. Chem. Phys. 118 (21), pp. 9481–9484. External Links: Document Cited by: §II.3.
  • [23] B. G. Levine, C. Ko, J. Quenneville, and T. J. Martínez (2006) Conical intersections and double excitations in time-dependent density functional theory. Mol. Phys. 104 (5–7), pp. 1039–1051. External Links: Document Cited by: §I, Figure 4, Figure 5, §V.3, §V.4.
  • [24] Z. Li, B. Suo, and W. Liu (2014) First order nonadiabatic coupling matrix elements between excited states: implementation and application at the TD-DFT and pp-TDA levels. J. Chem. Phys. 141 (24), pp. 244105. External Links: Document Cited by: §II.5.
  • [25] Q. Ou, E. C. Alguire, and J. E. Subotnik (2015) Derivative couplings between time-dependent density functional theory excited states in the random-phase approximation based on pseudo-wavefunctions: behavior around conical intersections. J. Phys. Chem. B 119 (24), pp. 7150–7161. External Links: Document Cited by: §II.6.
  • [26] J. A. Pople, R. Krishnan, H. B. Schlegel, and J. S. Binkley (1979) Derivative studies in Hartree–Fock and Møller–Plesset theories. Int. J. Quantum Chem. Symp. 13, pp. 225–241. External Links: Document Cited by: §II.1, §II.5, §II.6.
  • [27] P. Pulay (1969) Ab initio calculation of force constants and equilibrium geometries in polyatomic molecules. I. theory. Mol. Phys. 17 (2), pp. 197–204. External Links: Document Cited by: §II.6.
  • [28] Y. M. Rhee, D. Casanova, and M. Head-Gordon (2009) Quartic-scaling analytical gradient of quasidegenerate scaled opposite spin second-order perturbation corrections to single excitation configuration interaction. J. Chem. Theory Comput. 5 (5), pp. 1224–1236. External Links: Document Cited by: §II.6, §V.5.
  • [29] Y. M. Rhee and M. Head-Gordon (2007) Scaled second-order perturbation corrections to configuration interaction singles: efficient and reliable excitation energy methods. J. Phys. Chem. A 111 (24), pp. 5314–5326. External Links: Document Cited by: §I, §II.6.
  • [30] S. Schweizer, B. Doser, and C. Ochsenfeld (2008) An atomic orbital-based reformulation of energy gradients in second-order møller-plesset perturbation theory. J. Chem. Phys. 128, pp. 154101. External Links: Document Cited by: §I, §I.
  • [31] A. Takatsuka, S. Ten-no, and W. Hackbusch (2008) Minimax approximation for the decomposition of energy denominators in Laplace-transformed Møller–Plesset perturbation theories. J. Chem. Phys. 129 (4), pp. 044112. External Links: Document Cited by: §II.2.
  • [32] T. Tamayo-Mendoza, C. Kreisbeck, R. Lindh, and A. Aspuru-Guzik (2018) Automatic differentiation in quantum chemistry with applications to fully variational hartree-fock. ACS Cent. Sci. 4, pp. 559. External Links: Document Cited by: §I, §I.
  • [33] H. Teh and J. E. Subotnik (2020) Analytic gradients and derivative couplings for configuration interaction with all single excitations and one double excitation — en route to nonadiabatic dynamics. J. Chem. Phys. 153 (3), pp. 034107. External Links: Document Cited by: §II.6.
  • [34] I. S. Ufimtsev and T. J. Martínez (2008) Quantum chemistry on graphical processing units. 1. strategies for two-electron integral evaluation. J. Chem. Theory Comput. 4 (2), pp. 222–231. External Links: Document Cited by: §I, §IV.
  • [35] I. S. Ufimtsev and T. J. Martínez (2009) Quantum chemistry on graphical processing units. 3. analytical energy gradients, geometry optimization, and first principles molecular dynamics. J. Chem. Theory Comput. 5 (10), pp. 2619–2628. External Links: Document Cited by: §I, §IV.
  • [36] H. van Aggelen, Y. Yang, and W. Yang (2013) Exchange-correlation energy from pairing matrix fluctuation and the particle-particle random-phase approximation. Phys. Rev. A 88, pp. 030501. External Links: Document Cited by: §I, §I, §II.5.
  • [37] Y. Yang, D. Peng, J. Lu, and W. Yang (2014) Excitation energies from particle-particle random phase approximation: Davidson algorithm and benchmark studies. J. Chem. Phys. 141 (12), pp. 124104. External Links: Document Cited by: §II.5.
  • [38] Y. Yang, H. van Aggelen, S. N. Steinmann, D. Peng, and W. Yang (2013) Benchmark tests and spin adaptation for the particle-particle random phase approximation. J. Chem. Phys. 139 (17), pp. 174110. External Links: Document Cited by: §II.5.
  • [39] Y. Yang, H. van Aggelen, and W. Yang (2013) Double, rydberg and charge transfer excitations from pairing matrix fluctuation and particle-particle random phase approximation. J. Chem. Phys. 139 (22), pp. 224105. External Links: Document Cited by: §I, §I, §II.5.
  • [40] D. R. Yarkony (1996) Diabolical conical intersections. Rev. Mod. Phys. 68 (4), pp. 985–1013. External Links: Document Cited by: §I.
  • [41] J. K. Yu, C. Bannwarth, E. G. Hohenstein, and T. J. Martínez (2020) Ab initio nonadiabatic molecular dynamics with hole-hole Tamm-Dancoff approximated density functional theory. J. Chem. Theory Comput. 16 (9), pp. 5499–5511. External Links: Document Cited by: §I, §I, Table 4, Table 4, §V.
  • [42] D. Zhang, D. Peng, P. Zhang, and W. Yang (2015) Analytic gradients, geometry optimization and excited state potential energy surfaces from the particle-particle random phase approximation. Phys. Chem. Chem. Phys. 17 (2), pp. 1025–1038. External Links: Document Cited by: §II.5.
  • [43] X. Zhang and G. K. Chan (2022) Differentiable quantum chemistry with pyscf for molecules and materials at the mean-field level and beyond. J. Chem. Phys. 157, pp. 204801. External Links: Document Cited by: §I, §I.
  • [44] X. Zhang, C. Li, H. Ye, T. C. Berkelbach, and G. K. Chan (2024) Performant automatic differentiation of local coupled cluster theories: response properties and ab initio molecular dynamics. J. Chem. Phys. 161 (1), pp. 014109. External Links: Document Cited by: §I, §I.