Introduction
The wavefunction of a multi-electron system is usually accurately described by a linear combination of Slater determinants2. Each Slater determinant represents a specific configuration — how the available electrons are distributed across spin-orbitals. However, in a system with many electrons and many orbitals the number of possible Slater determinants increases rapidly. Even with sensible approximations and truncation, accurately describing the electronic structure of a system requires a large number of Slater determinants and with that comes computational cost. Introducing an active space of a few most important orbitals and few active electrons is the main method of treating this problem. Active space removes abruptly all configurations outside of it, but even though the contribution of individual configurations outside of the active space can be small, their total contribution can be significant. A smooth transition between active and virtual orbitals in active space methods can potentially be beneficial. Such a transition can be perhaps achieved with Quantum Monte-Carlo methods. Diffusion MC3 and Green’s function MC4 propagate walkers in continuum space which removes the need for a one-electron basis set but they both fall foul of the fermionic sign problem caused by the antisymmetry of the electronic wavefunction. It has been possible to solve this problem using a fixed node approximation5 but this has had limited further work. A more robust approach is to introduce a Monte-Carlo way of selecting the configurations via a random walk in the manifold of Slater Determinants. Full Configuration-Interaction Quantum Monte-Carlo (FCIQMC), developed by Alavi and co-workers, works by using a long-time propagation in imaginary time and random walkers to stochastically describe the full configuration-interaction wavefunction (FCI)6,7. The method does not converge to the Bosonic solution6 and obtains the Fermionic ground state without a fixed node approximation. FCIQMC has been successful at obtaining FCI results for large systems which were not previously possible including the neutral and cationic elements from Li to Mg6–10. A similar method is Monte Carlo Configuration Interaction (MCCI), developed by Greer11,12, which originally was applied to the single point energy of water11 and later used to find the dissociation energy of water and HF13. Like FCIQMC, MCCI uses a Monte Carlo procedure to build a compact wavefunction containing the important configurations intended to give accuracy close to FCI results. Coe and Paterson et. al have continued to develop MCCI and shown that it can generate potential energy curves, approaching levels of chemical accuracy, for a range of small molecules including N 2 N_2 N 2 and C H 4 CH_4 C H 4 13. MCCI was then extended to include Natural orbitals and second-order perturbation theory which, particularity, at longer bond lengths was shown to improve accuracy and convergence time of calculated energies14. MCCI has also been used to simulate multipole moments achieving good accuracy when compared to FCI values15. MCCI also showed good accuracy when compared to FCIQMC when calculating ionization energies while only requiring a relatively small number of basis functions when compared to the FCI space15. The method has also been extended to include state-averaging to allow computation of excited states which was shown to be effective for both H 3 H_3 H 3 and LiF16.
However, when used as part of a molecular dynamics simulation the computational cost of Electronic structure calculations, especially Monte-Carlo methods, is still significant. Hence, finding methods with acceptable cost of electronic structure calculations, which at the same time would not neglect configurations that normally would be outside of the active space, is of great benefit. In a recent paper[1 ] we introduced the idea of a Zombie States (ZS) which potentially can combine the ideas of randomness and active space. Zombie states have the possibility of an electron in every orbital in a superposition of "dead" and "alive" states[1 ] so that the occupation of an orbital is fractional. This allows multiple Slater determinant configurations to be described by a single ZS. However, ZS may not have a well-defined number of electrons, such that there is a nonzero probability of the state containing a wrong number of electrons. But a small superposition of ZSs might be able to describe a wave function with the required number of electrons accurately, and the hope is that a smaller basis set size could be used, reducing the computational cost, while maintaining acceptable accuracy.
ZSs can be viewed as Fermionic Coherent States (CS) of a two-level system. Previously Coherent States of the harmonic oscillator have been used to describe Bosonic systems in second quantisation with the help of Herman-Kluck17 and Coupled Coherent States propagation methods18 and also with Generalised Coherent States19. Second quantisation Hamiltonians look like those of coupled oscillators with the difference that the oscillators represent the amplitudes and populations of the orbitals occupied by Bosons. Following the idea of these methods it seems reasonable to try to treat Fermions on a similar level. The complication here is that the elements of Grassmann algebra enter into standard definition of a Fermionic coherent state20: ∣ η j ⟩ = a ( ∣ 0 j ⟩ + η j ∣ 1 j ⟩ ) |\eta_j\rangle= a(|0_j\rangle+ \eta_j|1_j\rangle) ∣ η j ⟩ = a ( ∣ 0 j ⟩ + η j ∣ 1 j ⟩) where ∣ 1 j ⟩ |1_j\rangle ∣ 1 j ⟩ and ∣ 0 j ⟩ \lvert0_j\rangle ∣ 0 j ⟩ are the j j j -th orbital in its occupied and unoccupied vacuum states respectively, a a a is a normalisation factor and η j \eta_j η j is an element of Grassmann algebra. The necessity of Grassmann algebra makes computation difficult but is required to maintain the correct permutation antisymmetry of the multi-electron Fermionic Coherent States as well as the anticommutation of creation and annihilation operators. Zombie States were shown[1 ] to be capable of describing fermionic coherent states while removing the need for Grassmann algebra and the use of Wick’s theorem, which are normally required to evaluate matrix elements between Fermionic Coherent States21.
Earlier work[1 ] gave a mathematical treatment of the ZSs’ second quantization for fermions, and creation and annihilation operators were defined with the use of a simple sign change rule, which replaces Grassmann algebra. These results were verified by the reproduction of Full Configuration Interaction2 electronic energies for Li2 _2 2 and LiH via diagonalization of the electronic structure Hamiltonian in the complete basis of randomly selected ZSs. It was also shown that Zombie States can be used for real time propagation of the electronic wave function. A Fourier transform of real-time Zombie State evolution also has reproduced the exact electronic energy levels in the above mentioned molecules. Both methods are however not very efficient and could be used only as a demonstration that Zombie States’ mathematics was correct. It is therefore necessary to develop better ZSs-based methods for finding low-lying state electronic energies in molecules, which are most important in chemistry. In this vein it is necessary to improve upon the naïve algorithms initially presented to increase efficiency; computation of the Hamiltonian in the original article[1 ] had O ( M 5 ) \mathcal{O}(M^5) O ( M 5 ) scaling which can be reduced. This also follows for other key operators. Bosonic coherent states can be defined as an eigenstate of the annihilation operator whereas the only eigenstate of the annihilation operator for a fermionic coherent state is the vacuum. Thus we also seek to provide an alternative formalism for Zombie States in the language of second quantization that allows Zombie states to be created from a vacuum state. In this paper we will present the theoretical advancement in the formalism of Zombie states, deriving a stronger normalization condition. Efficient algorithms for key operators are then given utilising scaled algorithms and sensible manipulations of the program to greatly reduce the computation time of the Hamiltonian as well as other properties such as spin and the number of electrons.
Further, imaginary time propagation is validated as an effective method for finding the ground-state energies of states of real Fermionic systems, capable of reproducing Full CI (in a truncated basis2 ^{2} 2 , in this case for Li2 _2 2 . We also show how a biasing method can be used to create a small basis of Zombie States, which with imaginary time evolution can find low-lying state energies. To improve further the accuracy we show how the procedure called "cleaning" removes the contribution of unwanted numbers of electrons and improves the accuracy of electronic energy. We also make an attempt to create a method for finding excited states. It has previously been shown that a Gram-Schmidt procedure can be applied to orthogonalize higher energy states against lower lying ones while adding minimal computational cost22. We apply a similar Gram-Schmidt procedure to imaginary time propagation of ZSs too showing low-lying excited states can be found in this manner.
This article is structured as follows: a brief recap of the original Zombie State formulation is given followed by the algebraic developments; the algorithmic improvements for the two-electron Hamiltonian are detailed; results for imaginary time evolution of Li2 _2 2 for various basis sets and finally results for imaginary time evolution for excited states of Li2 _2 2 using Gram-Schmidt orthogonalization.
Theory
Zombie states[1 ] are coherent antisymmetrized superpositions of ‘dead’ and ‘alive’ electronic states. Considering the single m m m th spin orbital, a coherent state is
∣ ζ ( a 1 m , a 0 m ) ⟩ = a 1 m ∣ 1 m ⟩ + a 0 m ∣ 0 m ⟩ (1) \left|\zeta\left(a_{1m},a_{0m}\right)\right\rangle= a_{1m}|1_m\rangle+ a_{0m}|0_m\rangle \tag*{(1)} ∣ ζ ( a 1 m , a 0 m ) ⟩ = a 1 m ∣ 1 m ⟩ + a 0 m ∣ 0 m ⟩ (1)
where ∣ 1 m ⟩ |1_m\rangle ∣ 1 m ⟩ corresponds to their being an electron in spin orbital m m m and ∣ 0 m ⟩ |0_m\rangle ∣ 0 m ⟩ to the m m m th spin orbital being empty, consistent with the conventional electronic structure notation.
We can generalise this to a coherent state which is a Slater Determinant of one-electron zombie states
∣ ζ ⟩ = ∣ ζ 1 ζ 2 … ζ M ⟩ (2) |\zeta\rangle= |\zeta_1\zeta_2 \ldots\zeta_M\rangle \tag*{(2)} ∣ ζ ⟩ = ∣ ζ 1 ζ 2 … ζ M ⟩ (2)
and which can be summarized by 2 M 2M 2 M coefficients
∣ ζ ⟩ = [ a 11 a 12 ⋯ a 1 ( m − 1 ) a 1 m a 1 ( m + 1 ) ⋯ a 1 M a 01 a 02 ⋯ a 0 ( m − 1 ) a 0 m a 0 ( m + 1 ) ⋯ a 0 M ] (3) \lvert\zeta\rangle=
\begin{bmatrix}
a_{11} & a_{12} & \cdots& a_{1(m-1)} & a_{1m} & a_{1(m+1)} & \cdots& a_{1M} \\
a_{01} & a_{02} & \cdots& a_{0(m-1)} & a_{0m} & a_{0(m+1)} & \cdots& a_{0M}
\end{bmatrix} \tag*{(3)} ∣ ζ ⟩ = [ a 11 a 01 a 12 a 02 ⋯ ⋯ a 1 ( m − 1 ) a 0 ( m − 1 ) a 1 m a 0 m a 1 ( m + 1 ) a 0 ( m + 1 ) ⋯ ⋯ a 1 M a 0 M ] (3)
the notation used here is synonymous with that in Ref 1, where in a m j j a_{m_jj} a m j j , m j = 0 m_j = 0 m j = 0 refers to the m m m th spin orbital being ‘dead’ (unoccupied) and m j = 1 m_j = 1 m j = 1 to the m m m th spin orbital being ‘alive’ (occupied), and j j j refers to the spin orbital number. Note that the zombie state contains 2 M 2M 2 M complex coefficients, where M M M is the total number of spin orbitals.
The overlap of two states is
Ω a b = ⟨ ζ ( a ) ∣ ζ ( b ) ⟩ = ∏ j = 1 M ∑ m j = 0 , 1 a m j j ( a ) ∗ a m j j ( b ) . (4) \Omega_{ab} = \langle\zeta^{(a)} \mid\zeta^{(b)} \rangle= \prod_{j=1}^{M} \sum_{m_j=0,1} a_{m_jj}^{(a)*}a_{m_jj}^{(b)}. \tag*{(4)} Ω ab = ⟨ ζ ( a ) ∣ ζ ( b ) ⟩ = j = 1 ∏ M m j = 0 , 1 ∑ a m j j ( a ) ∗ a m j j ( b ) . (4)
Calculation of this is O ( M ) \mathcal{O}(M) O ( M ) where there are M M M spin orbitals, whether or not they are occupied.
The action of the creation and annihilation operators on a ZS is given by
b ^ m † ∣ ζ ( b ) ⟩ = [ − a 11 ( b ) − a 12 ( b ) ⋯ − a 1 ( m − 1 ) ( b ) a 0 m ( b ) a 1 ( m + 1 ) ( b ) ⋯ a 1 M ( b ) a 01 ( b ) a 02 ( b ) ⋯ a 0 ( m − 1 ) ( b ) 0 a 0 ( m + 1 ) ( b ) ⋯ a 0 M ( b ) ] , (5) \hat{b}_m^\dagger\lvert\zeta^{(b)} \rangle=
\begin{bmatrix}
-a_{11}^{(b)} & -a_{12}^{(b)} & \cdots& -a_{1(m-1)}^{(b)} & a_{0m}^{(b)} & a_{1(m+1)}^{(b)} & \cdots& a_{1M}^{(b)} \\
a_{01}^{(b)} & a_{02}^{(b)} & \cdots& a_{0(m-1)}^{(b)} & 0 & a_{0(m+1)}^{(b)} & \cdots& a_{0M}^{(b)}
\end{bmatrix}, \tag*{(5)} b ^ m † ∣ ζ ( b ) ⟩ = [ − a 11 ( b ) a 01 ( b ) − a 12 ( b ) a 02 ( b ) ⋯ ⋯ − a 1 ( m − 1 ) ( b ) a 0 ( m − 1 ) ( b ) a 0 m ( b ) 0 a 1 ( m + 1 ) ( b ) a 0 ( m + 1 ) ( b ) ⋯ ⋯ a 1 M ( b ) a 0 M ( b ) ] , (5)
b ^ m ∣ ζ ( b ) ⟩ = [ − a 11 ( b ) − a 12 ( b ) ⋯ − a 1 ( m − 1 ) ( b ) 0 a 1 ( m + 1 ) ( b ) ⋯ a 1 M ( b ) a 01 ( b ) a 02 ( b ) ⋯ a 0 ( m − 1 ) ( b ) a 1 m ( b ) a 0 ( m + 1 ) ( b ) ⋯ a 0 M ( b ) ] . (6) \hat{b}_m \lvert\zeta^{(b)} \rangle=
\begin{bmatrix}
-a_{11}^{(b)} & -a_{12}^{(b)} & \cdots& -a_{1(m-1)}^{(b)} & 0 & a_{1(m+1)}^{(b)} & \cdots& a_{1M}^{(b)} \\
a_{01}^{(b)} & a_{02}^{(b)} & \cdots& a_{0(m-1)}^{(b)} & a_{1m}^{(b)} & a_{0(m+1)}^{(b)} & \cdots& a_{0M}^{(b)}
\end{bmatrix}. \tag*{(6)} b ^ m ∣ ζ ( b ) ⟩ = [ − a 11 ( b ) a 01 ( b ) − a 12 ( b ) a 02 ( b ) ⋯ ⋯ − a 1 ( m − 1 ) ( b ) a 0 ( m − 1 ) ( b ) 0 a 1 m ( b ) a 1 ( m + 1 ) ( b ) a 0 ( m + 1 ) ( b ) ⋯ ⋯ a 1 M ( b ) a 0 M ( b ) ] . (6)
The operators b ^ m † \hat{b}_m^\dagger b ^ m † and b ^ m \hat{b}_m b ^ m not only act on the m m m -th orbital but also change sign of the amplitudes a 1 n a_{1n} a 1 n of alive coefficients for all orbitals with n < m n < m n < m . If a 1 m a_{1m} a 1 m and a 0 n a_{0n} a 0 n are given by ones and zeros so that Zombie States represent standard Slater Determinants, it is easy to see that the sign changing rule is equivalent to the so called Wigner-Jordan rule. As previously shown all anticommutation relations are as expected[1 ] . Most straightforwardly, but not very efficiently, matrix elements ⟨ ζ ( a ) ∣ H ^ ∣ ζ ( b ) ⟩ \langle\zeta^{(a)} \vert\hat{H} \vert\zeta^{(b)} \rangle ⟨ ζ ( a ) ∣ H ^ ∣ ζ ( b ) ⟩ of the second quantized electronic structure Hamiltonian can be computed by sequential application of the creation and annihilation operators[1 ]
H ^ = ∑ m , n h m n b ^ m † b ^ n + 1 2 ∑ k , l , m , n b ^ k † b ^ l † W k l n m b ^ m b ^ n (7) \hat{H} = \sum_{m,n} h_{mn}\hat{b}_m^\dagger\hat{b}_n + \frac{1}{2}\sum_{k,l,m,n}\hat{b}_k^\dagger\hat{b}_l^\dagger W_{klnm}\hat{b}_m\hat{b}_n \tag*{(7)} H ^ = m , n ∑ h mn b ^ m † b ^ n + 2 1 k , l , m , n ∑ b ^ k † b ^ l † W k l nm b ^ m b ^ n (7)
to ∣ ζ ( b ) ⟩ \lvert\zeta^{(b)} \rangle ∣ ζ ( b ) ⟩ and overlapping the result with ⟨ ζ ( a ) ∣ \langle\zeta^{(a)} \rvert ⟨ ζ ( a ) ∣ ,
H a b = ⟨ ζ ( a ) ∣ H ^ ∣ ζ ( b ) ⟩ = ∑ m , n h m n ⟨ ζ ( a ) ∣ ζ m n ( b ) ⟩ + 1 2 ∑ k l m n W k l n m ⟨ ζ ( a ) ∣ ζ k l m n ( b ) ⟩ (8) H_{ab}=\langle\zeta^{(a)}|\hat{H}|\zeta^{(b)}\rangle=\sum_{m,n}h_{mn}\langle\zeta^{(a)}|\zeta_{mn}^{(b)}\rangle+\frac{1}{2}\sum_{klmn}W_{klnm}\langle\zeta^{(a)}|\zeta_{klmn}^{(b)}\rangle \tag*{(8)} H ab = ⟨ ζ ( a ) ∣ H ^ ∣ ζ ( b ) ⟩ = m , n ∑ h mn ⟨ ζ ( a ) ∣ ζ mn ( b ) ⟩ + 2 1 k l mn ∑ W k l nm ⟨ ζ ( a ) ∣ ζ k l mn ( b ) ⟩ (8)
where ∣ ζ k l m n ( b ) ⟩ = b ^ k † b ^ l † b ^ m b ^ n ∣ ζ ( b ) ⟩ |\zeta_{klmn}^{(b)}\rangle=\hat{b}_{k}^{\dagger}\hat{b}_{l}^{\dagger}\hat{b}_{m}\hat{b}_{n}|\zeta^{(b)}\rangle ∣ ζ k l mn ( b ) ⟩ = b ^ k † b ^ l † b ^ m b ^ n ∣ ζ ( b ) ⟩ and ∣ ζ m n ( b ) ⟩ = b ^ m † b ^ n ∣ ζ m n ( b ) ⟩ |\zeta_{mn}^{(b)}\rangle=\hat{b}_{m}^{\dagger}\hat{b}_{n}|\zeta_{mn}^{(b)}\rangle ∣ ζ mn ( b ) ⟩ = b ^ m † b ^ n ∣ ζ mn ( b ) ⟩ ; the overlaps are calculated using Eq. (4) .
An electronic wavefunction can be represented as a superposition of K K K basis Zombie states
∣ Ψ ⟩ = ∑ k K d k ∣ ζ ( k ) ⟩ . (9) |\Psi\rangle=\sum_{k}^{K}d_{k}|\zeta^{(k)}\rangle. \tag*{(9)} ∣Ψ ⟩ = k ∑ K d k ∣ ζ ( k ) ⟩ . (9)
and the matrix elements described above now allow usage of the ansatz Eq. (9) for propagation or finding quantum states and their energies. Individual Zombie states generally are not restricted to a particular number of electrons, but for a wavefunction such as Eq. (9) a sufficiently large K K K number of zombie states with coefficients d k d_k d k usually can be chosen such that contributions from unwanted numbers of electrons cancel out. This is very different from standard electronic structure methods, where the problem is to include as many configurations with the right number of electrons as possible.
A standard Hartree Fock configuration ∣ ϕ m e ( j ) ⟩ |\phi_{m_e}^{(j)}\rangle ∣ ϕ m e ( j ) ⟩ which corresponds to m e m_e m e electrons can be written as a Zombie State with "binary" amplitudes of dead and alive states and m e m_e m e ones in the upper row.
∣ ϕ m e ( j ) ⟩ = [ 1 0 ⋯ 0 1 0 ⋯ 1 0 1 ⋯ 1 0 1 ⋯ 0 ] (10) |\phi_{m_e}^{(j)}\rangle=
\begin{bmatrix}
1 & 0 & \cdots& 0 & 1 & 0 & \cdots& 1 \\
0 & 1 & \cdots& 1 & 0 & 1 & \cdots& 0
\end{bmatrix} \tag*{(10)} ∣ ϕ m e ( j ) ⟩ = [ 1 0 0 1 ⋯ ⋯ 0 1 1 0 0 1 ⋯ ⋯ 1 0 ] (10)
and it can be treated just like any other ZS.
In the subsections II B and II C algebraic and algorithmic improvements are presented, which allow much more efficient calculation of matrix elements of operators between ZSs and faster propagation of the wave function Eq. (9) . But a reader less interested in technical aspects of the method can go directly to the section II D, where it is shown that the right electronic energies can be recovered from imaginary time propagation of the wave function Eq. (9) with unrestricted number of electrons.
Algebraic Developments
The previous article[1 ] gave the action of creation and annihilation operators for zombie states and how the Hamiltonian could be computed for them. Here we extend the algebraic formalism by showing how a Zombie state can be created from a vacuum state. We show how creation and annihilation operators act in this formalism, as well as computation of the overlap of two Zombie states. Finally we derive a stronger condition for normalization of a Zombie state.
From standard electronic structure theory2, a given electronic occupancy can be written as an antisymmetrized Slater determinant
∣ φ ⟩ = ∣ m 1 m 2 … m M ⟩ (11) |\varphi\rangle= |m_1m_2\ldots m_M\rangle \tag*{(11)} ∣ φ ⟩ = ∣ m 1 m 2 … m M ⟩ (11)
where { m i } = 0 \{m_i\}=0 { m i } = 0 if the ith orbital is empty and 1 if occupied, as detailed in Ref. 23, or equivalently in the form Eq. (10) . This is equivalent to stating in second quantization notation
∣ φ ⟩ = ∏ k o c c b ^ k † ∣ ⟩ (12) |\varphi\rangle= \prod_{k\ \mathrm{occ}} \hat{b}_k^\dagger| \rangle \tag*{(12)} ∣ φ ⟩ = k occ ∏ b ^ k † ∣ ⟩ (12)
where ∣ ⟩ |\rangle ∣ ⟩ is the vacuum state, ensuring here and in what follows that the creation operators are applied in the reverse order they appear in the Slater determinant. We could also trivially rewrite Eq. (12) as
∣ φ ⟩ = ∏ j = 1 M [ ( 1 − m j ) I ^ + m j b ^ j † ] ∣ ⟩ . (13) |\varphi\rangle= \prod_{j=1}^{M}\left[(1-m_j)\hat{I}+m_j\hat{b}_j^\dagger\right]|\rangle. \tag*{(13)} ∣ φ ⟩ = j = 1 ∏ M [ ( 1 − m j ) I ^ + m j b ^ j † ] ∣ ⟩ . (13)
We now consider a generalized form of Eq. (13)
∣ ζ ⟩ = ∏ j = 1 M ( a 0 j I ^ + a 1 j b ^ j † ) ∣ ⟩ , (14) |\zeta\rangle= \prod_{j=1}^{M}\left(a_{0j}\hat{I}+a_{1j}\hat{b}_j^\dagger\right)|\rangle, \tag*{(14)} ∣ ζ ⟩ = j = 1 ∏ M ( a 0 j I ^ + a 1 j b ^ j † ) ∣ ⟩ , (14)
where a 0 j a_{0j} a 0 j and a 1 j a_{1j} a 1 j are complex scalar coefficients. Clearly if a 1 j = m j a_{1j}=m_j a 1 j = m j and a 0 j = ( 1 − m j ) a_{0j}=(1-m_j) a 0 j = ( 1 − m j ) then the same Slater determinant electron state is produced as in Eq. (13) .
By inference from Eq. (14) , we can define a zombie operator
z ^ j : = a 0 j I ^ + a 1 j b ^ j † , (15) \hat{z}_j := a_{0j}\hat{I}+a_{1j}\hat{b}_j^\dagger, \tag*{(15)} z ^ j := a 0 j I ^ + a 1 j b ^ j † , (15)
whose adjoint is
z ^ j † : = a 0 j ∗ I ^ + a 1 j ∗ b ^ j . (16) \hat{z}_j^\dagger:= a_{0j}^{*}\hat{I}+a_{1j}^{*}\hat{b}_j. \tag*{(16)} z ^ j † := a 0 j ∗ I ^ + a 1 j ∗ b ^ j . (16)
and commutators and anti-commutators
[ z ^ j , z ^ k ] = 2 b ^ j † b ^ k † a 1 j a 1 k (17) [\hat{z}_j,\hat{z}_k]=2\hat{b}_j^\dagger\hat{b}_k^\dagger a_{1j}a_{1k} \tag*{(17)} [ z ^ j , z ^ k ] = 2 b ^ j † b ^ k † a 1 j a 1 k (17)
[ z ^ j † , z ^ k † ] = 2 b ^ j b ^ k a 1 j a 1 k (18) [\hat{z}_j^\dagger,\hat{z}_k^\dagger]=2\hat{b}_j\hat{b}_k a_{1j}a_{1k} \tag*{(18)} [ z ^ j † , z ^ k † ] = 2 b ^ j b ^ k a 1 j a 1 k (18)
{ z ^ j , z ^ k † } = 2 ( a 0 j a 0 k I ^ + a 1 j a 0 k b ^ j † + a 0 j a 1 k b ^ k ) I ^ (19) \{\hat{z}_j,\hat{z}_k^\dagger\}=2(a_{0j}a_{0k}\hat{I}+a_{1j}a_{0k}\hat{b}_j^\dagger+a_{0j}a_{1k}\hat{b}_k)\hat{I} \tag*{(19)} { z ^ j , z ^ k † } = 2 ( a 0 j a 0 k I ^ + a 1 j a 0 k b ^ j † + a 0 j a 1 k b ^ k ) I ^ (19)
{ z ^ j † , z ^ k } = 2 ( a 0 j a 0 k I ^ + a 1 j a 0 k b ^ j + a 0 j a 1 k b ^ k † ) (20) \{\hat{z}_j^\dagger,\hat{z}_k\}=2(a_{0j}a_{0k}\hat{I}+a_{1j}a_{0k}\hat{b}_j+a_{0j}a_{1k}\hat{b}_k^\dagger) \tag*{(20)} { z ^ j † , z ^ k } = 2 ( a 0 j a 0 k I ^ + a 1 j a 0 k b ^ j + a 0 j a 1 k b ^ k † ) (20)
such that Eq. (14) can be written more concisely as
∣ ζ ⟩ = ∏ j = 1 M z ^ j ∣ ⟩ . (21) |\zeta\rangle=\prod_{j=1}^{M}\hat{z}_j| \rangle. \tag*{(21)} ∣ ζ ⟩ = j = 1 ∏ M z ^ j ∣ ⟩ . (21)
Note that z ^ j \hat{z}_j z ^ j is a function of two complex numbers, so we can write z ^ j ≡ z ^ j ( a 0 j , a 1 j ) \hat{z}_j\equiv\hat{z}_j(a_{0j},a_{1j}) z ^ j ≡ z ^ j ( a 0 j , a 1 j ) . This shorthand will become useful later.
The idea of defining new operators from linear combinations of creation and annihilation operators is of course nothing new, the most famous example perhaps being Majorana Fermions, which are their own antiparticle, defined as
γ 1 = 1 2 ( b ^ + b ^ † ) , (22) \gamma_1=\frac{1}{\sqrt{2}}(\hat{b}+\hat{b}^\dagger), \tag*{(22)} γ 1 = 2 1 ( b ^ + b ^ † ) , (22)
γ 2 = 1 2 i ( b ^ − b ^ † ) . (23) \gamma_2=\frac{1}{\sqrt{2}i}(\hat{b}-\hat{b}^\dagger). \tag*{(23)} γ 2 = 2 i 1 ( b ^ − b ^ † ) . (23)
However, zombie operators are not their own antiparticles. We now consider the action of creation and annihilation operators on zombie operators.
Creation and annihilation operators
The action of creation and annihilation operators on a single zombie operator is given, for j ≠ k j\ne k j = k , by
b ^ j z ^ k ( a 0 k , a 1 k ) = b ^ j ( a 0 k I ^ + a 1 k b ^ k † ) = ( a 0 k I ^ − a 1 k b ^ k † ) b ^ j = z ^ k ( a 0 k , − a 1 k ) b ^ j , (24) \hat{b}_j\hat{z}_k(a_{0k},a_{1k})=\hat{b}_j(a_{0k}\hat{I}+a_{1k}\hat{b}_k^\dagger)=(a_{0k}\hat{I}-a_{1k}\hat{b}_k^\dagger)\hat{b}_j=\hat{z}_k(a_{0k},-a_{1k})\hat{b}_j, \tag*{(24)} b ^ j z ^ k ( a 0 k , a 1 k ) = b ^ j ( a 0 k I ^ + a 1 k b ^ k † ) = ( a 0 k I ^ − a 1 k b ^ k † ) b ^ j = z ^ k ( a 0 k , − a 1 k ) b ^ j , (24)
b ^ j † z ^ k ( a 0 k , a 1 k ) = b ^ j † ( a 0 k I ^ + a 1 k b ^ k † ) = ( a 0 k I ^ − a 1 k b ^ k † ) b ^ j † = z ^ k ( a 0 k , − a 1 k ) b ^ j † , (25) \hat{b}_j^\dagger\hat{z}_k(a_{0k},a_{1k})=\hat{b}_j^\dagger(a_{0k}\hat{I}+a_{1k}\hat{b}_k^\dagger)=(a_{0k}\hat{I}-a_{1k}\hat{b}_k^\dagger)\hat{b}_j^\dagger=\hat{z}_k(a_{0k},-a_{1k})\hat{b}_j^\dagger, \tag*{(25)} b ^ j † z ^ k ( a 0 k , a 1 k ) = b ^ j † ( a 0 k I ^ + a 1 k b ^ k † ) = ( a 0 k I ^ − a 1 k b ^ k † ) b ^ j † = z ^ k ( a 0 k , − a 1 k ) b ^ j † , (25)
and if j = k j=k j = k ,
b ^ j z ^ j ( a 0 j , a 1 j ) = b ^ j ( a 0 j I ^ + a 1 j b ^ j † ) = a 0 j b ^ j − a 1 k ( 1 − b ^ j † b ^ j ) = z ^ j ( a 0 j , − a 1 j ) b ^ j + z ^ j ( a 1 j , 0 ) , (26) \hat{b}_j\hat{z}_j(a_{0j},a_{1j})=\hat{b}_j(a_{0j}\hat{I}+a_{1j}\hat{b}_j^\dagger)=a_{0j}\hat{b}_j-a_{1k}(1-\hat{b}_j^\dagger\hat{b}_j)=\hat{z}_j(a_{0j},-a_{1j})\hat{b}_j+\hat{z}_j(a_{1j},0), \tag*{(26)} b ^ j z ^ j ( a 0 j , a 1 j ) = b ^ j ( a 0 j I ^ + a 1 j b ^ j † ) = a 0 j b ^ j − a 1 k ( 1 − b ^ j † b ^ j ) = z ^ j ( a 0 j , − a 1 j ) b ^ j + z ^ j ( a 1 j , 0 ) , (26)
b ^ j † z ^ j ( a 0 j , a 1 j ) = b ^ j † ( a 0 j I ^ + a 1 j b ^ j † ) = a 0 j b ^ j † = z ^ j ( 0 , a 0 j ) . (27) \hat{b}_j^\dagger\hat{z}_j(a_{0j},a_{1j})=\hat{b}_j^\dagger(a_{0j}\hat{I}+a_{1j}\hat{b}_j^\dagger)=a_{0j}\hat{b}_j^\dagger=\hat{z}_j(0,a_{0j}). \tag*{(27)} b ^ j † z ^ j ( a 0 j , a 1 j ) = b ^ j † ( a 0 j I ^ + a 1 j b ^ j † ) = a 0 j b ^ j † = z ^ j ( 0 , a 0 j ) . (27)
where we use the standard relations { b ^ j , b ^ k } = 0 \{\hat{b}_j,\hat{b}_k\}=0 { b ^ j , b ^ k } = 0 , { b ^ j † , b ^ k † } = 0 \{\hat{b}_j^\dagger,\hat{b}_k^\dagger\}=0 { b ^ j † , b ^ k † } = 0 , and { b ^ j , b ^ k † } = δ j k \{\hat{b}_j,\hat{b}_k^\dagger\}=\delta_{jk} { b ^ j , b ^ k † } = δ j k .
Using these results we can compute the action of the creation and annihilation operators on a zombie state, which is defined by the product of zombie operators as in Eq. (21) ,
b ^ j ∣ ζ ⟩ = b ^ j ∏ k = 1 M z ^ k ( a 0 k , a 1 k ) ∣ ⟩ (28) \hat{b}_j\lvert\zeta\rangle=\hat{b}_j\prod_{k=1}^{M}\hat{z}_k(a_{0k},a_{1k})\lvert\rangle \tag*{(28)} b ^ j ∣ ζ ⟩ = b ^ j k = 1 ∏ M z ^ k ( a 0 k , a 1 k ) ∣ ⟩ (28)
= [ ∏ k = 1 j − 1 z ^ k ( a 0 k , − a 1 k ) ] [ z ^ j ( a 0 j , − a 1 j ) b ^ j + z ^ j ( a 1 j , 0 ) ] [ ∏ k = j + 1 M z ^ k ( a 0 k , a 1 k ) ] ∣ ⟩ (29) =\left[\prod_{k=1}^{j-1}\hat{z}_k(a_{0k},-a_{1k})\right]\left[\hat{z}_j(a_{0j},-a_{1j})\hat{b}_j+\hat{z}_j(a_{1j},0)\right]\left[\prod_{k=j+1}^{M}\hat{z}_k(a_{0k},a_{1k})\right]\lvert\rangle \tag*{(29)} = [ k = 1 ∏ j − 1 z ^ k ( a 0 k , − a 1 k ) ] [ z ^ j ( a 0 j , − a 1 j ) b ^ j + z ^ j ( a 1 j , 0 ) ] k = j + 1 ∏ M z ^ k ( a 0 k , a 1 k ) ∣ ⟩ (29)
= [ ∏ k = 1 j − 1 z ^ k ( a 0 k , − a 1 k ) ] z ^ j ( a 1 j , 0 ) [ ∏ k = j + 1 M z ^ k ( a 0 k , a 1 k ) ] ∣ ⟩ (30) =\left[\prod_{k=1}^{j-1}\hat{z}_k(a_{0k},-a_{1k})\right]\hat{z}_j(a_{1j},0)\left[\prod_{k=j+1}^{M}\hat{z}_k(a_{0k},a_{1k})\right]\lvert\rangle \tag*{(30)} = [ k = 1 ∏ j − 1 z ^ k ( a 0 k , − a 1 k ) ] z ^ j ( a 1 j , 0 ) k = j + 1 ∏ M z ^ k ( a 0 k , a 1 k ) ∣ ⟩ (30)
where the z ^ j ( a 0 j , − a 1 j ) b ^ j \hat{z}_j(a_{0j},-a_{1j})\hat{b}_j z ^ j ( a 0 j , − a 1 j ) b ^ j term vanishes because b ^ j \hat{b}_j b ^ j tries to destroy an electron which is not there.
It also follows
b ^ j † ∣ ζ ⟩ = b ^ j † ∏ k = 1 M z ^ k ( a 0 k , a 1 k ) ∣ ⟩ (31) \hat{b}_j^\dagger\lvert\zeta\rangle=\hat{b}_j^\dagger\prod_{k=1}^{M}\hat{z}_k(a_{0k},a_{1k})\lvert\rangle \tag*{(31)} b ^ j † ∣ ζ ⟩ = b ^ j † k = 1 ∏ M z ^ k ( a 0 k , a 1 k ) ∣ ⟩ (31)
= [ ∏ k = 1 j − 1 z ^ k ( a 0 k , − a 1 k ) ] z ^ j ( 0 , a 0 j ) [ ∏ k = j + 1 M z ^ k ( a 0 k , a 1 k ) ] ∣ ⟩ . (32) =\left[\prod_{k=1}^{j-1}\hat{z}_k(a_{0k},-a_{1k})\right]\hat{z}_j(0,a_{0j})\left[\prod_{k=j+1}^{M}\hat{z}_k(a_{0k},a_{1k})\right]\lvert\rangle. \tag*{(32)} = [ k = 1 ∏ j − 1 z ^ k ( a 0 k , − a 1 k ) ] z ^ j ( 0 , a 0 j ) k = j + 1 ∏ M z ^ k ( a 0 k , a 1 k ) ∣ ⟩ . (32)
However, Eq. (22c) and Eq. (23b) themselves describe zombie states with changed coefficients to those of ∣ ζ ⟩ \lvert\zeta\rangle ∣ ζ ⟩ . The zombie states they refer to agree exactly with the sign-changing rules presented in the original zombie states paper, though through more convoluted algebra.
These results can equivalently be stated in terms of the { a n j } \{a_{nj}\} { a nj } coefficients. As ∣ ζ ⟩ \lvert\zeta\rangle ∣ ζ ⟩ is a function of the zombie coefficients { a n j } = a \{a_{nj}\}=\mathbf{a} { a nj } = a we can write ∣ ζ ⟩ ≡ ∣ ζ ( a ) ⟩ \lvert\zeta\rangle\equiv\lvert\zeta(\mathbf{a})\rangle ∣ ζ ⟩ ≡ ∣ ζ ( a )⟩ . Then let ∣ ζ ( j ) ( a ( j ) ) ⟩ = b ^ j ∣ ζ ( a ) ⟩ \lvert\zeta^{(j)}(\mathbf{a}^{(j)})\rangle=\hat{b}_j\lvert\zeta(\mathbf{a})\rangle ∣ ζ ( j ) ( a ( j ) )⟩ = b ^ j ∣ ζ ( a )⟩ . We then see that
a 0 k ( j ) = { a 0 k k ≠ j , a 1 k k = j . (33) a_{0k}^{(j)}=
\begin{cases}
a_{0k} & k\ne j,\\
a_{1k} & k=j.
\end{cases} \tag*{(33)} a 0 k ( j ) = { a 0 k a 1 k k = j , k = j . (33)
a 1 k ( j ) = { − a 1 k k < j , 0 k = j , a 1 k k > j . (34) a_{1k}^{(j)}=
\begin{cases}
-a_{1k} & k<j,\\
0 & k=j,\\
a_{1k} & k>j.
\end{cases} \tag*{(34)} a 1 k ( j ) = ⎩ ⎨ ⎧ − a 1 k 0 a 1 k k < j , k = j , k > j . (34)
If ∣ ζ ( j ) ( a ) ⟩ = b ^ j † ∣ ζ ( a ) ⟩ \lvert\zeta^{(j)}(\mathbf{a})\rangle=\hat{b}_{j}^{\dagger}\lvert\zeta(\mathbf{a})\rangle ∣ ζ ( j ) ( a )⟩ = b ^ j † ∣ ζ ( a )⟩
a 0 k ( j ) = { a 0 k k ≠ j 0 k = j (35) a_{0k}^{(j)}=
\begin{cases}
a_{0k} & k\ne j\\
0 & k=j
\end{cases} \tag*{(35)} a 0 k ( j ) = { a 0 k 0 k = j k = j (35)
a 1 k ( j ) = { − a 1 k k < j a 0 k k = j a 1 k k > j (36) a_{1k}^{(j)}=
\begin{cases}
-a_{1k} & k<j\\
a_{0k} & k=j\\
a_{1k} & k>j
\end{cases} \tag*{(36)} a 1 k ( j ) = ⎩ ⎨ ⎧ − a 1 k a 0 k a 1 k k < j k = j k > j (36)
again in exact agreement with the earlier results.
Overlap of two Zombie states
We can use this formalism to compute the overlap of two zombie states, ⟨ ζ ( a ) ∣ ζ ( b ) ⟩ \langle\zeta^{(a)}\lvert\zeta^{(b)}\rangle ⟨ ζ ( a ) ∣ ζ ( b ) ⟩ , where both the bra and ket are formed from the action of M M M zombie operators as in Eq. (21) . We consider a computation recursively, noting that the vacuum state is normalized, namely ⟨ ∣ ⟩ = 1 \langle\lvert\rangle=1 ⟨∣ ⟩ = 1 , and defining
∣ ζ j ( b ) ⟩ = ∏ k = j M z ^ k ∣ ⟩ (37) \lvert\zeta_{j}^{(b)}\rangle=\prod_{k=j}^{M}\hat{z}_{k}\lvert\rangle \tag*{(37)} ∣ ζ j ( b ) ⟩ = k = j ∏ M z ^ k ∣ ⟩ (37)
such that
∣ ζ 1 ( b ) ⟩ ≡ ∣ ζ ( b ) ⟩ , (38) \lvert\zeta_{1}^{(b)}\rangle\equiv\lvert\zeta^{(b)}\rangle, \tag*{(38)} ∣ ζ 1 ( b ) ⟩ ≡ ∣ ζ ( b ) ⟩ , (38)
∣ ζ M + 1 ( b ) ⟩ ≡ ∣ ⟩ . (39) \lvert\zeta_{M+1}^{(b)}\rangle\equiv\lvert\rangle. \tag*{(39)} ∣ ζ M + 1 ( b ) ⟩ ≡ ∣ ⟩ . (39)
We therefore have
⟨ ζ j ( a ) ∣ ζ j ( b ) ⟩ = ⟨ ζ j + 1 ( a ) ∣ z ^ j ( a ) ∗ z ^ j ( b ) ∣ ζ j + 1 ( b ) ⟩ (40) \langle\zeta_{j}^{(a)}\lvert\zeta_{j}^{(b)}\rangle=\langle\zeta_{j+1}^{(a)}\lvert\hat{z}_{j}^{(a)*}\hat{z}_{j}^{(b)}\lvert\zeta_{j+1}^{(b)}\rangle \tag*{(40)} ⟨ ζ j ( a ) ∣ ζ j ( b ) ⟩ = ⟨ ζ j + 1 ( a ) ∣ z ^ j ( a ) ∗ z ^ j ( b ) ∣ ζ j + 1 ( b ) ⟩ (40)
= ⟨ ζ j + 1 ( a ) ∣ [ a 0 j ( a ) ∗ a 0 j ( b ) f ^ j f ^ j † + a 0 j ( a ) ∗ a 1 j ( b ) f ^ j b ^ j † + a 1 j ( a ) ∗ a 0 j ( b ) b ^ j f ^ j † + a 1 j ( a ) ∗ a 1 j ( b ) b ^ j b ^ j † ] ∣ ζ j + 1 ( b ) ⟩ (41) =\langle\zeta_{j+1}^{(a)}\lvert\left[a_{0j}^{(a)*}a_{0j}^{(b)}\hat{f}_{j}\hat{f}_{j}^{\dagger}+a_{0j}^{(a)*}a_{1j}^{(b)}\hat{f}_{j}\hat{b}_{j}^{\dagger}+a_{1j}^{(a)*}a_{0j}^{(b)}\hat{b}_{j}\hat{f}_{j}^{\dagger}+a_{1j}^{(a)*}a_{1j}^{(b)}\hat{b}_{j}\hat{b}_{j}^{\dagger}\right]\lvert\zeta_{j+1}^{(b)}\rangle \tag*{(41)} = ⟨ ζ j + 1 ( a ) ∣ [ a 0 j ( a ) ∗ a 0 j ( b ) f ^ j f ^ j † + a 0 j ( a ) ∗ a 1 j ( b ) f ^ j b ^ j † + a 1 j ( a ) ∗ a 0 j ( b ) b ^ j f ^ j † + a 1 j ( a ) ∗ a 1 j ( b ) b ^ j b ^ j † ] ∣ ζ j + 1 ( b ) ⟩ (41)
= ( a 0 j ( a ) ∗ a 0 j ( b ) + a 1 j ( a ) ∗ a 1 j ( b ) ) ⟨ ζ j + 1 ( a ) ∣ ζ j + 1 ( b ) ⟩ (42) =(a_{0j}^{(a)*}a_{0j}^{(b)}+a_{1j}^{(a)*}a_{1j}^{(b)})\langle\zeta_{j+1}^{(a)}\lvert\zeta_{j+1}^{(b)}\rangle \tag*{(42)} = ( a 0 j ( a ) ∗ a 0 j ( b ) + a 1 j ( a ) ∗ a 1 j ( b ) ) ⟨ ζ j + 1 ( a ) ∣ ζ j + 1 ( b ) ⟩ (42)
The second term in Eq. (28b) is of the form ⟨ ζ j + 1 ( a ) ∣ b ^ j † ∣ ζ j + 1 ( b ) ⟩ \langle\zeta_{j+1}^{(a)}\lvert\hat{b}_{j}^{\dagger}\lvert\zeta_{j+1}^{(b)}\rangle ⟨ ζ j + 1 ( a ) ∣ b ^ j † ∣ ζ j + 1 ( b ) ⟩ , and since neither ∣ ζ j + 1 ( a ) ⟩ \lvert\zeta_{j+1}^{(a)}\rangle ∣ ζ j + 1 ( a ) ⟩ nor ∣ ζ j + 1 ( b ) ⟩ \lvert\zeta_{j+1}^{(b)}\rangle ∣ ζ j + 1 ( b ) ⟩ contain any contributions from electron j j j , b ^ j † \hat{b}_{j}^{\dagger} b ^ j † acting to the left will try to destroy an electron which is not there, giving zero. Similar arguments show why the third term in Eq. (28b) vanishes, and why the fourth term survives.
Combining Eq. (37) –Eq. (28) gives
⟨ ζ ( a ) ∣ ζ ( b ) ⟩ = ∏ j = 1 M ( ( a 0 j ( a ) ) ∗ a 0 j ( b ) + ( a 1 j ( a ) ) ∗ a 1 j ( b ) ) (43) \langle\zeta^{(a)} \mid\zeta^{(b)} \rangle= \prod_{j=1}^{M} \left((a_{0j}^{(a)})^{*}a_{0j}^{(b)} + (a_{1j}^{(a)})^{*}a_{1j}^{(b)}\right) \tag*{(43)} ⟨ ζ ( a ) ∣ ζ ( b ) ⟩ = j = 1 ∏ M ( ( a 0 j ( a ) ) ∗ a 0 j ( b ) + ( a 1 j ( a ) ) ∗ a 1 j ( b ) ) (43)
which is identical to Eq. (4) , which was obtained by different algebraic means in the original zombie paper1 .
Normalization
Clearly, if we wish a zombie state (the product of M M M zombie operators) to be normalized, then the RHS of Eq. (43) must equal unity when ∣ ζ ( a ) ⟩ = ∣ ζ ( b ) ⟩ \lvert\zeta^{(a)}\rangle= \lvert\zeta^{(b)}\rangle ∣ ζ ( a ) ⟩ = ∣ ζ ( b ) ⟩ . However, we may want to consider a more general case, where we may not necessarily have wavefunctions formed from a fixed M M M number of zombie operators, but a variable number of zombie operators.
Algebraically, if we require
∏ j = 1 M ∣ a 0 j ( a ) ∣ 2 + ∣ a 1 j ( a ) ∣ 2 = 1 , (44) \prod_{j=1}^{M} \lvert a_{0j}^{(a)}\rvert^{2} + \lvert a_{1j}^{(a)}\rvert^{2} = 1, \tag*{(44)} j = 1 ∏ M ∣ a 0 j ( a ) ∣ 2 + ∣ a 1 j ( a ) ∣ 2 = 1 , (44)
this will ensure that ⟨ ζ ( a ) ∣ ζ ( a ) ⟩ ≡ ⟨ ζ 1 ( a ) ∣ ζ 1 ( a ) ⟩ = 1 \langle\zeta^{(a)}\vert\zeta^{(a)}\rangle\equiv\langle\zeta_{1}^{(a)}\vert\zeta_{1}^{(a)}\rangle= 1 ⟨ ζ ( a ) ∣ ζ ( a ) ⟩ ≡ ⟨ ζ 1 ( a ) ∣ ζ 1 ( a ) ⟩ = 1 , but what if we further require
⟨ ζ j ( a ) ∣ ζ j ( a ) ⟩ = 1 (45) \langle\zeta_{j}^{(a)}\vert\zeta_{j}^{(a)}\rangle= 1 \tag*{(45)} ⟨ ζ j ( a ) ∣ ζ j ( a ) ⟩ = 1 (45)
for all j j j , 1 ≤ j ≤ M 1 \le j \le M 1 ≤ j ≤ M ?
This problem can also be solved recursively, since trivially ⟨ ζ M + 1 ( a ) ∣ ζ M + 1 ( a ) ⟩ ≡ ⟨ ∣ ⟩ = 1 \langle\zeta_{M+1}^{(a)}\vert\zeta_{M+1}^{(a)}\rangle\equiv\langle\lvert\rangle= 1 ⟨ ζ M + 1 ( a ) ∣ ζ M + 1 ( a ) ⟩ ≡ ⟨∣ ⟩ = 1 . For ⟨ ζ M ( a ) ∣ ζ M ( a ) ⟩ = 1 \langle\zeta_{M}^{(a)}\vert\zeta_{M}^{(a)}\rangle= 1 ⟨ ζ M ( a ) ∣ ζ M ( a ) ⟩ = 1 , from Eq. (28), it is required that ∣ a 0 M ( a ) ∣ 2 + ∣ a 1 M ( a ) ∣ 2 = 1 \lvert a_{0M}^{(a)}\rvert^{2} + \lvert a_{1M}^{(a)}\rvert^{2} = 1 ∣ a 0 M ( a ) ∣ 2 + ∣ a 1 M ( a ) ∣ 2 = 1 . But from Eq. (37) , ⟨ ζ j ( a ) ∣ ζ j ( a ) ⟩ = ( ∣ a 0 j ( a ) ∣ 2 + ∣ a 1 j ( a ) ∣ 2 ) ⟨ ζ j + 1 ( a ) ∣ ζ j + 1 ( a ) ⟩ \langle\zeta_{j}^{(a)}\vert\zeta_{j}^{(a)}\rangle= (\lvert a_{0j}^{(a)}\rvert^{2} + \lvert a_{1j}^{(a)}\rvert^{2})\langle\zeta_{j+1}^{(a)}\vert\zeta_{j+1}^{(a)}\rangle ⟨ ζ j ( a ) ∣ ζ j ( a ) ⟩ = (∣ a 0 j ( a ) ∣ 2 + ∣ a 1 j ( a ) ∣ 2 ) ⟨ ζ j + 1 ( a ) ∣ ζ j + 1 ( a ) ⟩ , and so for Eq. (45) to be true for all j j j , we require
∣ a 0 j ( a ) ∣ 2 + ∣ a 1 j ( a ) ∣ 2 = 1 ∀ j (46) \lvert a_{0j}^{(a)}\rvert^{2} + \lvert a_{1j}^{(a)}\rvert^{2} = 1 \quad\forall j \tag*{(46)} ∣ a 0 j ( a ) ∣ 2 + ∣ a 1 j ( a ) ∣ 2 = 1 ∀ j (46)
Note that Eq. (46) is a stronger criterion than Eq. (44) , i.e. satisfying Eq. (46) will ensure that Eq. (44) is satisfied, but not the other way around.
Eq. (46) might correspond to normalization of a "one dimensional" ZS. This normalization is equivalent to the normalization used when introducing quantum superposition sampling to the Multiconfigurational Ehrenfest method presented in Ref. 24.
In the event that the zombie state is real (useful for imaginary time propagation to find stationary states) then a simple choice to satisfy Eq. (46) is
a 0 j ( a ) = cos ( θ j ) , a 1 j ( a ) = sin ( θ j ) (47) a_{0j}^{(a)} = \cos(\theta_j), \qquad a_{1j}^{(a)} = \sin(\theta_j) \tag*{(47)} a 0 j ( a ) = cos ( θ j ) , a 1 j ( a ) = sin ( θ j ) (47)
where θ j \theta_j θ j is a real number such that 0 ≤ θ j < 2 π 0 \le\theta_j < 2\pi 0 ≤ θ j < 2 π . This means that a real, normalized zombie state can be completely described by M M M real { θ j } \{\theta_j\} { θ j } values. This can be generalized to complex states24 with
a 0 j ( a ) = cos ( θ j ) , a 1 j ( a ) = sin ( θ j ) e i ϕ j (48) a_{0j}^{(a)} = \cos(\theta_j), \qquad a_{1j}^{(a)} = \sin(\theta_j)e^{i\phi_j} \tag*{(48)} a 0 j ( a ) = cos ( θ j ) , a 1 j ( a ) = sin ( θ j ) e i ϕ j (48)
where ϕ j \phi_j ϕ j is drawn from the interval 0 ≤ ϕ j < 2 π 0 \le\phi_j < 2\pi 0 ≤ ϕ j < 2 π .
Algorithmic Developments
Here we consider how to compute efficiently the action of the Hamiltonian and other operators on a zombie state. We show how the electronic Hamiltonian matrix elements with Zombie states ⟨ ζ ( a ) ∣ H ^ ∣ ζ ( b ) ⟩ \langle\zeta^{(a)}|\hat{H}|\zeta^{(b)}\rangle ⟨ ζ ( a ) ∣ H ^ ∣ ζ ( b ) ⟩ can be calculated more efficiently. Firstly we show how a more efficient algorithm with a smaller prefactor can calculate matrix elements faster and secondly we will present an algorithm with O ( M 4 ) \mathcal{O}(M^4) O ( M 4 ) scaling as opposed to the O ( M 5 ) \mathcal{O}(M^5) O ( M 5 ) scaling of the naïve algorithm used in the initial paper[1 ] described above.
Reduced prefactor Hamiltonian algorithms
The bottleneck in the computation of FCI states and energies in general is evaluation of the two-electron Hamiltonian
H ^ 2 = 1 2 ∑ i , j , k , l ⟨ i j ∣ k l ⟩ b ^ i † b ^ j † b ^ l b ^ k (49) \hat{H}_2 = \frac{1}{2}\sum_{i,j,k,l} \langle ij|kl\rangle\hat{b}_i^\dagger\hat{b}_j^\dagger\hat{b}_l \hat{b}_k \tag*{(49)} H ^ 2 = 2 1 i , j , k , l ∑ ⟨ ij ∣ k l ⟩ b ^ i † b ^ j † b ^ l b ^ k (49)
It was previously shown[1 ] that the two-electron part of Eq. (7) can be evaluated as
⟨ ζ ( a ) ∣ H ^ 2 ∣ ζ ( b ) ⟩ = 1 2 ∑ i j k l M ⟨ i j ∣ k l ⟩ ⟨ ζ ( a ) ∣ ζ i j k l ( b ) ⟩ (50) \langle\zeta^{(a)}|\hat{H}_2|\zeta^{(b)}\rangle= \frac{1}{2}\sum_{ijkl}^{M}\langle ij|kl\rangle\langle\zeta^{(a)}|\zeta_{ijkl}^{(b)}\rangle \tag*{(50)} ⟨ ζ ( a ) ∣ H ^ 2 ∣ ζ ( b ) ⟩ = 2 1 ij k l ∑ M ⟨ ij ∣ k l ⟩ ⟨ ζ ( a ) ∣ ζ ij k l ( b ) ⟩ (50)
where ∣ ζ i j k l ( b ) ⟩ = b ^ i † b ^ j † b ^ l b ^ k ∣ ζ ( b ) ⟩ \left|\zeta_{ijkl}^{(b)}\right\rangle=\hat{b}_i^\dagger\hat{b}_j^\dagger\hat{b}_l\hat{b}_k\left|\zeta^{(b)}\right\rangle ζ ij k l ( b ) ⟩ = b ^ i † b ^ j † b ^ l b ^ k ζ ( b ) ⟩ . This can be solved with iterative applications of the creation and annihilation operators, meaning that the original algorithm therefore requires M 4 M^4 M 4 terms to be evaluated to solve Eq. (50) . Each term has four creation/annihilation operators (each of which is ∼ O ( M ) \sim\mathcal{O}(M) ∼ O ( M ) due to the sign changing rule) and one overlap computation, which is O ( M ) \mathcal{O}(M) O ( M ) as
Ω a b = ⟨ ζ ( a ) | ζ ( b ) ⟩ = ∏ m = 1 M ∑ n m = 0 , 1 a n m m ( a ) ∗ a n m m ( b ) . (51) \Omega_{ab}=\left\langle\zeta^{(a)}\middle|\zeta^{(b)}\right\rangle=\prod_{m=1}^{M}\sum_{n_m=0,1}a_{n_m m}^{(a)*}a_{n_m m}^{(b)}. \tag*{(51)} Ω ab = ⟨ ζ ( a ) ζ ( b ) ⟩ = m = 1 ∏ M n m = 0 , 1 ∑ a n m m ( a ) ∗ a n m m ( b ) . (51)
Consequently naïve evaluation of Eq. (7) requires M 4 M^4 M 4 creation/annihilation operations and is O ( M 5 ) \mathcal{O}(M^5) O ( M 5 ) overall.
Many of the two-electron integrals are zero by spin symmetry, i.e. ⟨ i j ∣ k l ⟩ = 0 \langle ij|kl\rangle=0 ⟨ ij ∣ k l ⟩ = 0 unless σ ( i ) = σ ( k ) \boldsymbol{\sigma}(i)=\boldsymbol{\sigma}(k) σ ( i ) = σ ( k ) and σ ( j ) = σ ( l ) \boldsymbol{\sigma}(j)=\boldsymbol{\sigma}(l) σ ( j ) = σ ( l ) , where σ ( i ) \boldsymbol{\sigma}(i) σ ( i ) is the spin of spin orbital i i i . One method for accelerating the naïve algorithm is by evaluating only ∣ ζ i j k l ( b ) ⟩ = b ^ i † b ^ j † b ^ l b ^ k ∣ ζ ( b ) ⟩ \left|\zeta_{ijkl}^{(b)}\right\rangle=\hat{b}_i^\dagger\hat{b}_j^\dagger\hat{b}_l\hat{b}_k\left|\zeta^{(b)}\right\rangle ζ ij k l ( b ) ⟩ = b ^ i † b ^ j † b ^ l b ^ k ζ ( b ) ⟩ if ⟨ i j ∣ k l ⟩ ≠ 0 \langle ij|kl\rangle\ne0 ⟨ ij ∣ k l ⟩ = 0 on spin symmetry grounds. When applied to the restricted Hartree Fock calculation this simple code modification gave nearly a four times speed up when calculating a matrix element between two ten-orbital ZSs. This is roughly to be expected since three quarters of the two-electron integrals are zero from spin symmetry.
Further, it is also possible to loop only over combinations of { i j k l } \{ijkl\} { ij k l } already known to be nonzero by altering the loops over orbitals such that only nonzero (by spin) ∣ ζ i j k l ( b ) ⟩ \left|\zeta_{ijkl}^{(b)}\right\rangle ζ ij k l ( b ) ⟩ are considered in the first place. This produces a comparable, albeit slightly larger time improvement, to ignoring zero two electron integrals.
In an attempt, to accelerate the code further, we note that computing the action of M 4 M^4 M 4 creation and annihilation operators is expensive, and look to evaluate fewer of them. Re-examining Eq. (49) and Eq. (50) we see
⟨ ζ ( a ) | H ^ 2 | ζ ( b ) ⟩ = 1 2 ∑ i j k l M ⟨ i j ∣ k l ⟩ ⟨ ζ i j ( a ) | ζ l k ( b ) ⟩ (52) \left\langle\zeta^{(a)}\middle|\hat{H}_2\middle|\zeta^{(b)}\right\rangle=\frac{1}{2}\sum_{ijkl}^{M}\langle ij|kl\rangle\left\langle\zeta_{ij}^{(a)}\middle|\zeta_{lk}^{(b)}\right\rangle \tag*{(52)} ⟨ ζ ( a ) H ^ 2 ζ ( b ) ⟩ = 2 1 ij k l ∑ M ⟨ ij ∣ k l ⟩ ⟨ ζ ij ( a ) ζ l k ( b ) ⟩ (52)
where
⟨ ζ i j ( a ) ∣ = ⟨ ζ ( a ) ∣ b ^ i † b ^ j † = ( b ^ j b ^ i ∣ ζ ( a ) ⟩ ) † (53) \left\langle\zeta_{ij}^{(a)}\right|=\left\langle\zeta^{(a)}\right|\hat{b}_i^\dagger\hat{b}_j^\dagger=\left(\hat{b}_j\hat{b}_i\left|\zeta^{(a)}\right\rangle\right)^\dagger \tag*{(53)} ⟨ ζ ij ( a ) = ⟨ ζ ( a ) b ^ i † b ^ j † = ( b ^ j b ^ i ζ ( a ) ⟩ ) † (53)
∣ ζ l k ( b ) ⟩ = b ^ l b ^ k ∣ ζ ( b ) ⟩ (54) \left|\zeta_{lk}^{(b)}\right\rangle=\hat{b}_l\hat{b}_k\left|\zeta^{(b)}\right\rangle \tag*{(54)} ζ l k ( b ) ⟩ = b ^ l b ^ k ζ ( b ) ⟩ (54)
We can then compute { ∣ ζ i j ( a ) ⟩ } ∀ i , j \{\lvert\zeta_{ij}^{(a)}\rangle\}_{\forall i,j} {∣ ζ ij ( a ) ⟩ } ∀ i , j and { ∣ ζ l k ( b ) ⟩ } ∀ l , k \{\lvert\zeta_{lk}^{(b)}\rangle\}_{\forall l,k} {∣ ζ l k ( b ) ⟩ } ∀ l , k , which requires M 2 M^2 M 2 creation and annihilation operator applications while overall the Hamiltonian evaluation is O ( M 5 ) \mathcal{O}(M^5) O ( M 5 ) . Having precomputed { ∣ ζ i j ( a ) ⟩ } \{\lvert\zeta_{ij}^{(a)}\rangle\} {∣ ζ ij ( a ) ⟩} and { ∣ ζ l k ( b ) ⟩ } \{\lvert\zeta_{lk}^{(b)}\rangle\} {∣ ζ l k ( b ) ⟩} we can then evaluate Eq. (52) .
From the definition of the overlap integral in Eq. (4) , we see that if both the dead and alive zombie amplitudes are zero for a given state, i.e. for the m m m th spin orbital
∣ ζ ( c ) ⟩ = [ a 11 ( c ) a 12 ( c ) ⋯ a 1 ( m − 1 ) ( c ) 0 a 1 ( m + 1 ) ( c ) ⋯ a 1 M ( c ) a 01 ( b ) a 02 ( c ) ⋯ a 0 ( m − 1 ) ( b ) 0 a 1 ( m + 1 ) ( c ) ⋯ a 0 M ( c ) ] (55) \lvert\zeta^{(c)}\rangle=
\begin{bmatrix}
a_{11}^{(c)} & a_{12}^{(c)} & \cdots& a_{1(m-1)}^{(c)} & 0 & a_{1(m+1)}^{(c)} & \cdots& a_{1M}^{(c)} \\
a_{01}^{(b)} & a_{02}^{(c)} & \cdots& a_{0(m-1)}^{(b)} & 0 & a_{1(m+1)}^{(c)} & \cdots& a_{0M}^{(c)}
\end{bmatrix} \tag*{(55)} ∣ ζ ( c ) ⟩ = [ a 11 ( c ) a 01 ( b ) a 12 ( c ) a 02 ( c ) ⋯ ⋯ a 1 ( m − 1 ) ( c ) a 0 ( m − 1 ) ( b ) 0 0 a 1 ( m + 1 ) ( c ) a 1 ( m + 1 ) ( c ) ⋯ ⋯ a 1 M ( c ) a 0 M ( c ) ] (55)
then the overlap of this state with any other state will be zero. Furthermore, since the zombie creation and annihilation operators only move the dead and alive amplitudes within a spin orbital, and not between spin orbitals, ∣ ζ ( c ) ⟩ \lvert\zeta^{(c)}\rangle ∣ ζ ( c ) ⟩ will continue to have zero overlap with any other state even after application of creation and annihilation operators . Consequently if a state such as ∣ ζ ( c ) ⟩ \lvert\zeta^{(c)}\rangle ∣ ζ ( c ) ⟩ is itself generated by application of creation and annihilation operators it will not contribute to the two-electron Hamiltonian and so does not need to be considered in further calculations.
We know that1 ^{1} 1
b ^ ∣ ζ ⟩ ≡ b ^ [ a 1 a 0 ] = [ 0 a 1 ] . (56) \hat{b}\lvert\zeta\rangle\equiv\hat{b}
\begin{bmatrix}
a_1 \\
a_0
\end{bmatrix}
=
\begin{bmatrix}
0 \\
a_1
\end{bmatrix}. \tag*{(56)} b ^ ∣ ζ ⟩ ≡ b ^ [ a 1 a 0 ] = [ 0 a 1 ] . (56)
Consequently, if a 1 = 0 a_1 = 0 a 1 = 0 , application of b ^ \hat{b} b ^ returns a vanishing state which will have no overlap with any other. This is a rephrasing, in zombie terms, of the well known result from electronic structure theory that trying to annihilate an electron which is not there will return zero. Applied to calculation of the two-electron Hamiltonian, let us consider ∣ ζ i j ( a ) ⟩ = b ^ j b ^ i ∣ ζ ( a ) ⟩ \lvert\zeta_{ij}^{(a)}\rangle= \hat{b}_j\hat{b}_i\lvert\zeta^{(a)}\rangle ∣ ζ ij ( a ) ⟩ = b ^ j b ^ i ∣ ζ ( a ) ⟩ . If a 1 i ( a ) = 0 a_{1i}^{(a)} = 0 a 1 i ( a ) = 0 , then b ^ i ∣ ζ ( a ) ⟩ \hat{b}_i\lvert\zeta^{(a)}\rangle b ^ i ∣ ζ ( a ) ⟩ returns a vanishing state and will contribute nothing to the two-electron calculation, even after application of b ^ j \hat{b}_j b ^ j . If b ^ i ∣ ζ ( a ) ⟩ = : ∣ ζ i ( a ) ⟩ \hat{b}_i\lvert\zeta^{(a)}\rangle=: \lvert\zeta_i^{(a)}\rangle b ^ i ∣ ζ ( a ) ⟩ =: ∣ ζ i ( a ) ⟩ is nonzero, then if a 1 j ( a ) = 0 a_{1j}^{(a)} = 0 a 1 j ( a ) = 0 , the zombie state vanishes. Consequently, when looping over orbital indices in Eq. (52) , if the application of a given annihilation operator would return a vanishing state (which can be determined from a 1 i ( a ) = 0 a_{1i}^{(a)} = 0 a 1 i ( a ) = 0 ) and similarly for j , l , k j,l,k j , l , k then the all further calculation for that creation/annihilation operator can be discarded.
In addition, considering the overlap calculation Eq. (4) and rewriting it as
Ω a b = ⟨ ζ ( a ) ∣ ζ ( b ) ⟩ = ∏ m = 1 M ( a 0 m ( a ) ∗ a 0 m ( b ) + a 1 m ( a ) ∗ a 1 m ( b ) ) (57) \Omega_{ab} = \langle\zeta^{(a)}\lvert\zeta^{(b)}\rangle= \prod_{m=1}^{M}\left(a_{0m}^{(a)*}a_{0m}^{(b)} + a_{1m}^{(a)*}a_{1m}^{(b)}\right) \tag*{(57)} Ω ab = ⟨ ζ ( a ) ∣ ζ ( b ) ⟩ = m = 1 ∏ M ( a 0 m ( a ) ∗ a 0 m ( b ) + a 1 m ( a ) ∗ a 1 m ( b ) ) (57)
we see that if any of the a 0 m ( a ) ∗ a 0 m ( b ) + a 1 m ( a ) ∗ a 1 m ( b ) a_{0m}^{(a)*}a_{0m}^{(b)}+a_{1m}^{(a)*}a_{1m}^{(b)} a 0 m ( a ) ∗ a 0 m ( b ) + a 1 m ( a ) ∗ a 1 m ( b ) terms are zero, then Ω a b = 0 \Omega_{ab}=0 Ω ab = 0 . This means that calculation can be terminated as soon as one of the terms is zero and the overlap returned as zero, without having to compute any remaining terms. These improvements gave a similar time improvement to previous changes when working with ten orbitals, however, the time improvement was approximately half as good when calculating a matrix element with 50 orbitals. Full details of the algorithmic code racing can be found in Section 1.1 of the supplementary material. All of these algorithms still have (approximate) fifth order scaling, i.e. O ( M 5 ) \mathcal{O}(M^5) O ( M 5 ) , although with a much lower prefactor than earlier versions.
Lower-scaling Hamiltonian algorithm
It is, however, possible to reduce the scaling of the two-electron Hamiltonian from O ( M 5 ) \mathcal{O}(M^5) O ( M 5 ) to O ( M 4 ) \mathcal{O}(M^4) O ( M 4 ) . We firstly note that evaluation of the two-electron Hamiltonian could be written as
⟨ ζ ( a ) ∣ H ^ 2 ∣ ζ ( b ) ⟩ = 1 2 ∑ i j k l M ⟨ i j ∣ k l ⟩ ⟨ ζ i j ( a ) ∣ b ^ l ∣ ζ k ( b ) ⟩ (58) \langle\zeta^{(a)}|\hat{H}_2|\zeta^{(b)}\rangle= \frac{1}{2}\sum_{ijkl}^{M}\langle ij|kl\rangle\langle\zeta_{ij}^{(a)}|\hat{b}_l|\zeta_k^{(b)}\rangle \tag*{(58)} ⟨ ζ ( a ) ∣ H ^ 2 ∣ ζ ( b ) ⟩ = 2 1 ij k l ∑ M ⟨ ij ∣ k l ⟩ ⟨ ζ ij ( a ) ∣ b ^ l ∣ ζ k ( b ) ⟩ (58)
We have previously shown that ⟨ ζ i j ( a ) ∣ \langle\zeta_{ij}^{(a)}| ⟨ ζ ij ( a ) ∣ can be calculated in O ( M 3 ) \mathcal{O}(M^3) O ( M 3 ) and ∣ ζ k ( b ) ⟩ |\zeta_k^{(b)}\rangle ∣ ζ k ( b ) ⟩ in O ( M 2 ) \mathcal{O}(M^2) O ( M 2 ) , and these can be calculated separately. Using previous methods, even with the calculation improvements, to evaluate ⟨ ζ i j ( a ) ∣ b ^ l ∣ ζ k ( b ) ⟩ ∀ i , j , k , l \langle\zeta_{ij}^{(a)}|\hat{b}_l|\zeta_k^{(b)}\rangle\ \forall i,j,k,l ⟨ ζ ij ( a ) ∣ b ^ l ∣ ζ k ( b ) ⟩ ∀ i , j , k , l require O ( M 3 ) \mathcal{O}(M^3) O ( M 3 ) for looping over i , j , k i,j,k i , j , k , then an O ( M ) \mathcal{O}(M) O ( M ) for summing over l l l , then another O ( M ) \mathcal{O}(M) O ( M ) for evaluating the overlap, making O ( M 5 ) \mathcal{O}(M^5) O ( M 5 ) overall. We therefore consider how to evaluate ⟨ ζ i j ( a ) ∣ b ^ l ∣ ζ k ( b ) ⟩ \langle\zeta_{ij}^{(a)}|\hat{b}_l|\zeta_k^{(b)}\rangle ⟨ ζ ij ( a ) ∣ b ^ l ∣ ζ k ( b ) ⟩ for a specific set of i , j , k i,j,k i , j , k , but over all values of l l l , in O ( M ) \mathcal{O}(M) O ( M ) operations, such that the overall algorithm would be O ( M 4 ) \mathcal{O}(M^4) O ( M 4 ) .
We start by simplifying our notation to ⟨ ζ i ( a ) ∣ b ^ l ∣ ζ ( b ) ⟩ \langle\zeta_i^{(a)}|\hat{b}_l|\zeta^{(b)}\rangle ⟨ ζ i ( a ) ∣ b ^ l ∣ ζ ( b ) ⟩ which yields
⟨ ζ ( a ) ∣ b ^ l ∣ ζ ( b ) ⟩ = ( ∏ i = 1 l − 1 a 0 i ( a ) ∗ a 0 i ( b ) − a 1 i ( a ) ∗ a 1 i ( b ) ) ⋅ a 0 l ( a ) ∗ a 1 l ( b ) ⋅ ( ∏ j = l + 1 M a 0 j ( a ) ∗ a 0 j ( b ) + a 1 j ( a ) ∗ a 1 j ( b ) ) (59) \langle\zeta^{(a)}|\hat{b}_l|\zeta^{(b)}\rangle=
\left(\prod_{i=1}^{l-1}a_{0i}^{(a)*}a_{0i}^{(b)}-a_{1i}^{(a)*}a_{1i}^{(b)}\right)\cdot a_{0l}^{(a)*}a_{1l}^{(b)}\cdot\left(\prod_{j=l+1}^{M}a_{0j}^{(a)*}a_{0j}^{(b)}+a_{1j}^{(a)*}a_{1j}^{(b)}\right) \tag*{(59)} ⟨ ζ ( a ) ∣ b ^ l ∣ ζ ( b ) ⟩ = ( i = 1 ∏ l − 1 a 0 i ( a ) ∗ a 0 i ( b ) − a 1 i ( a ) ∗ a 1 i ( b ) ) ⋅ a 0 l ( a ) ∗ a 1 l ( b ) ⋅ j = l + 1 ∏ M a 0 j ( a ) ∗ a 0 j ( b ) + a 1 j ( a ) ∗ a 1 j ( b ) (59)
Note the minus sign in the first product caused by the action of the annihilation operator. We then define
s i = a 0 i ( a ) ∗ a 1 i ( b ) , (60) s_i=a_{0i}^{(a)*}a_{1i}^{(b)}, \tag*{(60)} s i = a 0 i ( a ) ∗ a 1 i ( b ) , (60)
e i = a 0 i ( a ) ∗ a 0 i ( b ) − a 1 i ( a ) ∗ a 1 i ( b ) , (61) e_i=a_{0i}^{(a)*}a_{0i}^{(b)}-a_{1i}^{(a)*}a_{1i}^{(b)}, \tag*{(61)} e i = a 0 i ( a ) ∗ a 0 i ( b ) − a 1 i ( a ) ∗ a 1 i ( b ) , (61)
f i = a 0 i ( a ) ∗ a 0 i ( b ) + a 1 i ( a ) ∗ a 1 i ( b ) . (62) f_i=a_{0i}^{(a)*}a_{0i}^{(b)}+a_{1i}^{(a)*}a_{1i}^{(b)}. \tag*{(62)} f i = a 0 i ( a ) ∗ a 0 i ( b ) + a 1 i ( a ) ∗ a 1 i ( b ) . (62)
These can all trivially be calculated in O ( M ) \mathcal{O}(M) O ( M ) steps. We also define
g l = ∏ i = 1 l e i , (63) g_l = \prod_{i=1}^{l} e_i, \tag*{(63)} g l = i = 1 ∏ l e i , (63)
h l = ∏ i = l M f i (64) h_l = \prod_{i=l}^{M} f_i \tag*{(64)} h l = i = l ∏ M f i (64)
which can be calculated recursively in O ( M ) \mathcal{O}(M) O ( M ) steps. Then
⟨ ζ ( a ) ∣ b ^ l ∣ ζ ( b ) ⟩ = g l − 1 s l h l + 1 (65) \langle\zeta^{(a)}|\hat{b}_l|\zeta^{(b)}\rangle= g_{l-1}s_lh_{l+1} \tag*{(65)} ⟨ ζ ( a ) ∣ b ^ l ∣ ζ ( b ) ⟩ = g l − 1 s l h l + 1 (65)
which can also be found in O ( M ) \mathcal{O}(M) O ( M ) steps.
The reduced scaling improves calculation of two-electron matrix elements over 20 times for 10 orbitals calculation and over 100 times with 50 orbital calculations compared to the naïve calculation. Further details are given in Table 4 in the supplementary material.
Table 4. Time (in seconds) to compute a two-electron Hamiltonian matrix element between two Zombie states with either 10 or 50 orbitals for N2 _2 2 in the 6 − 31G** basis. The naïve algorithm loops through all indices and has O ( M 5 ) \mathcal{O}(M^5) O ( M 5 ) the scaled algorithm has O ( M 4 ) \mathcal{O}(M^4) O ( M 4 ) and offers the greatest speedup of all two-electron Hamiltonian algorithms.
We have also developed an algorithm to calculate the number operator, which scales linearly with the number of orbitals in the system. Using similar method we also show how to reduce the scaling of the algorithm calculate S z S_z S z , S ^ z 2 \hat{S}_z^2 S ^ z 2 and total spin. Details of these two algorithms are presented in appendices A and B.
Imaginary time evolution, wave function cleaning, biasing, and excited state calculation
Imaginary time propagation, i.e. solution of the Schrödinger equation in imaginary time
− d d β ∣ Ψ ⟩ = H ^ ∣ Ψ ⟩ (66) -\frac{d}{d\beta}|\Psi\rangle= \hat{H}|\Psi\rangle \tag*{(66)} − d β d ∣Ψ ⟩ = H ^ ∣Ψ ⟩ (66)
is commonly used to find the ground state of a quantum mechanical system6,7,22. Many methods of Quantum Monte-Carlo exploit it in electronic structure theory. For example a random walk in the Fock space of Slater determinants has been shown to be a beautiful technique to solve Eq. (66) and to avoid the wave function node problem, which otherwise makes quantum Monte-Carlo for Fermions difficult. In this section we will show that a small randomly-selected set of Zombie States can provide an accurate description of the ground state of a molecule.
Imaginary time algorithm
Consider a wavefunction ∣ Ψ ⟩ \lvert\Psi\rangle ∣ Ψ ⟩ that can be expanded in the basis of K K K zombie states ∣ ζ ( k ) ⟩ \lvert\zeta^{(k)}\rangle ∣ ζ ( k ) ⟩ , where K ≤ 2 M K \le2^{M} K ≤ 2 M , and which are normalised but not necessarily orthogonal,
∣ Ψ ⟩ = ∑ k K d k ∣ ζ ( k ) ⟩ . (67) \lvert\Psi\rangle= \sum_{k}^{K} d_k\lvert\zeta^{(k)}\rangle. \tag*{(67)} ∣ Ψ ⟩ = k ∑ K d k ∣ ζ ( k ) ⟩ . (67)
Then applying the identity matrix from Ref. 25 for a nonorthogonal basis set ∑ l , k ∣ ζ ( l ) ⟩ Ω l k − 1 ⟨ ζ ( k ) ∣ \sum_{l,k}\lvert\zeta^{(l)}\rangle\Omega^{-1}_{lk}\langle\zeta^{(k)}\rvert ∑ l , k ∣ ζ ( l ) ⟩ Ω l k − 1 ⟨ ζ ( k ) ∣ and using the reasoning from Ref. 26 we yield
∑ k ∂ d k ∂ β ⟨ ζ ( l ) ∣ ζ ( k ) ⟩ = − ∑ k ⟨ ζ ( l ) ∣ H ^ ∣ ζ ( k ) ⟩ d k (68) \sum_k \frac{\partial d_k}{\partial\beta}\langle\zeta^{(l)}\vert\zeta^{(k)}\rangle= -\sum_k\langle\zeta^{(l)}\vert\hat{H}\vert\zeta^{(k)}\rangle d_k \tag*{(68)} k ∑ ∂ β ∂ d k ⟨ ζ ( l ) ∣ ζ ( k ) ⟩ = − k ∑ ⟨ ζ ( l ) ∣ H ^ ∣ ζ ( k ) ⟩ d k (68)
which can be rearranged in matrix notation as
d ˙ = − Ω − 1 H d . (69) \dot{\mathbf{d}}=-\boldsymbol{\Omega}^{-1}\mathbf{H}\mathbf{d}. \tag*{(69)} d ˙ = − Ω − 1 Hd . (69)
Note how the inverse overlap matrix with the elements Ω l k = ⟨ ζ ( l ) ∣ ζ ( k ) ⟩ \Omega_{lk}=\langle\zeta^{(l)}\vert\zeta^{(k)}\rangle Ω l k = ⟨ ζ ( l ) ∣ ζ ( k ) ⟩ is required and how the algebra developed for Bosonic Coherent States is being applied to Fermionic ZSs.26
Cleaning
The propagation of Eq. (69) relaxes the wave function to the lowest energy state of the system.27 As occupations of ZSs spin-orbitals are fractional Zombie States and their linear combinations are not restricted to a particular number of electrons. However, they can be projected onto a Fock Space with a given number of electrons. The identity operator can be written as a sum of m e m_e m e electron identities I ^ m e \hat{I}_{m_e} I ^ m e :
I ^ = ∑ m e = 0 , M I ^ m e , (70) \hat{I}=\sum_{m_e=0,M}\hat{I}_{m_e}, \tag*{(70)} I ^ = m e = 0 , M ∑ I ^ m e , (70)
where the identity covering the Fock Space with m e m_e m e electrons is
I ^ m e = ∑ j ∣ φ m e ( j ) ⟩ ⟨ φ m e ( j ) ∣ (71) \hat{I}_{m_e}=\sum_j\lvert\varphi_{m_e}^{(j)}\rangle\langle\varphi_{m_e}^{(j)}\rvert \tag*{(71)} I ^ m e = j ∑ ∣ φ m e ( j ) ⟩ ⟨ φ m e ( j ) ∣ (71)
where the sum in j j j is over all Fock configurations φ m e ( j ) \varphi_{m_e}^{(j)} φ m e ( j ) with the m e m_e m e number of electrons, which can be viewed as Zombie states with "binary" amplitudes 1 and 0 and m e m_e m e unit amplitudes of alive electrons on m e m_e m e occupied spin-orbitals.
Then the superposition of Zombie States in Eq. (9) or Eq. (67) can be projected onto Fock Space of m e m_e m e electrons as
∣ Ψ m e ⟩ = I ^ m e ∣ Ψ ⟩ = ∑ j c j ∣ φ m e ( j ) ⟩ (72) \lvert\Psi_{m_e}\rangle= \hat{I}_{m_e}\lvert\Psi\rangle= \sum_j c_j\lvert\varphi_{m_e}^{(j)}\rangle \tag*{(72)} ∣ Ψ m e ⟩ = I ^ m e ∣ Ψ ⟩ = j ∑ c j ∣ φ m e ( j ) ⟩ (72)
where
c j = ∑ k = 1 , N Z S d k ⟨ φ ( j ) ∣ ζ ( k ) ⟩ . (73) c_j = \sum_{k=1,N_{\mathrm{ZS}}} d_k\langle\varphi^{(j)}\lvert\zeta^{(k)}\rangle. \tag*{(73)} c j = k = 1 , N ZS ∑ d k ⟨ φ ( j ) ∣ ζ ( k ) ⟩ . (73)
The energy of the m e m_e m e contribution and its norm can then be calculated as
E m e = ∑ j i c i ∗ c j ⟨ φ m e ( i ) ∣ H ^ ∣ φ m e ( j ) ⟩ , (74) E_{m_e} = \sum_{ji} c_i^*c_j\langle\varphi_{m_e}^{(i)}\lvert\hat{H}\lvert\varphi_{m_e}^{(j)}\rangle, \tag*{(74)} E m e = j i ∑ c i ∗ c j ⟨ φ m e ( i ) ∣ H ^ ∣ φ m e ( j ) ⟩ , (74)
and
N m e = ∑ j c j ∗ c j , (75) N_{m_e} = \sum_j c_j^*c_j, \tag*{(75)} N m e = j ∑ c j ∗ c j , (75)
respectively. The sum of energies of all m e m_e m e contributions is equal to the energy of the whole Zombie wave function Eq. (9) and all m e m_e m e norms add up to 1, i.e.
⟨ Ψ ∣ H ^ ∣ Ψ ⟩ = ∑ m e E m e (76) \langle\Psi\lvert\hat{H}\lvert\Psi\rangle= \sum_{m_e} E_{m_e} \tag*{(76)} ⟨ Ψ ∣ H ^ ∣ Ψ ⟩ = m e ∑ E m e (76)
and
∑ m e N m e = 1. (77) \sum_{m_e} N_{m_e} = 1. \tag*{(77)} m e ∑ N m e = 1. (77)
For a completely converged Zombie wave function the energy and norm of all m e m_e m e other than the right number of electrons n e n_e n e will be zero, but if convergence is incomplete the energy of the converged m e m_e m e wave function ∣ Ψ c ⟩ \lvert\Psi_c\rangle ∣ Ψ c ⟩ can be estimated as
⟨ Ψ c ∣ H ^ ∣ Ψ c ⟩ ≈ E m e / N m e . (78) \langle\Psi_c\lvert\hat{H}\lvert\Psi_c\rangle\approx E_{m_e}/N_{m_e}. \tag*{(78)} ⟨ Ψ c ∣ H ^ ∣ Ψ c ⟩ ≈ E m e / N m e . (78)
by division of the m e m_e m e energy by the m e m_e m e norm.
Biased Bases
In this section we will consider vaious ways of how a basis set of ZSs can be chosen to solve Eq. (69) . The best choice (in theory) would be a complete set of 2 M 2^M 2 M Slater determinants ∣ ϕ m e ( j ) ⟩ \lvert\phi_{m_e}^{(j)}\rangle ∣ ϕ m e ( j ) ⟩ covering all possible electron occupancies from 0 to M M M electrons in M M M spin-orbitals. Diagonalization of the Hamiltonian matrix in this basis gives all possible energy levels which possible numbers of electrons from 0 to M M M which M M M available spin orbitals can yield. A basis of randomly selected 2 M 2^M 2 M ZSs ∣ ζ ( k ) ⟩ \lvert\zeta^{(k)}\rangle ∣ ζ ( k ) ⟩ is also complete and is capable of yeilding correct quantum energies and wave functions. However, for efficient calculation the basis set must be as small as possible. We employ a biased basis which sits between the two extremes of complete order and randomness. In CASSCF calculations28 electrons and orbitals are split into three groups: inactive, active and virtual. From this we have designed a biasing method to set up a ZS basis. Inactive, or core electrons, are low lying and are always (at least in a CASSCF calculation) to be occupied; the active orbitals can either be occupied or unoccupied and virtual orbitals are always empty. We take this idea of splitting electrons into different groups and then exploit the fractional occupation of a Zombie state. This allows orbitals to be set as completely "alive" (or "dead") while also biasing orbitals to be more or less "dead" or "alive". Amplitudes for zombie states can be randomly chosen from normal distributions centred around either completely "alive" or completely "dead" values and the distributions’ width set according to its activity level. To satisfy the normalization condition given by Eq. (46) , in this paper, only one Zombie amplitude (dead or alive) is generated using the normal distribution and the other is set using Eq. (47) . So, the low-lying core electrons have "alive" amplitudes set to one, although a very narrow gaussian could also be employed, which corresponds to a normal distribution width of zero giving a δ \delta δ function with a 1 j = 1 a_{1j}=1 a 1 j = 1 and a 0 j = 0 a_{0j}=0 a 0 j = 0 . The active electron normal distributions can be centred to favour either completely alive or dead amplitudes; the point where centring changes from "alive" to "dead" naturally changes with each system. Thinner distributions are used for orbitals at either end of the active electron/orbital group and wider distributions for orbitals where the chance, or not, of occupation is relatively equal. Virtual orbitals would have "dead" coefficients set to 1. But again, narrow distribution near completely "dead" amplitudes can be employed.
Excited States
As previously stated the aim of developing Zombie states is so it can be implemented in noadiabatic molecular dynamics simulations and so it would be useful to compute low-lying excited states with the low computational expense that Zombie states could provide. It has previously been shown that a Gram-Schmidt orthogonalization procedure can be combined with full configuration interaction quantum Monte Carlo22 and was found to add little extra computational cost while allowing multiple low-energy states to be studied. We will apply the same process here combining imaginary time propagation and Gram-Schmidt. Generally Gram-Schmidt orthogonalization, for any set of vectors, is defined by
u k = v k − ∑ j = 1 k − 1 proj u j ( v k ) (79) \mathbf{u}_k=\mathbf{v}_k-\sum_{j=1}^{k-1}\operatorname{proj}_{\mathbf{u}_j}(\mathbf{v}_k) \tag*{(79)} u k = v k − j = 1 ∑ k − 1 proj u j ( v k ) (79)
with the projection operator
proj u ( v ) = ⟨ u , v ⟩ ⟨ u , u ⟩ . (80) \operatorname{proj}_{\mathbf{u}}(\mathbf{v})=\frac{\langle\mathbf{u},\mathbf{v}\rangle}{\langle\mathbf{u},\mathbf{u}\rangle}. \tag*{(80)} proj u ( v ) = ⟨ u , u ⟩ ⟨ u , v ⟩ . (80)
In this implementation the k k k lowest states of interest are arbitrarily set creating d k \mathbf{d}_k d k vectors which are not necessarily orthogonal. The vectors are then each orthogonalized
d k ′ = d k − ∑ j = 1 k − 1 proj d j ′ ( d k ) , (81) \mathbf{d}'_k=\mathbf{d}_k-\sum_{j=1}^{k-1}\operatorname{proj}_{\mathbf{d}'_j}(\mathbf{d}_k), \tag*{(81)} d k ′ = d k − j = 1 ∑ k − 1 proj d j ′ ( d k ) , (81)
where d k ′ \mathbf{d}'_k d k ′ denotes an orthogonalised vector, they are then normalised. Each state d k ′ \mathbf{d}'_k d k ′ is then put into the differential equation equivalent to Eq. (69)
d ˙ k = − Ω − 1 H d k ′ . (82) \dot{\mathbf{d}}_k=-\Omega^{-1}\mathbf{H}\mathbf{d}'_k. \tag*{(82)} d ˙ k = − Ω − 1 H d k ′ . (82)
A single time step is taken and a new set of d k ( β + Δ β ) = d k ′ ( β ) + d ˙ k ( β ) Δ β \mathbf{d}_k(\beta+\Delta\beta)=\mathbf{d}'_k(\beta)+\dot{\mathbf{d}}_k(\beta)\Delta\beta d k ( β + Δ β ) = d k ′ ( β ) + d ˙ k ( β ) Δ β are then found. The process then repeats: vectors are orthogonalised using the Gram-Schmidt process, normalised and a time step is taken.
RESULTS
Here we will demonstrate that imaginary time propagation is an effective and efficient method for finding ground state energies using a Slater determinant basis as a point of reference. Earlier work[1 ] used Li2 _2 2 to verify the theoretical basis of Zombie states and so here we too will use Li2 _2 2 as an example system. PyScf29 using a 6-31G** basis has been used to calculate one and two electron integrals. Five spatial molecular orbitals (and therefore 10 spin orbitals) and their one and two electron integrals were calculated. All calculations are carried out in atomic units so energies are in Hartrees.
Ground-state imaginary time propagation
The first trivial case considered is a complete basis of Slater determinant ∣ φ m e ( j ) ⟩ \left|\varphi_{m_e}^{(j)}\right\rangle φ m e ( j ) ⟩ Zombie states. Li2 _2 2 consists of 10 spin-orbitals which gives a full basis a size of 2 10 = 1024 2^{10}=1024 2 10 = 1024 basis functions. In Figure 1 the six electron restricted Hartree Fock determinant is used as a starting point and imaginary time evolution gives the neutral ground state energy of Li2 _2 2 . A full sized basis of 2 10 = 1024 2^{10}=1024 2 10 = 1024 randomly generated basis functions ∣ ζ ( k ) ⟩ \left|\zeta^{(k)}\right\rangle ζ ( k ) ⟩ was also tested. Random zombie states are generated by randomly generating θ \theta θ , between 0 and 2 π 2\pi 2 π for each orbital the dead and alive coefficients are then found by calculating a 1 = cos ( θ ) a_1=\cos(\theta) a 1 = cos ( θ ) and a 0 = sin ( θ ) a_0=\sin(\theta) a 0 = sin ( θ ) respectively. The random basis is made up of Zombie states consisting of superposition of "dead" and "alive" electrons compared to the Slater determinant basis which is entirely binary. The initial vector is a superposition of random zombie states which is chosen to be equal to the RHF determinant, and that propagation of this using imaginary time evolution (solid line in Figure 1 ) matches the result obtained by using the Slater Determinant basis. The final energy of each state obtained through imaginary time propagation is verified by comparison to the eigenvalues found by diagonalizing the complete Slater determinant Hamiltonian.
Figure 1. Imaginary time propagation starting with the 6-electron restricted Hartree Fock Slater determinant using a complete Slater determinant basis (dashed, red line) and a complete random basis (solid, orange line). Both results tend to neutral ground state energy of L i 2 \mathrm{Li}_2 Li 2 found by diagonalizing the Slater determinant Hamiltonian, shown as a grey dotted line.
When a reduced basis of 200 random Zombie states is used as seen in Figure 2 , the basis set is no longer capable of reproducing the ground state energy. The reduced basis is created by selecting 200 basis functions ∣ ζ ( k ) ⟩ \lvert\zeta^{(k)}\rangle ∣ ζ ( k ) ⟩ at random from the complete random basis previously used. The energy obtained via imaginary time propagation, in this smaller basis, no longer matches the value found by diagonalising the Slater determinant basis. But the cleaned energy provides a much better estimate of the ground state energy. For a poorly selected basis the distribution of energy and norm over possible electronic numbers m e m_e m e is shown in Figure 3 , which demonstrates that only a fraction (≈ 17.5 % \approx17.5\% ≈ 17.5% ) of the final wave function belongs to the right Fock space on n e = 6 n_e = 6 n e = 6 electrons. The highest fraction of the norm (≈ 40 % \approx40\% ≈ 40% ) belongs to the 7e Fock space. The cleaned energy E ( 6 e ) / N ( 6 e ) = − 14.598267 E(6e)/N(6e) = -14.598267 E ( 6 e ) / N ( 6 e ) = − 14.598267 is somewhat above the FCI energy of the 6e ground state (− 14.871914 -14.871914 − 14.871914 ), but the cleaned energy of the 7e Fock Space E ( 7 e ) / N ( 7 e ) = − 14.750162 E(7e)/N(7e) = -14.750162 E ( 7 e ) / N ( 7 e ) = − 14.750162 is approaching the 7e FCI (− 14.858062 -14.858062 − 14.858062 ) energy. Thus the randomly selected basis has, by chance, been set up in favor of the anion.
Figure 2. Imaginary time propagation starting with the 6 electron restricted Hartree Fock Slater determinant and using a reduced random basis of 200 Zombie sates. The neutral ground sate energy of Li2 _2 2 found by diagonalising the Slater determinant Hamiltonian is also shown in grey.
Figure 3. Energy (top) and norm (bottom) distribution for each number of electrons for a basis set of 200 randomly generated Zombie states. Only a fraction of the final wave function belongs to the Fock space on n e = 6 n_e = 6 n e = 6 electrons.
The electronic structure of the L i 2 \mathrm{Li}_2 Li 2 is not completely random and unknown so it is sensible to exploit this. A biased random basis set of Zombie states was generated using the biasing regime previously described. Eq. (48) was used to ensure the "dead" and "alive" coefficients were normalised, values θ j \theta_j θ j were randomly generated using a normal distribution centred at 1 2 π \frac{1}{2}\pi 2 1 π for electrons "alive" in the restricted Hartree Fock Slater determinant [j = 1 … 6 j = 1 \ldots6 j = 1 … 6 ] and centred around 0 for the "dead" electrons. The width, σ \sigma σ , of the normal distributions used to bias each electron are summarised in Table I and these values are used to create the biased bases in all subsequent results.There are six electrons in the neutral L i 2 \mathrm{Li}_2 Li 2 molecule and four core inactive electrons which are set as always "alive". Figure 4 schematically shows how this biasing method is applied: the first two spatial orbitals (first four spin orbitals) are set to always be occupied with the final three spatial orbitals (last six spin orbitals) having fractional occupancy.
Figure 4. Occupational probability plotted against orbital number for five spin orbitals. The first four spin orbitals are set exactly as occupied, the rest are set using the Gaussian described in table I. The average probability is shown by a cross and one standard deviation either side is the bar.
Figure 5 also demonstrates that ZS propagation can yield the ground state of the Li2 − _2^- 2 − anion. A 64 biased Zombie state basis was generated but the first basis function was set as the seven electron open-shell restricted Hartree Fock Zombie state and the remaining 63 Zombie states generated using the same biasing method as before. Similarly, the first Zombie state can be set to the six electron restricted Hartree Fock Zombie state. It can be seen in Figure 5 that depending on the choice of the initial condition the same ZS propagation can lead the ground state of neutral molecule and its anion. Figure 6 shows the result of the propagation using the basis of 10, 30 and 50 random basis ZS functions together with their improved energies obtained by cleaning. The first basis function in each basis set is the six electron restricted Hartree Fock determinant to ensure each evolution starts at the same energy. As expected the energies for these smaller biased bases are not as accurate as obtained using the ’complete’ 64 basis function Hamiltonian. However, the biasing method is considerably more accurate when a directly comparing random and biased bases of the same size.
Figure 5. Imaginary time propagation for two biased bases each made up of 63 biased Zombie state basis functions and then a Zombie state set either to the 6 electron restricted Hartree Fock determinant (orange bottom line) or the 7 electron open-shell restricted Hartree Fock determinant (red top line). The basis with six electron determinant evolves to the Li2 _2 2 neutral ground state and the basis with seven electrons evolves to the higher Li2 − _2^- 2 − anion ground state. The corresponding energies, obtained by diagonalising the complete Slater determinant basis, are also shown as horizontal lines. The details of how each electron is biased are summarised in Table I .
Table I. TABLE I: The centre μ \mu μ and width σ \sigma σ of the normal distributions used to generate θ j \theta_j θ j for the j j j -th electron of each Zombie state when creating a biased basis.
Figure 6. Imaginary time propagation for basis sets containing 50, 30 and 10 basis functions the first being the six electron restricted Hartree Fock determinant and the rest being biased Zombie state basis functions. The details of how each electron is biased are summarised in Table I . The eigenvalue for the L i 2 \mathrm{Li}_2 Li 2 ground state obtained by diagonalising the Slater determinant basis is given, as the solid horizontal line, for comparison. The cleaned energies, found by E ( 6 e ) / N ( 6 e ) E(6e)/N(6e) E ( 6 e ) / N ( 6 e ) , are shown as dashed lines.
Figure 7 shows the distribution of energy and norm over the Fock spaces with m e m_e m e electrons for the case of 30 BFs. Almost all norm is in the 6e Fock Space but even in this case cleaning improves the energy and brings it closer to the Full CI result. Figure Figure 5 shows that a basis of 64 randomly selected basis functions is complete and yields the exact result even without cleaning.
Figure 7. Energy (top) and norm (bottom) distribution for each number of electrons for a basis set of 30 biased Zombie states the first being set as the six electron restricted Hartree Fock determinant. The majority of the final wave function belongs to the Fock space on n e = 6 n_e = 6 n e = 6 electrons.
Low-lying excited states
Gram Schmidt orthogonalisation was then applied to the complete random basis and is shown in Figure 8 . Four separate states were computed, all of which were initially set to arbitrary vectors. The Gram Schmidt process was applied and then each state was propagated in imaginary time with Gram Schmidt orthogonalization applied after every time step. It can be seen in Figure 8 that the first state is the neutral ground state the second and third states are the degenerate anion ground states (degenerate as M s M_s M s can be ± 1 / 2 \pm1/2 ± 1/2 ) and the fourth is the first neutral excited state for Li2 _2 2 . All of these values match the corresponding eigenvalues found by diagonalising the complete Slater determinant basis.
Figure 8. Imaginary time propagation using Gram Schmidt orthogonalisation and the complete random basis for Li2 _2 2 . The final energies of each state correspond accordingly: State 1 is the neutral ground state; states 2 and 3 are the degenerate anion states and state 4 is the first neutral excited state. These values equal the eigenvalues obtained by diagonalizing the complete Slater determinant basis which have been shown with the dashed lines.
The same Gram Schmidt process was then applied to four states using a 64 Zombie state biased Hamiltonian. The imaginary time propagation of these four states can be seen in Figure 9 . As with complete random basis propagating in imaginary time with Gram Schmidt produces the lowest neutral state, the degenerate anion ground states and the first excited energy which are also shown on both figures as dashed lines.
Figure 9. Imaginary time propagation using Gram Schmidt orthogonalisation and the 64 Zombie state biased basis functions for Li₂. The final energies of each state correspond accordingly: State 1 is the neutral ground state; states 2 and 3 are the anion ground state and state 4 is the first excited state. These values equal the eigenvalues obtained by diagonalising the complete Slater determinant basis which have been shown with the dashed lines.
Conclusions
The findings of this paper are broad but substantially advance Zombie states as a potential method for simulating electronoic structure and dynamics. While previously shown to be numerically consistent, the alternative formalism of Zombie states, presented here, builds from the the vacuum state using creation and annihilation operators to create Zombie states. This forms a clearer link between Zombie states and more traditional electronic structure theory. This new formulation also leads to a stricter normalisation condition which not only demonstrated how ideas from bosonic systems can be translated to fermionic systems but was key in the implementation of the biasing method used. A key facet of a practicable modern methods are efficient algorithms for the calculation of the Hamiltonian and other operators. In this paper we have presented algorithms that greatly improve on the naïve algorithms for the number operator, spin operators (S ^ z \hat{S}_z S ^ z and S ^ 2 \hat{S}^2 S ^ 2 ) and the two-electron Hamiltonian. A scaled algorithm for the two-electron Hamiltonian is presented and reduces computational cost significantly. Computationally inexpensive calculation of important system properties is obviously very important for any subsequent work. But this also sets up a easily replicable method for reducing the scaling of any algorithms that may be developed in subsequent work. All of the algorithms follow a similar method using the action of creation and annihilation operators to obtain recursion relations which lead to lower-scaling algorithms.
We have also shown that using imaginary time propagation on a system of Zombie states it is possible to find the lowest-lying state of that system. A complete basis of Slater determinants and a basis of complete random Zombie states were shown to give the exact same ground state energies for L i 2 \mathrm{Li}_2 Li 2 . Imaginary time propagation removes the need for long real-time evolution and Fourier transforms. Reducing the size of the random basis resulted in the ground state energy obtained no longer matching the benchmark set by the complete Slater determinant basis. However, this problem is overcome by the use of the biasing method, where we use the ideas of CASSCF28 (or CASCI) by splitting orbitals into inactive, active and virtual types and then biasing individual orbitals in the active space. The lowest four spin orbitals were set as core orbitals and so always "alive", leaving two electrons to fill the remaining six spin orbitals, such that there were 2 6 = 64 2^6 = 64 2 6 = 64 Slater Determinants in a complete basis set for this active space and any more basis functions would lead to linear dependencies and a singularities in the overlap matrix. But with 64 biased Zombie state basis functions it was possible to produce, with imaginary time evolution, energy levels that matched the 16 times larger Slater determinant basis. We also showed that with a single Zombie state changed to a specified restricted Hartree Fock determinant it was possible to find a specific energy level with imaginary time propagation. Reducing the number of biased Zombie states gives less accurate energy levels, however, when compared to imaginary time propagation for random bases of the same size the biased bases are considerably better. In some respects the accuracy of calculations with 64 basis functions is not a great surprise from a chemistry viewpoint, since the lowest four electrons are in 1s orbitals, and therefore tightly bound to the Lithium nuclei. It would be energetically very costly to excite these electrons (compared to the 2s electrons), and they are therefore expected to remain core 1s in any low-lying states. Clearly, the use of Zombie states in not giving new scientific insight into the electronic structure of Li2 _2 2 but we have demonstrated that ZS can reproduce results with a reduced basis in an efficient manner.
It is worth noting that 64 basis functions is less than the 210 configurations possible with six electrons in ten spin orbitals but far more than the 15 possible configurations possible when the first four electrons are fixed and the remaining two can be arranged across six spin orbitals. Thus, introduction of Zombie States with non-integer occupations of orbitals for a small system has not decreased the required number of basis functions, but in fact increased them. This is not surprising as the basis of Zombie States describes multi-electronic states with all possible numbers of electrons from no electrons at all to electrons occupying all spin-orbitals. For a systems with small active space, like Li2 _2 2 for example, the price of not sticking to the right number of electrons outweighs the benefit of bringing in other excited electronic configurations which may be disregarded by active space methods. However, as can be seen from the figure Figure 6 a small ZS basis accounts for some correlation energy. For larger systems, where the active space is large, this may be an affordable way of taking electron correlation into account. Future work will focus on applying Zombie states to much larger systems that traditionally require extremely large basis sets, such as N2 _2 2 ,$7 to obtain FCI values while using significantly smaller ZS basis sets. We will also aim to apply sampling techniques previously developed for Bosonic systems30 to Zombie states which should aid in converging results, and address the possibility of choosing a linear combination of zombie states such that the overall wavefunction is an eigenstate of the number operator.
AUTHORS’ CONTRIBUTIONS
Oliver A Bramley and Timothy J H Hele contributed equally to this work.
AUTHOR DECLARATIONS
The authors have no conflicts to disclose.
Acknowledgements
The authors would like to thank George Booth for discussions on PySCF and Dmitry Makhov for help with Molpro. The support of EPSRC via the Grant No. EP/P021123/1 is acknowledged. TJHH also acknowledges a Royal Society University Research Fellowship URF\R1\201502.
Data availability
The data is available from corresponding author upon request
Number operator
Although the observable properties of a zombie state can be formally computed exactly by iterative application of creation and annihilation operators followed by computation of the overlap of the resultant states1 , this usually is not an efficient calculation. In the appendices we present algorithms for commonly-used properties of electronic states such as the number of electrons, and their spin properties.
If we consider the action of the number operator
N ^ = ∑ m = 1 M n ^ m = ∑ m = 1 M b ^ m † b ^ m (83) \hat{N} = \sum_{m=1}^{M} \hat{n}_m = \sum_{m=1}^{M} \hat{b}^{\dagger}_m \hat{b}_m \tag*{(83)} N ^ = m = 1 ∑ M n ^ m = m = 1 ∑ M b ^ m † b ^ m (83)
where b ^ m \hat{b}_m b ^ m is the annihilation operator and b ^ m † \hat{b}^{\dagger}_m b ^ m † is the creation operator for zombie state m m m , we see
n ^ m ∣ ζ ( b ) ⟩ = [ a 11 ( b ) a 12 ( b ) ⋯ a 1 ( m − 1 ) ( b ) a 1 m ( b ) ⋯ a 1 M ( b ) a 01 ( b ) a 02 ( b ) ⋯ a 0 ( m − 1 ) ( b ) 0 ⋯ a 0 M ( b ) ] (84) \hat{n}_m \lvert\zeta^{(b)} \rangle=
\begin{bmatrix}
a_{11}^{(b)} & a_{12}^{(b)} & \cdots& a_{1(m-1)}^{(b)} & a_{1m}^{(b)} & \cdots& a_{1M}^{(b)} \\
a_{01}^{(b)} & a_{02}^{(b)} & \cdots& a_{0(m-1)}^{(b)} & 0 & \cdots& a_{0M}^{(b)}
\end{bmatrix} \tag*{(84)} n ^ m ∣ ζ ( b ) ⟩ = [ a 11 ( b ) a 01 ( b ) a 12 ( b ) a 02 ( b ) ⋯ ⋯ a 1 ( m − 1 ) ( b ) a 0 ( m − 1 ) ( b ) a 1 m ( b ) 0 ⋯ ⋯ a 1 M ( b ) a 0 M ( b ) ] (84)
such that n ^ m \hat{n}_m n ^ m effectively ‘deletes’ the coefficient a 0 m ( b ) a_{0m}^{(b)} a 0 m ( b ) . Note that the sign switching cancels itself out. It therefore appears that the acting with the number operator N ^ \hat{N} N ^ is O ( M ) \mathcal{O}(M) O ( M ) as the summation is over M M M terms.
Comparison of Eq. (4) and Eq. (83) suggests that computing the number of electrons represented by any zombie state, i.e. ⟨ ζ ( a ) ∣ N ^ ∣ ζ ( b ) ⟩ \langle\zeta^{(a)} \lvert\hat{N} \lvert\zeta^{(b)} \rangle ⟨ ζ ( a ) ∣ N ^ ∣ ζ ( b ) ⟩ would be O ( M 2 ) \mathcal{O}(M^2) O ( M 2 ) as computing the overlap of two Zombie states is O ( M ) \mathcal{O}(M) O ( M ) .
However, it is possible to construct an algorithm which is only O ( M ) O(M) O ( M ) by careful consideration of the summation and the product, by adapting an algorithm from Ref. 31. Mathematically, calculation of the action of the number operator is
⟨ ζ ( a ) ∣ N ^ ∣ ζ ( b ) ⟩ = ∑ l = 1 M ⟨ ζ ( a ) ∣ n ^ l ∣ ζ ( b ) ⟩ = ∑ l = 1 M [ ∏ j = 1 l − 1 ( a 1 j ( a ) ∗ a 1 j ( b ) + a 0 j ( a ) ∗ a 0 j ( b ) ) ] a 1 l ( a ) ∗ a 1 l ( b ) [ ∏ j = l + 1 M ( a 1 j ( a ) ∗ a 1 j ( b ) + a 0 j ( a ) ∗ a 0 j ( b ) ) ] . (85) \langle\zeta^{(a)} \lvert\hat{N} \rvert\zeta^{(b)} \rangle= \sum_{l=1}^{M} \langle\zeta^{(a)} \lvert\hat{n}_{l} \rvert\zeta^{(b)} \rangle
= \sum_{l=1}^{M} \left[\prod_{j=1}^{l-1} \left(a_{1j}^{(a)*}a_{1j}^{(b)} + a_{0j}^{(a)*}a_{0j}^{(b)}\right)\right] a_{1l}^{(a)*}a_{1l}^{(b)} \left[\prod_{j=l+1}^{M} \left(a_{1j}^{(a)*}a_{1j}^{(b)} + a_{0j}^{(a)*}a_{0j}^{(b)}\right)\right]. \tag*{(85)} ⟨ ζ ( a ) ∣ N ^ ∣ ζ ( b ) ⟩ = l = 1 ∑ M ⟨ ζ ( a ) ∣ n ^ l ∣ ζ ( b ) ⟩ = l = 1 ∑ M [ j = 1 ∏ l − 1 ( a 1 j ( a ) ∗ a 1 j ( b ) + a 0 j ( a ) ∗ a 0 j ( b ) ) ] a 1 l ( a ) ∗ a 1 l ( b ) j = l + 1 ∏ M ( a 1 j ( a ) ∗ a 1 j ( b ) + a 0 j ( a ) ∗ a 0 j ( b ) ) . (85)
We can define
d i = a 1 i ( a ) ∗ a 1 i ( b ) (86) d_i = a_{1i}^{(a)*}a_{1i}^{(b)} \tag*{(86)} d i = a 1 i ( a ) ∗ a 1 i ( b ) (86)
and use Eq. (46c) to define
g i = ∏ l = 1 i f l . (87) g_i = \prod_{l=1}^{i} f_l. \tag*{(87)} g i = l = 1 ∏ i f l . (87)
This can be used along with Eq. (47b) to find the following recursion relations:
g 1 = f 1 , (88) g_1 = f_1, \tag*{(88)} g 1 = f 1 , (88)
g l = g l − 1 f l , l = 2 , 3 , … M (89) g_l = g_{l-1}f_l,\qquad l=2,3,\ldots M \tag*{(89)} g l = g l − 1 f l , l = 2 , 3 , … M (89)
h M = f M , (90) h_M = f_M, \tag*{(90)} h M = f M , (90)
h m = h l + 1 f l , l = M − 1 , M − 2 , … , 1. (91) h_m = h_{l+1}f_l,\qquad l=M-1,M-2,\ldots,1. \tag*{(91)} h m = h l + 1 f l , l = M − 1 , M − 2 , … , 1. (91)
Computation of Eq. (86) and Eq. (46c) are clearly O ( M ) O(M) O ( M ) and using the recursion relations so are computation of { g l } \{g_l\} { g l } and { h m } \{h_m\} { h m } . Inserting the aforementioned equations into Eq. (85)
⟨ ζ ( a ) ∣ N ^ ∣ ζ ( b ) ⟩ = ∑ l = 1 M g l − 1 d l h l + 1 (92) \langle\zeta^{(a)} \lvert\hat{N} \rvert\zeta^{(b)} \rangle= \sum_{l=1}^{M} g_{l-1}d_lh_{l+1} \tag*{(92)} ⟨ ζ ( a ) ∣ N ^ ∣ ζ ( b ) ⟩ = l = 1 ∑ M g l − 1 d l h l + 1 (92)
which is a summation that can also be computed in O ( M ) O(M) O ( M ) steps. When applied this new algorithm is significantly faster than the previous method; increasing the number of orbitals by a factor of 10, the new algorithm becomes roughly another 10 times faster than the old one as to be expected from the scaling arguments above. Full details of this code racing can be found in Table 5 of the supplementary material.
Table 5. Time (in seconds) to compute orbital occupancy of random zombie state populated with gaussian deviates. The old algorithm is much slower in absolute terms, and shows worse scaling.
Since Zombie states are not usually eigenstates of the number operator, unlike most Slater determinants, the uncertainty in the in number of electrons can be defined as a standard deviation
σ N = ⟨ N ^ 2 ⟩ − ⟨ N ^ ⟩ (93) \sigma_N = \sqrt{\langle\hat{N}^{2} \rangle- \langle\hat{N} \rangle} \tag*{(93)} σ N = ⟨ N ^ 2 ⟩ − ⟨ N ^ ⟩ (93)
For N ^ 2 \hat{N}^{2} N ^ 2 ,
⟨ ζ ( a ) ∣ N ^ 2 ∣ ζ ( b ) ⟩ = ∑ k = 1 M ⟨ ζ ( a ) ∣ N ^ n ^ k ∣ ζ ( b ) ⟩ (94) \langle\zeta^{(a)}|\hat{N}^{2}|\zeta^{(b)}\rangle= \sum_{k=1}^{M}\langle\zeta^{(a)}|\hat{N}\hat{n}_{k}|\zeta^{(b)}\rangle \tag*{(94)} ⟨ ζ ( a ) ∣ N ^ 2 ∣ ζ ( b ) ⟩ = k = 1 ∑ M ⟨ ζ ( a ) ∣ N ^ n ^ k ∣ ζ ( b ) ⟩ (94)
Computing n ^ k ∣ ζ ( b ) ⟩ \hat{n}_{k}|\zeta^{(b)}\rangle n ^ k ∣ ζ ( b ) ⟩ is trivial (simply delete the ‘dead’ coefficient for orbital k k k ). We can therefore define ∣ ζ k ( b ) ⟩ = n ^ k ∣ ζ ( b ) ⟩ |\zeta_{k}^{(b)}\rangle= \hat{n}_{k}|\zeta^{(b)}\rangle ∣ ζ k ( b ) ⟩ = n ^ k ∣ ζ ( b ) ⟩ and compute
⟨ ζ ( a ) ∣ N ^ 2 ∣ ζ ( b ) ⟩ = ∑ k = 1 M ⟨ ζ ( a ) ∣ N ^ ∣ ζ k ( b ) ⟩ (95) \langle\zeta^{(a)}|\hat{N}^{2}|\zeta^{(b)}\rangle= \sum_{k=1}^{M}\langle\zeta^{(a)}|\hat{N}|\zeta_{k}^{(b)}\rangle \tag*{(95)} ⟨ ζ ( a ) ∣ N ^ 2 ∣ ζ ( b ) ⟩ = k = 1 ∑ M ⟨ ζ ( a ) ∣ N ^ ∣ ζ k ( b ) ⟩ (95)
using the known algorithm for computing the number operator, so this is O ( M 2 ) \mathcal{O}(M^{2}) O ( M 2 ) instead of O ( M 3 ) \mathcal{O}(M^{3}) O ( M 3 ) .
The general idea presented trivially extends to the ‘Ghost’ operator
G ^ = ∑ m = 1 M s ^ m : = ∑ m = 1 M b ^ m b ^ m † (96) \hat{G} = \sum_{m=1}^{M}\hat{s}_{m} := \sum_{m=1}^{M}\hat{b}_{m}\hat{b}_{m}^{\dagger} \tag*{(96)} G ^ = m = 1 ∑ M s ^ m := m = 1 ∑ M b ^ m b ^ m † (96)
which counts how many of the zombie states are ‘dead’ (unoccupied), as opposed to the number operator which counts how many of them are alive.
Spin operators
S ^ z \hat{S}_{z} S ^ z operator
Orbitals are defined with the assumption that any used in the zombie state calculation are from a restricted calculation such that for each orbital with spin ∣ α ⟩ |\alpha\rangle ∣ α ⟩ (spin up, m s = + 1 / 2 m_s = +1/2 m s = + 1/2 ) there exists an orbital with the same spatial wavefunction but spin component ∣ β ⟩ |\beta\rangle ∣ β ⟩ (spin down, m s = − 1 / 2 m_s = -1/2 m s = − 1/2 ). For a system with M M M spin orbitals, there will consequently be K K K spatial orbitals where K = M / 2 K = M/2 K = M /2 , K ∈ N K \in\mathbb{N} K ∈ N . We further define that all spin orbitals with up spin have an odd index m = 1 , 3 , … M − 1 m = 1,3,\ldots M-1 m = 1 , 3 , … M − 1 and all spin orbitals with down spin have an even index m = 2 , 4 , … , M m = 2,4,\ldots,M m = 2 , 4 , … , M , such that the k k k th spatial orbital has ∣ α ⟩ |\alpha\rangle ∣ α ⟩ spin orbital m = 2 k − 1 m = 2k-1 m = 2 k − 1 and ∣ β ⟩ |\beta\rangle ∣ β ⟩ spin orbital m = 2 k m = 2k m = 2 k , k = 1 , 2 , … , K k = 1,2,\ldots,K k = 1 , 2 , … , K .
Using this numbering convention, in second quantization notation
S ^ z = 1 2 ∑ k = 1 K ( n ^ 2 k − 1 − n ^ 2 k ) (97) \hat{S}_z = \frac{1}{2}\sum_{k=1}^{K}\left(\hat{n}_{2k-1}-\hat{n}_{2k}\right) \tag*{(97)} S ^ z = 2 1 k = 1 ∑ K ( n ^ 2 k − 1 − n ^ 2 k ) (97)
= 1 2 ∑ m = 1 M ( − 1 ) m − 1 n ^ m . (98) = \frac{1}{2}\sum_{m=1}^{M}(-1)^{m-1}\hat{n}_m. \tag*{(98)} = 2 1 m = 1 ∑ M ( − 1 ) m − 1 n ^ m . (98)
The optimised number operator is then adapted introducing a simple sign change rule to calculate S z S_z S z in O ( M ) \mathcal{O}(M) O ( M ) steps. Comparison of the naïve algorithm, using creation and annihilation operators, and the optimised algorithm, co-opting the optimised number operator equations, can be found in Table 5 of the supplementary material.
Faster S ^ z 2 \hat{S}_z^2 S ^ z 2 computation
Prima facie, computation of S ^ z 2 \hat{S}_z^2 S ^ z 2 would be O ( M 3 ) \mathcal{O}(M^3) O ( M 3 ) using Eq. (B1)
S ^ z 2 = 1 4 ∑ k = 1 M / 2 ∑ j = 1 M / 2 ( n ^ 2 k − 1 − n ^ 2 k ) ( n ^ 2 j − 1 − n ^ 2 j ) = 1 4 ∑ k = 1 M ∑ j = 1 M n ^ k n ^ j ( − 1 ) j + k (99) \hat{S}_z^2 = \frac{1}{4}\sum_{k=1}^{M/2}\sum_{j=1}^{M/2}\left(\hat{n}_{2k-1}-\hat{n}_{2k}\right)\left(\hat{n}_{2j-1}-\hat{n}_{2j}\right) = \frac{1}{4}\sum_{k=1}^{M}\sum_{j=1}^{M}\hat{n}_k\hat{n}_j(-1)^{j+k} \tag*{(99)} S ^ z 2 = 4 1 k = 1 ∑ M /2 j = 1 ∑ M /2 ( n ^ 2 k − 1 − n ^ 2 k ) ( n ^ 2 j − 1 − n ^ 2 j ) = 4 1 k = 1 ∑ M j = 1 ∑ M n ^ k n ^ j ( − 1 ) j + k (99)
so there is O ( M ) \mathcal{O}(M) O ( M ) for the summation over k k k , another over j j j , and another to evaluate overlap. However, extending the adapted number operator algorithm used for S ^ z \hat{S}_z S ^ z in O ( M ) \mathcal{O}(M) O ( M ) calculation to S ^ z 2 \hat{S}_z^2 S ^ z 2 is straightforward,
⟨ ζ ( a ) ∣ S ^ z 2 ∣ ζ ( b ) ⟩ = 1 2 ∑ m M ⟨ ζ ( a ) ∣ S ^ z n ^ m ∣ ζ ( b ) ⟩ ( − 1 ) m (100) \langle\zeta^{(a)}|\hat{S}_z^2|\zeta^{(b)}\rangle= \frac{1}{2}\sum_{m}^{M}\langle\zeta^{(a)}|\hat{S}_z\hat{n}_m|\zeta^{(b)}\rangle(-1)^m \tag*{(100)} ⟨ ζ ( a ) ∣ S ^ z 2 ∣ ζ ( b ) ⟩ = 2 1 m ∑ M ⟨ ζ ( a ) ∣ S ^ z n ^ m ∣ ζ ( b ) ⟩ ( − 1 ) m (100)
but n ^ m ∣ ζ ( b ) ⟩ \hat{n}_m|\zeta^{(b)}\rangle n ^ m ∣ ζ ( b ) ⟩ gives another zombie state that we call ∣ ζ ( b , m ) ⟩ |\zeta^{(b,m)}\rangle ∣ ζ ( b , m ) ⟩ such that
⟨ ζ ( a ) ∣ S ^ z 2 ∣ ζ ( b ) ⟩ = 1 2 ∑ m M ⟨ ζ ( a ) ∣ S ^ z ∣ ζ ( b , m ) ⟩ ( − 1 ) m . (101) \langle\zeta^{(a)}|\hat{S}_z^2|\zeta^{(b)}\rangle= \frac{1}{2}\sum_{m}^{M}\langle\zeta^{(a)}|\hat{S}_z|\zeta^{(b,m)}\rangle(-1)^m. \tag*{(101)} ⟨ ζ ( a ) ∣ S ^ z 2 ∣ ζ ( b ) ⟩ = 2 1 m ∑ M ⟨ ζ ( a ) ∣ S ^ z ∣ ζ ( b , m ) ⟩ ( − 1 ) m . (101)
The bra-ket can be evaluated in O ( M ) \mathcal{O}(M) O ( M ) and therefore the action of the S ^ z 2 \hat{S}_z^2 S ^ z 2 operator in O ( M 2 ) \mathcal{O}(M^2) O ( M 2 ) .
Total spin
Usually in electronic structure calculation one also wants to know the total spin2 ^2 2
S ^ 2 = S ^ x 2 + S ^ y 2 + S ^ z 2 (102) \hat{S}^2 = \hat{S}_x^2+\hat{S}_y^2+\hat{S}_z^2 \tag*{(102)} S ^ 2 = S ^ x 2 + S ^ y 2 + S ^ z 2 (102)
= S ^ + S ^ − − S ^ z + S ^ z 2 (103) = \hat{S}_+\hat{S}_- - \hat{S}_z + \hat{S}_z^2 \tag*{(103)} = S ^ + S ^ − − S ^ z + S ^ z 2 (103)
We can apply the faster S ^ z \hat{S}_z S ^ z and S ^ z 2 \hat{S}_z^2 S ^ z 2 algorithms as detailed above. S ^ + \hat{S}_+ S ^ + and S ^ − \hat{S}_- S ^ − are raising and lowering operators,
S ^ + = ∑ k = 1 N s p a s ^ + , k (104) \hat{S}_+ = \sum_{k=1}^{N_{\mathrm{spa}}} \hat{s}_{+,k} \tag*{(104)} S ^ + = k = 1 ∑ N spa s ^ + , k (104)
S ^ − = ∑ k = 1 N s p a s ^ − , k (105) \hat{S}_- = \sum_{k=1}^{N_{\mathrm{spa}}} \hat{s}_{-,k} \tag*{(105)} S ^ − = k = 1 ∑ N spa s ^ − , k (105)
s ^ + , k = b ^ 2 k − 1 † b ^ 2 k (106) \hat{s}_{+,k} = \hat{b}_{2k-1}^{\dagger}\hat{b}_{2k} \tag*{(106)} s ^ + , k = b ^ 2 k − 1 † b ^ 2 k (106)
s ^ − , k = b ^ 2 k † b ^ 2 k − 1 (107) \hat{s}_{-,k} = \hat{b}_{2k}^{\dagger}\hat{b}_{2k-1} \tag*{(107)} s ^ − , k = b ^ 2 k † b ^ 2 k − 1 (107)
where K K K is the number of spatial orbitals , viz K = M / 2 K=M/2 K = M /2 . We are numbering the orbitals 1 , 2 , … , K 1,2,\ldots,K 1 , 2 , … , K , such that the k k k th spatial orbital has an alpha spin orbital number 2 k − 1 2k-1 2 k − 1 and a beta spin orbital number 2 k 2k 2 k .
We then observe the effect of s ^ + , k \hat{s}_{+,k} s ^ + , k and s ^ − , k \hat{s}_{-,k} s ^ − , k on the wavefunction (where m = 2 k m=2k m = 2 k )
s ^ + , k ∣ ζ ( b ) ⟩ = b ^ 2 k − 1 † b ^ 2 k [ a 11 ( b ) a 12 ( b ) ⋯ a 1 ( m − 1 ) ( b ) a 1 m ( b ) a 1 ( m + 1 ) ( b ) ⋯ a 1 M ( b ) a 01 ( b ) a 02 ( b ) ⋯ a 0 ( m − 1 ) ( b ) a 0 m ( b ) a 0 ( m + 1 ) ( b ) ⋯ a 0 M ( b ) ] (108) \hat{s}_{+,k}|\zeta^{(b)}\rangle=
\hat{b}_{2k-1}^{\dagger}\hat{b}_{2k}
\begin{bmatrix}
a_{11}^{(b)} & a_{12}^{(b)} & \cdots& a_{1(m-1)}^{(b)} & a_{1m}^{(b)} & a_{1(m+1)}^{(b)} & \cdots& a_{1M}^{(b)} \\
a_{01}^{(b)} & a_{02}^{(b)} & \cdots& a_{0(m-1)}^{(b)} & a_{0m}^{(b)} & a_{0(m+1)}^{(b)} & \cdots& a_{0M}^{(b)}
\end{bmatrix} \tag*{(108)} s ^ + , k ∣ ζ ( b ) ⟩ = b ^ 2 k − 1 † b ^ 2 k [ a 11 ( b ) a 01 ( b ) a 12 ( b ) a 02 ( b ) ⋯ ⋯ a 1 ( m − 1 ) ( b ) a 0 ( m − 1 ) ( b ) a 1 m ( b ) a 0 m ( b ) a 1 ( m + 1 ) ( b ) a 0 ( m + 1 ) ( b ) ⋯ ⋯ a 1 M ( b ) a 0 M ( b ) ] (108)
= b ^ 2 k − 1 † [ − a 11 ( b ) − a 12 ( b ) ⋯ − a 1 ( m − 1 ) ( b ) 0 a 1 ( m + 1 ) ( b ) ⋯ a 1 M ( b ) a 01 ( b ) a 02 ( b ) ⋯ a 0 ( m − 1 ) ( b ) a 1 m ( b ) a 0 ( m + 1 ) ( b ) ⋯ a 0 M ( b ) ] (109) = \hat{b}_{2k-1}^{\dagger}
\begin{bmatrix}
-a_{11}^{(b)} & -a_{12}^{(b)} & \cdots& -a_{1(m-1)}^{(b)} & 0 & a_{1(m+1)}^{(b)} & \cdots& a_{1M}^{(b)} \\
a_{01}^{(b)} & a_{02}^{(b)} & \cdots& a_{0(m-1)}^{(b)} & a_{1m}^{(b)} & a_{0(m+1)}^{(b)} & \cdots& a_{0M}^{(b)}
\end{bmatrix} \tag*{(109)} = b ^ 2 k − 1 † [ − a 11 ( b ) a 01 ( b ) − a 12 ( b ) a 02 ( b ) ⋯ ⋯ − a 1 ( m − 1 ) ( b ) a 0 ( m − 1 ) ( b ) 0 a 1 m ( b ) a 1 ( m + 1 ) ( b ) a 0 ( m + 1 ) ( b ) ⋯ ⋯ a 1 M ( b ) a 0 M ( b ) ] (109)
= [ a 11 ( b ) a 12 ( b ) ⋯ a 0 ( m − 1 ) ( b ) 0 a 1 ( m + 1 ) ( b ) ⋯ a 1 M ( b ) a 01 ( b ) a 02 ( b ) ⋯ 0 a 1 m ( b ) a 0 ( m + 1 ) ( b ) ⋯ a 0 M ( b ) ] (110) =
\begin{bmatrix}
a_{11}^{(b)} & a_{12}^{(b)} & \cdots& a_{0(m-1)}^{(b)} & 0 & a_{1(m+1)}^{(b)} & \cdots& a_{1M}^{(b)} \\
a_{01}^{(b)} & a_{02}^{(b)} & \cdots& 0 & a_{1m}^{(b)} & a_{0(m+1)}^{(b)} & \cdots& a_{0M}^{(b)}
\end{bmatrix} \tag*{(110)} = [ a 11 ( b ) a 01 ( b ) a 12 ( b ) a 02 ( b ) ⋯ ⋯ a 0 ( m − 1 ) ( b ) 0 0 a 1 m ( b ) a 1 ( m + 1 ) ( b ) a 0 ( m + 1 ) ( b ) ⋯ ⋯ a 1 M ( b ) a 0 M ( b ) ] (110)
and
s ^ − , k ∣ ζ ( b ) ⟩ = b ^ 2 k † b ^ 2 k − 1 [ a 11 ( b ) a 12 ( b ) ⋯ a 1 ( m − 1 ) ( b ) a 1 m ( b ) a 1 ( m + 1 ) ( b ) ⋯ a 1 M ( b ) a 01 ( b ) a 02 ( b ) ⋯ a 0 ( m − 1 ) ( b ) a 0 m ( b ) a 0 ( m + 1 ) ( b ) ⋯ a 0 M ( b ) ] (111) \hat{s}_{-,k}|\zeta^{(b)}\rangle=
\hat{b}_{2k}^{\dagger}\hat{b}_{2k-1}
\begin{bmatrix}
a_{11}^{(b)} & a_{12}^{(b)} & \cdots& a_{1(m-1)}^{(b)} & a_{1m}^{(b)} & a_{1(m+1)}^{(b)} & \cdots& a_{1M}^{(b)} \\
a_{01}^{(b)} & a_{02}^{(b)} & \cdots& a_{0(m-1)}^{(b)} & a_{0m}^{(b)} & a_{0(m+1)}^{(b)} & \cdots& a_{0M}^{(b)}
\end{bmatrix} \tag*{(111)} s ^ − , k ∣ ζ ( b ) ⟩ = b ^ 2 k † b ^ 2 k − 1 [ a 11 ( b ) a 01 ( b ) a 12 ( b ) a 02 ( b ) ⋯ ⋯ a 1 ( m − 1 ) ( b ) a 0 ( m − 1 ) ( b ) a 1 m ( b ) a 0 m ( b ) a 1 ( m + 1 ) ( b ) a 0 ( m + 1 ) ( b ) ⋯ ⋯ a 1 M ( b ) a 0 M ( b ) ] (111)
= b ^ 2 k † [ − a 11 ( b ) − a 12 ( b ) ⋯ 0 a 1 m ( b ) a 1 ( m + 1 ) ( b ) ⋯ a 1 M ( b ) a 01 ( b ) a 02 ( b ) ⋯ a 1 ( m − 1 ) ( b ) a 0 m ( b ) a 0 ( m + 1 ) ( b ) ⋯ a 0 M ( b ) ] (112) = \hat{b}_{2k}^{\dagger}
\begin{bmatrix}
-a_{11}^{(b)} & -a_{12}^{(b)} & \cdots& 0 & a_{1m}^{(b)} & a_{1(m+1)}^{(b)} & \cdots& a_{1M}^{(b)} \\
a_{01}^{(b)} & a_{02}^{(b)} & \cdots& a_{1(m-1)}^{(b)} & a_{0m}^{(b)} & a_{0(m+1)}^{(b)} & \cdots& a_{0M}^{(b)}
\end{bmatrix} \tag*{(112)} = b ^ 2 k † [ − a 11 ( b ) a 01 ( b ) − a 12 ( b ) a 02 ( b ) ⋯ ⋯ 0 a 1 ( m − 1 ) ( b ) a 1 m ( b ) a 0 m ( b ) a 1 ( m + 1 ) ( b ) a 0 ( m + 1 ) ( b ) ⋯ ⋯ a 1 M ( b ) a 0 M ( b ) ] (112)
= [ a 11 ( b ) a 12 ( b ) ⋯ 0 a 0 m ( b ) a 1 ( m + 1 ) ( b ) ⋯ a 1 M ( b ) a 01 ( b ) a 02 ( b ) ⋯ a 1 ( m − 1 ) ( b ) 0 a 0 ( m + 1 ) ( b ) ⋯ a 0 M ( b ) ] (113) =
\begin{bmatrix}
a_{11}^{(b)} & a_{12}^{(b)} & \cdots& 0 & a_{0m}^{(b)} & a_{1(m+1)}^{(b)} & \cdots& a_{1M}^{(b)} \\
a_{01}^{(b)} & a_{02}^{(b)} & \cdots& a_{1(m-1)}^{(b)} & 0 & a_{0(m+1)}^{(b)} & \cdots& a_{0M}^{(b)}
\end{bmatrix} \tag*{(113)} = [ a 11 ( b ) a 01 ( b ) a 12 ( b ) a 02 ( b ) ⋯ ⋯ 0 a 1 ( m − 1 ) ( b ) a 0 m ( b ) 0 a 1 ( m + 1 ) ( b ) a 0 ( m + 1 ) ( b ) ⋯ ⋯ a 1 M ( b ) a 0 M ( b ) ] (113)
In both cases the sign changes cancel each other out exactly. This means that no sign change is required for evaluating S ^ + \hat{S}_+ S ^ + or S ^ − \hat{S}_- S ^ − , saving computational cost. However, there are clearly reductions to be made in the scaling that should reduce the time needed to compute ⟨ ζ ( a ) ∣ S ^ + , − k S ^ − , k ∣ ζ ( b ) ⟩ \langle\zeta^{(a)}|\hat{S}_{+,-k}\hat{S}_{-,k}|\zeta^{(b)}\rangle ⟨ ζ ( a ) ∣ S ^ + , − k S ^ − , k ∣ ζ ( b ) ⟩ . The action of s ^ − , k ∣ ζ ( b ) ⟩ \hat{s}_{-,k}|\zeta^{(b)}\rangle s ^ − , k ∣ ζ ( b ) ⟩ defined by Eq. (B8) can be defined as s ^ − , k ∣ ζ ( b ) ⟩ = ∣ ζ k ( c ) ⟩ \hat{s}_{-,k}|\zeta^{(b)}\rangle=|\zeta_k^{(c)}\rangle s ^ − , k ∣ ζ ( b ) ⟩ = ∣ ζ k ( c ) ⟩ (where K = M / 2 K=M/2 K = M /2 and m = 2 l m=2l m = 2 l ) which has O ( M ) \mathcal{O}(M) O ( M ) scaling. And so it is possible to compute
⟨ ζ ( a ) ∣ S ^ + S ^ − ∣ ζ ( b ) ⟩ = ∑ k = 1 K ⟨ ζ ( a ) ∣ S ^ + ∣ ζ k ( c ) ⟩ = ∑ k = 1 K ∑ l = 1 K ⟨ ζ ( a ) ∣ S ^ + , m ∣ ζ k ( c ) ⟩ = ∑ k = 1 K [ ∑ l = 1 K [ ∏ j = 1 l − 2 a 1 j ( a ) ∗ a 1 j ( c ) + a 0 j ( a ) ∗ a 0 j ( c ) ] ⋅ a 0 ( l − 1 ) ( a ) ∗ a 1 ( l − 1 ) ( c ) ⋅ a 1 l ( a ) ∗ a 0 l ( c ) ⋅ [ ∏ j = l + 1 M a 1 j ( a ) ∗ a 1 j ( c ) + a 0 j ( a ) ∗ a 0 j ( c ) ] ] (114) \begin{aligned}
\langle\zeta^{(a)}|\hat{S}_{+}\hat{S}_{-}|\zeta^{(b)}\rangle
&=\sum_{k=1}^{K}\langle\zeta^{(a)}|\hat{S}_{+}|\zeta_k^{(c)}\rangle
=\sum_{k=1}^{K}\sum_{l=1}^{K}\langle\zeta^{(a)}|\hat{S}_{+,m}|\zeta_k^{(c)}\rangle\\
&=\sum_{k=1}^{K}\left[\sum_{l=1}^{K}\left[\prod_{j=1}^{l-2}a_{1j}^{(a)*}a_{1j}^{(c)}+a_{0j}^{(a)*}a_{0j}^{(c)}\right]\cdot a_{0(l-1)}^{(a)*}a_{1(l-1)}^{(c)}\cdot a_{1l}^{(a)*}a_{0l}^{(c)}\cdot\left[\prod_{j=l+1}^{M}a_{1j}^{(a)*}a_{1j}^{(c)}+a_{0j}^{(a)*}a_{0j}^{(c)}\right]\right] \tag*{(114)}
\end{aligned} ⟨ ζ ( a ) ∣ S ^ + S ^ − ∣ ζ ( b ) ⟩ = k = 1 ∑ K ⟨ ζ ( a ) ∣ S ^ + ∣ ζ k ( c ) ⟩ = k = 1 ∑ K l = 1 ∑ K ⟨ ζ ( a ) ∣ S ^ + , m ∣ ζ k ( c ) ⟩ = k = 1 ∑ K l = 1 ∑ K [ j = 1 ∏ l − 2 a 1 j ( a ) ∗ a 1 j ( c ) + a 0 j ( a ) ∗ a 0 j ( c ) ] ⋅ a 0 ( l − 1 ) ( a ) ∗ a 1 ( l − 1 ) ( c ) ⋅ a 1 l ( a ) ∗ a 0 l ( c ) ⋅ j = l + 1 ∏ M a 1 j ( a ) ∗ a 1 j ( c ) + a 0 j ( a ) ∗ a 0 j ( c ) (114)
In a similar manner to the scaled Hamiltonian with, Eq. (46c) and the number operator with Eq. (87) and Eq. (86) we define
f i = ( a 1 ( i − 1 ) ( a ) ∗ a 1 ( i − 1 ) ( c ) + a 0 ( i − 1 ) ( a ) ∗ a 0 ( i − 1 ) ( c ) ) ⋅ ( a 1 i ( a ) ∗ a 1 i ( c ) + a 0 i ( a ) ∗ a 0 i ( c ) ) (115) f_i=(a_{1(i-1)}^{(a)*}a_{1(i-1)}^{(c)}+a_{0(i-1)}^{(a)*}a_{0(i-1)}^{(c)})\cdot(a_{1i}^{(a)*}a_{1i}^{(c)}+a_{0i}^{(a)*}a_{0i}^{(c)}) \tag*{(115)} f i = ( a 1 ( i − 1 ) ( a ) ∗ a 1 ( i − 1 ) ( c ) + a 0 ( i − 1 ) ( a ) ∗ a 0 ( i − 1 ) ( c ) ) ⋅ ( a 1 i ( a ) ∗ a 1 i ( c ) + a 0 i ( a ) ∗ a 0 i ( c ) ) (115)
g l = ∏ i = 1 l f i (116) g_l=\prod_{i=1}^{l}f_i \tag*{(116)} g l = i = 1 ∏ l f i (116)
h l = ∏ i = l K f i (117) h_l=\prod_{i=l}^{K}f_i \tag*{(117)} h l = i = l ∏ K f i (117)
d i = a 0 ( i − 1 ) ( a ) ∗ a 1 ( i − 1 ) ( c ) a 1 i ( a ) ∗ a 0 i ( c ) (118) d_i=a_{0(i-1)}^{(a)*}a_{1(i-1)}^{(c)}a_{1i}^{(a)*}a_{0i}^{(c)} \tag*{(118)} d i = a 0 ( i − 1 ) ( a ) ∗ a 1 ( i − 1 ) ( c ) a 1 i ( a ) ∗ a 0 i ( c ) (118)
Which gives
⟨ ζ ( a ) ∣ S ^ + , l ∣ ζ k ( c ) ⟩ = g l − 2 d l h l + 1 (119) \langle\zeta^{(a)}|\hat{S}_{+,l}|\zeta_k^{(c)}\rangle=g_l-2d_lh_{l+1} \tag*{(119)} ⟨ ζ ( a ) ∣ S ^ + , l ∣ ζ k ( c ) ⟩ = g l − 2 d l h l + 1 (119)
Overall this reduces the scaling from O ( M 3 ) \mathcal{O}(M^3) O ( M 3 ) to O ( M 2 ) \mathcal{O}(M^2) O ( M 2 ) . This new algorithm was then used alongside the original speed improvements giving a large time speedup, see Table 8 in the supplementary material for full details. However, it should be possible to scale the ⟨ ζ ( a ) ∣ S ^ + S ^ − ∣ ζ ( b ) ⟩ \langle\zeta^{(a)}|\hat{S}_{+}\hat{S}_{-}|\zeta^{(b)}\rangle ⟨ ζ ( a ) ∣ S ^ + S ^ − ∣ ζ ( b ) ⟩ removing the need to calculate ∣ ζ ( c ) ⟩ |\zeta^{(c)}\rangle ∣ ζ ( c ) ⟩ . We can set m = 2 l m=2l m = 2 l and n = 2 k n=2k n = 2 k and then define
Table 8. Time (in seconds) to compute ⟨ ζ ( a ) ∣ S ^ + S ^ − ∣ ζ ( b ) ⟩ \langle\zeta^{(a)}|\hat{S}_{+}\hat{S}_{-}|\zeta^{(b)}\rangle ⟨ ζ ( a ) ∣ S ^ + S ^ − ∣ ζ ( b ) ⟩ of random zombie state populated with gaussian deviates. The naïve algorithm uses the no sign change rule for S ^ + \hat{S}_{+} S ^ + or S ^ − \hat{S}_{-} S ^ − the scale reduced algorithm requires calculation of ∣ ζ ( c ) ⟩ |\zeta^{(c)}\rangle ∣ ζ ( c ) ⟩ and the prefactor reduced algorithm directly computes S ^ + \hat{S}_{+} S ^ + and S ^ − \hat{S}_{-} S ^ − acting on ∣ ζ ( b ) ⟩ |\zeta^{(b)}\rangle ∣ ζ ( b ) ⟩ . The speedups are for each scaled algorithm when compared to the naïve algorithm orbitals. Both scaled algorithms show a real time improvement with the prefactor reduced algorithm being twice as fast as the scaled algorithm while still having the same scaling.
s ^ + , l s ^ − , k ∣ ζ ( b ) ⟩ = b ^ 2 l − 1 † b ^ 2 l b ^ 2 k † b ^ 2 k − 1 [ a 11 ( b ) a 12 ( b ) ⋯ a 1 m ( b ) ⋯ a 1 n ( b ) ⋯ a 1 M ( b ) a 01 ( b ) a 02 ( b ) ⋯ a 0 m ( b ) ⋯ a 0 n ( b ) ⋯ a 0 M ( b ) ] (120) \hat{s}_{+,l}\hat{s}_{-,k}|\zeta^{(b)}\rangle=\hat{b}^{\dagger}_{2l-1}\hat{b}_{2l}\hat{b}^{\dagger}_{2k}\hat{b}_{2k-1}
\begin{bmatrix}
a_{11}^{(b)} & a_{12}^{(b)} & \cdots& a_{1m}^{(b)} & \cdots& a_{1n}^{(b)} & \cdots& a_{1M}^{(b)}\\
a_{01}^{(b)} & a_{02}^{(b)} & \cdots& a_{0m}^{(b)} & \cdots& a_{0n}^{(b)} & \cdots& a_{0M}^{(b)}
\end{bmatrix} \tag*{(120)} s ^ + , l s ^ − , k ∣ ζ ( b ) ⟩ = b ^ 2 l − 1 † b ^ 2 l b ^ 2 k † b ^ 2 k − 1 [ a 11 ( b ) a 01 ( b ) a 12 ( b ) a 02 ( b ) ⋯ ⋯ a 1 m ( b ) a 0 m ( b ) ⋯ ⋯ a 1 n ( b ) a 0 n ( b ) ⋯ ⋯ a 1 M ( b ) a 0 M ( b ) ] (120)
which can have the following outcomes
s ^ + , ℓ s ^ − , k ∣ ζ ( b ) ⟩ = { [ a 11 ( b ) a 12 ( b ) ⋯ 0 a 0 n ( b ) ⋯ a 0 ( m − 1 ) ( b ) 0 ⋯ a 1 M ( b ) a 01 ( b ) a 02 ( b ) ⋯ a 1 ( n − 1 ) ( b ) 0 ⋯ 0 a 1 m ( b ) ⋯ a 0 M ( b ) ] , if 2 k < 2 l ; [ a 11 ( b ) a 12 ( b ) ⋯ a 0 ( m − 1 ) ( b ) 0 ⋯ 0 a 0 n ( b ) ⋯ a 1 M ( b ) a 01 ( b ) a 02 ( b ) ⋯ 0 a 1 m ( b ) ⋯ a 1 ( n − 1 ) ( b ) 0 ⋯ a 0 M ( b ) ] , if 2 k > 2 l ; [ a 11 ( b ) a 12 ( b ) ⋯ a 1 ( m − 2 ) ( b ) a 1 ( m − 1 ) 0 a 1 ( m + 1 ) ( b ) ⋯ a 1 M ( b ) a 01 ( b ) a 02 ( b ) ⋯ a 0 ( m − 2 ) ( b ) 0 a 0 m a 0 ( m + 1 ) ( b ) ⋯ a 0 M ( b ) ] , if 2 k = 2 l . (121) \hat{s}_{+,\ell}\hat{s}_{-,k}|\zeta^{(b)}\rangle=
\begin{cases}
\left[\begin{array}{cccccccccc}
a_{11}^{(b)} & a_{12}^{(b)} & \cdots& 0 & a_{0n}^{(b)} & \cdots& a_{0(m-1)}^{(b)} & 0 & \cdots& a_{1M}^{(b)} \\
a_{01}^{(b)} & a_{02}^{(b)} & \cdots& a_{1(n-1)}^{(b)} & 0 & \cdots& 0 & a_{1m}^{(b)} & \cdots& a_{0M}^{(b)}
\end{array}\right], & \text{if } 2k<2l; \\[1em]
\left[\begin{array}{cccccccccc}
a_{11}^{(b)} & a_{12}^{(b)} & \cdots& a_{0(m-1)}^{(b)} & 0 & \cdots& 0 & a_{0n}^{(b)} & \cdots& a_{1M}^{(b)} \\
a_{01}^{(b)} & a_{02}^{(b)} & \cdots& 0 & a_{1m}^{(b)} & \cdots& a_{1(n-1)}^{(b)} & 0 & \cdots& a_{0M}^{(b)}
\end{array}\right], & \text{if } 2k>2l; \\[1em]
\left[\begin{array}{cccccccccc}
a_{11}^{(b)} & a_{12}^{(b)} & \cdots& a_{1(m-2)}^{(b)} & a_{1(m-1)} & 0 & a_{1(m+1)}^{(b)} & \cdots& a_{1M}^{(b)} \\
a_{01}^{(b)} & a_{02}^{(b)} & \cdots& a_{0(m-2)}^{(b)} & 0 & a_{0m} & a_{0(m+1)}^{(b)} & \cdots& a_{0M}^{(b)}
\end{array}\right], & \text{if } 2k=2l.
\end{cases} \tag*{(121)} s ^ + , ℓ s ^ − , k ∣ ζ ( b ) ⟩ = ⎩ ⎨ ⎧ [ a 11 ( b ) a 01 ( b ) a 12 ( b ) a 02 ( b ) ⋯ ⋯ 0 a 1 ( n − 1 ) ( b ) a 0 n ( b ) 0 ⋯ ⋯ a 0 ( m − 1 ) ( b ) 0 0 a 1 m ( b ) ⋯ ⋯ a 1 M ( b ) a 0 M ( b ) ] , [ a 11 ( b ) a 01 ( b ) a 12 ( b ) a 02 ( b ) ⋯ ⋯ a 0 ( m − 1 ) ( b ) 0 0 a 1 m ( b ) ⋯ ⋯ 0 a 1 ( n − 1 ) ( b ) a 0 n ( b ) 0 ⋯ ⋯ a 1 M ( b ) a 0 M ( b ) ] , [ a 11 ( b ) a 01 ( b ) a 12 ( b ) a 02 ( b ) ⋯ ⋯ a 1 ( m − 2 ) ( b ) a 0 ( m − 2 ) ( b ) a 1 ( m − 1 ) 0 0 a 0 m a 1 ( m + 1 ) ( b ) a 0 ( m + 1 ) ( b ) ⋯ ⋯ a 1 M ( b ) a 0 M ( b ) ] , if 2 k < 2 l ; if 2 k > 2 l ; if 2 k = 2 l . (121)
which gives
⟨ ζ ( a ) ∣ s ^ + , ℓ s ^ − , k ∣ ζ ( b ) ⟩ = { [ ∏ j = k + 1 l − 2 a 1 j ( a ) ∗ a 1 j ( b ) + a 0 j ( a ) ∗ a 0 j ( b ) ] a 0 ( k − 1 ) ( a ) a 1 ( k − 1 ) ( b ) a 1 k ( a ) ∗ a 0 k ( b ) ⋅ [ ∏ j = l + 1 M a 1 j ( a ) ∗ a 1 j ( b ) + a 0 j ( a ) ∗ a 0 j ( b ) ] , if 2 k < 2 l . (122) \langle\zeta^{(a)}|\hat{s}_{+,\ell}\hat{s}_{-,k}|\zeta^{(b)}\rangle=
\begin{cases}
\left[\prod_{j=k+1}^{l-2}a_{1j}^{(a)*}a_{1j}^{(b)}+a_{0j}^{(a)*}a_{0j}^{(b)}\right]a_{0(k-1)}^{(a)}a_{1(k-1)}^{(b)}a_{1k}^{(a)*}a_{0k}^{(b)} \\
\quad\cdot\left[\prod_{j=l+1}^{M}a_{1j}^{(a)*}a_{1j}^{(b)}+a_{0j}^{(a)*}a_{0j}^{(b)}\right], & \text{if } 2k<2l.
\end{cases} \tag*{(122)} ⟨ ζ ( a ) ∣ s ^ + , ℓ s ^ − , k ∣ ζ ( b ) ⟩ = ⎩ ⎨ ⎧ [ ∏ j = k + 1 l − 2 a 1 j ( a ) ∗ a 1 j ( b ) + a 0 j ( a ) ∗ a 0 j ( b ) ] a 0 ( k − 1 ) ( a ) a 1 ( k − 1 ) ( b ) a 1 k ( a ) ∗ a 0 k ( b ) ⋅ [ ∏ j = l + 1 M a 1 j ( a ) ∗ a 1 j ( b ) + a 0 j ( a ) ∗ a 0 j ( b ) ] , if 2 k < 2 l . (122)
⟨ ζ ( a ) ∣ s ^ + , ℓ s ^ − , k ∣ ζ ( b ) ⟩ = { [ ∏ j = 1 l − 2 a 1 j ( a ) ∗ a 1 j ( b ) + a 0 j ( a ) ∗ a 0 j ( b ) ] a 1 ( l − 1 ) ( a ) ∗ a 0 ( l − 1 ) ( b ) a 0 l ( a ) ∗ a 1 l ( b ) ⋅ [ ∏ j = l + 1 k − 2 a 1 j ( a ) ∗ a 1 j ( b ) + a 0 j ( a ) ∗ a 0 j ( b ) ] a 0 ( k − 1 ) ( a ) ∗ a 1 ( k − 1 ) ( b ) a 1 k ( a ) a 0 k ( b ) ⋅ [ ∏ j = k + 1 M a 1 j ( a ) ∗ a 1 j ( b ) + a 0 j ( a ) ∗ a 0 j ( b ) ] , if 2 k > 2 l . (123) \langle\zeta^{(a)}|\hat{s}_{+,\ell}\hat{s}_{-,k}|\zeta^{(b)}\rangle=
\begin{cases}
\left[\prod_{j=1}^{l-2}a_{1j}^{(a)*}a_{1j}^{(b)}+a_{0j}^{(a)*}a_{0j}^{(b)}\right]a_{1(l-1)}^{(a)*}a_{0(l-1)}^{(b)}a_{0l}^{(a)*}a_{1l}^{(b)} \\
\quad\cdot\left[\prod_{j=l+1}^{k-2}a_{1j}^{(a)*}a_{1j}^{(b)}+a_{0j}^{(a)*}a_{0j}^{(b)}\right]a_{0(k-1)}^{(a)*}a_{1(k-1)}^{(b)}a_{1k}^{(a)}a_{0k}^{(b)} \\
\quad\cdot\left[\prod_{j=k+1}^{M}a_{1j}^{(a)*}a_{1j}^{(b)}+a_{0j}^{(a)*}a_{0j}^{(b)}\right], & \text{if } 2k>2l.
\end{cases} \tag*{(123)} ⟨ ζ ( a ) ∣ s ^ + , ℓ s ^ − , k ∣ ζ ( b ) ⟩ = ⎩ ⎨ ⎧ [ ∏ j = 1 l − 2 a 1 j ( a ) ∗ a 1 j ( b ) + a 0 j ( a ) ∗ a 0 j ( b ) ] a 1 ( l − 1 ) ( a ) ∗ a 0 ( l − 1 ) ( b ) a 0 l ( a ) ∗ a 1 l ( b ) ⋅ [ ∏ j = l + 1 k − 2 a 1 j ( a ) ∗ a 1 j ( b ) + a 0 j ( a ) ∗ a 0 j ( b ) ] a 0 ( k − 1 ) ( a ) ∗ a 1 ( k − 1 ) ( b ) a 1 k ( a ) a 0 k ( b ) ⋅ [ ∏ j = k + 1 M a 1 j ( a ) ∗ a 1 j ( b ) + a 0 j ( a ) ∗ a 0 j ( b ) ] , if 2 k > 2 l . (123)
⟨ ζ ( a ) ∣ s ^ + , ℓ s ^ − , k ∣ ζ ( b ) ⟩ = { [ ∏ j = 1 l − 2 a 1 j ( a ) ∗ a 1 j ( b ) + a 0 j ( a ) ∗ a 0 j ( b ) ] a 1 ( l − 1 ) ( a ) ∗ a 1 ( l − 1 ) ( b ) a 0 l ( a ) ∗ a 0 l ( b ) ⋅ [ ∏ j = l + 1 M a 1 j ( a ) ∗ a 1 j ( b ) + a 0 j ( a ) ∗ a 0 j ( b ) ] , if 2 k = 2 l . (124) \langle\zeta^{(a)}|\hat{s}_{+,\ell}\hat{s}_{-,k}|\zeta^{(b)}\rangle=
\begin{cases}
\left[\prod_{j=1}^{l-2}a_{1j}^{(a)*}a_{1j}^{(b)}+a_{0j}^{(a)*}a_{0j}^{(b)}\right]a_{1(l-1)}^{(a)*}a_{1(l-1)}^{(b)}a_{0l}^{(a)*}a_{0l}^{(b)} \\
\quad\cdot\left[\prod_{j=l+1}^{M}a_{1j}^{(a)*}a_{1j}^{(b)}+a_{0j}^{(a)*}a_{0j}^{(b)}\right], & \text{if } 2k=2l.
\end{cases} \tag*{(124)} ⟨ ζ ( a ) ∣ s ^ + , ℓ s ^ − , k ∣ ζ ( b ) ⟩ = ⎩ ⎨ ⎧ [ ∏ j = 1 l − 2 a 1 j ( a ) ∗ a 1 j ( b ) + a 0 j ( a ) ∗ a 0 j ( b ) ] a 1 ( l − 1 ) ( a ) ∗ a 1 ( l − 1 ) ( b ) a 0 l ( a ) ∗ a 0 l ( b ) ⋅ [ ∏ j = l + 1 M a 1 j ( a ) ∗ a 1 j ( b ) + a 0 j ( a ) ∗ a 0 j ( b ) ] , if 2 k = 2 l . (124)
We then have to define the following recursion relations
f i = ( a 1 ( i − 1 ) ( a ) ∗ a 1 ( i − 1 ) ( b ) + a 0 ( i − 1 ) ( a ) ∗ a 0 ( i − 1 ) ( b ) ) ⋅ ( a 1 ( i ) ( a ) ∗ a 1 ( i ) ( b ) + a 0 ( i ) ( a ) ∗ a 0 ( i ) ( b ) ) (125) f_i=\left(a^{(a)*}_{1(i-1)}a^{(b)}_{1(i-1)}+a^{(a)*}_{0(i-1)}a^{(b)}_{0(i-1)}\right)\cdot\left(a^{(a)*}_{1(i)}a^{(b)}_{1(i)}+a^{(a)*}_{0(i)}a^{(b)}_{0(i)}\right) \tag*{(125)} f i = ( a 1 ( i − 1 ) ( a ) ∗ a 1 ( i − 1 ) ( b ) + a 0 ( i − 1 ) ( a ) ∗ a 0 ( i − 1 ) ( b ) ) ⋅ ( a 1 ( i ) ( a ) ∗ a 1 ( i ) ( b ) + a 0 ( i ) ( a ) ∗ a 0 ( i ) ( b ) ) (125)
c i = a 0 ( i − 1 ) ( a ) ∗ a 1 ( i − 1 ) ( b ) ⋅ a 1 i ( a ) ∗ a 0 i ( b ) (126) c_i=a^{(a)*}_{0(i-1)}a^{(b)}_{1(i-1)}\cdot a^{(a)*}_{1i}a^{(b)}_{0i} \tag*{(126)} c i = a 0 ( i − 1 ) ( a ) ∗ a 1 ( i − 1 ) ( b ) ⋅ a 1 i ( a ) ∗ a 0 i ( b ) (126)
d i = a 1 ( i − 1 ) ( a ) ∗ a 0 ( i − 1 ) ( b ) ⋅ a 0 i ( a ) ∗ a 1 i ( b ) (127) d_i=a^{(a)*}_{1(i-1)}a^{(b)}_{0(i-1)}\cdot a^{(a)*}_{0i}a^{(b)}_{1i} \tag*{(127)} d i = a 1 ( i − 1 ) ( a ) ∗ a 0 ( i − 1 ) ( b ) ⋅ a 0 i ( a ) ∗ a 1 i ( b ) (127)
s i = a 1 ( i − 1 ) ( a ) ∗ a 1 ( i − 1 ) ( b ) a 0 i ( a ) ∗ a 0 i ( b ) . (128) s_i=a^{(a)*}_{1(i-1)}a^{(b)}_{1(i-1)}a^{(a)*}_{0i}a^{(b)}_{0i}. \tag*{(128)} s i = a 1 ( i − 1 ) ( a ) ∗ a 1 ( i − 1 ) ( b ) a 0 i ( a ) ∗ a 0 i ( b ) . (128)
These can all trivially be calculated in O ( M ) \mathcal{O}(M) O ( M ) steps. We then also define
g l = ∏ i = 1 l f i (129) g_l=\prod_{i=1}^{l}f_i \tag*{(129)} g l = i = 1 ∏ l f i (129)
h l = ∏ i = l K f i (130) h_l=\prod_{i=l}^{K}f_i \tag*{(130)} h l = i = l ∏ K f i (130)
t ( l , p ) = ∏ i = l p f i (131) t_{(l,p)}=\prod_{i=l}^{p}f_i \tag*{(131)} t ( l , p ) = i = l ∏ p f i (131)
Eq. (B16a) and Eq. (B16b) can can be calculated recursively in O ( M ) \mathcal{O}(M) O ( M ) steps and Eq. (B16c) in O ( M 2 ) \mathcal{O}(M^2) O ( M 2 ) . Therefore
⟨ ξ ( a ) | S ^ + S ^ − | ξ ( b ) ⟩ = ∑ k = 1 K − 1 ∑ l = k + 1 K g k − 1 c k t ( k + 1 , l − 1 ) d l h l + 1 + ∑ l = 1 K − 1 ∑ k = l + 1 K g l − 1 d l t ( l + 1 , k − 1 ) c k h k + 1 + ∑ l = 1 K g l − 1 s l h l + 1 (132) \left\langle\xi^{(a)}\middle|\hat{S}_{+}\hat{S}_{-}\middle|\xi^{(b)}\right\rangle
=
\sum_{k=1}^{K-1}\sum_{l=k+1}^{K}g_{k-1}c_k t_{(k+1,l-1)}d_lh_{l+1}
+
\sum_{l=1}^{K-1}\sum_{k=l+1}^{K}g_{l-1}d_l t_{(l+1,k-1)}c_kh_{k+1}
+
\sum_{l=1}^{K}g_{l-1}s_lh_{l+1} \tag*{(132)} ⟨ ξ ( a ) S ^ + S ^ − ξ ( b ) ⟩ = k = 1 ∑ K − 1 l = k + 1 ∑ K g k − 1 c k t ( k + 1 , l − 1 ) d l h l + 1 + l = 1 ∑ K − 1 k = l + 1 ∑ K g l − 1 d l t ( l + 1 , k − 1 ) c k h k + 1 + l = 1 ∑ K g l − 1 s l h l + 1 (132)
The naïve total spin algorithm was made up of three separate algorithms S ^ + S ^ − \hat{S}_{+}\hat{S}_{-} S ^ + S ^ − , S ^ z \hat{S}_{z} S ^ z , S ^ z 2 \hat{S}_{z}^{2} S ^ z 2 that scaled O ( M 3 ) \mathcal{O}(M^3) O ( M 3 ) , O ( M 2 ) \mathcal{O}(M^2) O ( M 2 ) and O ( M 3 ) \mathcal{O}(M^3) O ( M 3 ) respectively. The scaled algorithm reduced the scaling of each algorithm to O ( M 2 ) \mathcal{O}(M^2) O ( M 2 ) , O ( M ) \mathcal{O}(M) O ( M ) and O ( M 2 ) \mathcal{O}(M^2) O ( M 2 ) respectively. This scaling improvement resulted in S ^ 2 \hat{S}^{2} S ^ 2 for 1000 orbitals being calculated over 460 times faster than the naïve algorithm; full code racing details are given in Table 8 and Table 9 of the supplementary material.
Supplementary material
February 4, 2022
Algorithm Speed Testing
Two electron Hamiltonian
Although Li2 _2 2 has been used throughout this paper N2 _2 2 using the 6 − 31G** basis has been used for testing the two electron Hamiltonian matrix element algorithms. This is so larger numbers of orbitals could be tested while not having to calculate more two-electron integrals.
Table 1. Time (in seconds) to compute a two-electron Hamiltonian matrix element between two Zombie states with either 10 or 50 orbitals for N2 _2 2 in the 6 − 31G** basis. The naïve algorithm loops through all indices the second algorithm only applies creation and annihilation operators when ⟨ i j ∣ k l ⟩ ≠ 0 \langle ij|kl\rangle\ne0 ⟨ ij ∣ k l ⟩ = 0 . This gives a good speed improvement.
Table 2. Time (in seconds) to compute a two-electron Hamiltonian matrix element between two Zombie states with either 10 or 50 orbitals for N2 _2 2 in the 6 − 31G** basis. The naïve algorithm loops through all indices the second algorithm only loops over combinations of i j k l ijkl ij k l already known to be nonzero and applies the previous ⟨ i j ∣ k l ⟩ ≠ 0 \langle ij|kl\rangle\ne0 ⟨ ij ∣ k l ⟩ = 0 rule before applying the creation and annihilation operators. This gives a good improvement on the naïve algorithm and slight improvement on the algorithm above that does not have improved looping.
Table 3. Time (in seconds) to compute a two-electron Hamiltonian matrix element between two Zombie states with either 10 or 50 orbitals for N2 _2 2 in the 6 − 31G** basis. The naïve algorithm loops through all indices the second algorithm precomputes { ∣ ζ i j ( a ) ⟩ } \{|\zeta_{ij}^{(a)}\rangle\} { ∣ ζ ij ( a ) ⟩} and { ∣ ζ l k ( b ) ⟩ } \{|\zeta_{lk}^{(b)}\rangle\} { ∣ ζ l k ( b ) ⟩} and applies a rule that if any a 0 m ( a ) ∗ a 0 m ( b ) + a 1 m ( a ) ∗ a 1 m ( b ) a_{0m}^{(a)*}a_{0m}^{(b)} + a_{1m}^{(a)*}a_{1m}^{(b)} a 0 m ( a ) ∗ a 0 m ( b ) + a 1 m ( a ) ∗ a 1 m ( b ) terms are zero, then Ω a b = 0 \Omega_{ab}=0 Ω ab = 0 . This gives a good improvement on the naïve algorithm for 10 orbitals but the time improvement is not as good for 50 orbitals as the previous algorithms.
Number operator
Spin operators
Table 6. Time (in seconds) to compute S z S_z S z of random zombie state populated with Gaussian deviates using the unscaled and faster scaled S ^ z \hat{S}_z S ^ z algorithm. The new algorithm clearly demonstrates better scaling and is faster in absolute terms.
Table 7. Time (in seconds) to compute S z 2 S_z^2 S z 2 of random zombie state populated with Gaussian deviates using the unscaled and faster scaled S ^ z 2 \hat{S}_z^2 S ^ z 2 algorithm. The new algorithm clearly demonstrates better scaling and is faster in absolute terms.
Table 9. Time (in seconds) to compute total spin of random zombie state. The original algorithm uses none of the scaled algorithms whereas the new algorithm uses the scaled S z 2 S_z^2 S z 2 and the fastest algorithm to calculate ⟨ ζ ( a ) ∣ S ^ + S ^ − ∣ ζ ( b ) ⟩ \langle\zeta^{(a)}|\hat{S}_{+}\hat{S}_{-}|\zeta^{(b)}\rangle ⟨ ζ ( a ) ∣ S ^ + S ^ − ∣ ζ ( b ) ⟩ . The new algorithm is considerably faster than the original implementation and shows much better scaling.
Generating Li2 _2 2 one and two electron integrals
The one and two electron integrals were generated using PySCF[1 ] with the following python code
from pyscf import gto, scf
mol = gto.M(
unit = ’Bohr’,
atom = ’Li 0 0 0; Li 0 0 6’,
basis = ’6-31g**’,
verbose = 1,
symmetry = True,
symmetry_subgroup = 0,
)
myhf = scf.RHF(mol)