Qubit-efficient encoding scheme for quantum simulations of electronic structure

Simulating electronic structure on a quantum computer requires encoding of fermionic systems onto qubits. Common encoding methods transform a fermionic system of $N$ spin-orbitals into an $N$-qubit system, but many of the fermionic configurations do not respect the required conditions and symmetries of the system so the qubit Hilbert space in this case may have unphysical states and thus can not be fully utilized. We propose a generalized qubit-efficient encoding (QEE) scheme that requires the qubit number to be only logarithmic in the number of configurations that satisfy the required conditions and symmetries. For the case of considering only the particle-conserving and singlet configurations, we reduce the qubit count to an upper bound of $\mathcal O(m\log_2N)$, where $m$ is the number of particles. This QEE scheme is demonstrated on an H$_2$ molecule in the 6-31G basis set and a LiH molecule in the STO-3G basis set using fewer qubits than the common encoding methods. We calculate the ground-state energy surfaces using a variational quantum eigensolver algorithm with a hardware-efficient ansatz circuit. We choose to use a hardware-efficient ansatz since most of the Hilbert space in our scheme is spanned by desired configurations so a heuristic search for an eigenstate is sensible. The simulations are performed on IBM Quantum machines and the Qiskit simulator with a noise model implemented from a IBM Quantum machine. Using the methods of measurement error mitigation and error-free linear extrapolation, we demonstrate that most of the distributions of the extrapolated energies using our QEE scheme agree with the exact results obtained by Hamiltonian diagonalization in the given basis sets within chemical accuracy. Our proposed scheme and results show the feasibility of quantum simulations for larger molecular systems in the noisy intermediate-scale quantum (NISQ) era.

Simulating electronic structure on a quantum computer requires encoding of fermionic systems onto qubits. Common encoding methods transform a fermionic system of N spin-orbitals into an N -qubit system, but many of the fermionic configurations do not respect the required conditions and symmetries of the system so the qubit Hilbert space in this case may have unphysical states and thus can not be fully utilized. We propose a generalized qubit-efficient encoding (QEE) scheme that requires the qubit number to be only logarithmic in the number of configurations that satisfy the required conditions and symmetries. For the case of considering only the particle-conserving and singlet configurations, we reduce the qubit count to an upper bound of O(m log 2 N ), where m is the number of particles. This QEE scheme is demonstrated on an H 2 molecule in the 6-31G basis set and a LiH molecule in the STO-3G basis set using fewer qubits than the common encoding methods. We calculate the ground-state energy surfaces using a variational quantum eigensolver algorithm with a hardware-efficient ansatz circuit. We choose to use a hardware-efficient ansatz since most of the Hilbert space in our scheme is spanned by desired configurations so a heuristic search for an eigenstate is sensible. The simulations are performed on IBM Quantum machines and the Qiskit simulator with a noise model implemented from a IBM Quantum machine. Using the methods of measurement error mitigation and error-free linear extrapolation, we demonstrate that most of the distributions of the extrapolated energies using our QEE scheme agree with the exact results obtained by Hamiltonian diagonalization in the given basis sets within chemical accuracy.

I. INTRODUCTION
The simulation of physical systems is one of the most prominent applications of quantum computing, as Feynman suggested to simulate a quantum system using another [1]. Much progress [2][3][4][5] has been made since then, and several quantum algorithms for solving molecular energies have been proposed including quantum phase estimation (QPE) [5][6][7][8][9][10][11][12][13][14] and variational quantum algorithms (VQA) [3,10,[15][16][17][18][19][20][21][22][23]. The time cost of quantum simulation can scale polynomially with system size as compared to exponentially using classical computers [4,14]. With such polynomial time scaling of quantum algorithms and as quantum hardware is getting increasingly reliable and scalable, quantum simulation of physical systems has drawn great attention of researchers since classically intractable ab-initio calculations of pro-A significant challenge of quantum simulations is the quantum resources required to reliably perform quantum algorithms. Some previous works show that the number of qubits needed can be reduced [30,31] and how to execute quantum circuits on noisy intermediate-scale quantum (NISQ) devices [32]. A practical approach for NISQ devices is the variational quantum eigensolver (VQE) algorithm [3,10,15] which is a hybrid quantum-classical method to obtain the minimum eigenvalue of a given Hamiltonian operator. It requires a systematic encoding from fermionic systems to qubit systems and a preparation of trial states, or ansatzes, on the qubits. For NISQ devices, the depth of an ansatz circuit should not be too deep in case the quantum state operated by the circuit loses its coherence before the measurement process [4,16], and a minimal number of two-qubit operations should be used as the errors in performing them are generally larger than those of single-qubit operations.
The encoding schemes also play important roles in the success of the VQE algorithm. Commonly used encoding schemes such as the Jordan-Wigner (JW), parity, and Bravyi-Kitaev (BK) encoding methods often require N qubits for a system with N spinorbitals [4,[33][34][35]. However, the number N is often too large even for small molecules to be feasible on the present and near-term NISQ devices as the circuit depth and gate count of the ansatz circuit in the VQE algorithm usually also increases with N . Some compact encoding methods [30,31,36] adopting symmetries or block diagonal features of Hamiltonian have also been proposed to reduce the number of qubits from N to O(m log 2 N ), where m is the number of electrons. Our work with the same reduction in the qubit number, described in detail later, is based on the second quantization formalism, whereas the works of Bravyi et al. [31] and Babbush et al. [36] are based on the first quantization method, and their encoding methods have a requirement on the number of particles, such that m log 2 N < N , for qubit reduction. In Moll et al.'s work [30], they proposed a scheme by first transforming the fermionic Hamiltonian into a qubit Hamiltonian by a common encoding scheme (e.g. the JW or BK encoding scheme) and the reduced Hamiltonian is then obtained from a projected Hamiltonian using the block diagonal features of the fermionic Hamiltonian. However, their scheme needs to go through the whole qubit Hamiltonian using the reordering operators to reduce the number of qubits one by one, and the construction of the reordering operators is not generalized for systems with different dimensions and numbers of electrons. Therefore, these methods are not generalized as their implementations depend on the system size or particle number.
Several methods [37,38] provide generalized schemes for qubit reduction where the implementations allow trade-off between qubit counts and gate counts. One of the methods presented in Steudtner and Wehner's work [38] shows an exponential saving in qubit counts, but requires quantum devices with well-implemented multi-controlled gates. By considering the conservation of particles, Kirby et al. [37] presented an encoding method which reduces the length of BK encoded bitstrings with a given maximum allowed overlap of the codewords. The optimal encoding in the N > > m limit has a polylogarithmic complexity in both qubit and gate counts [37]. The method from [37] has significant asymptotic savings but has not yet been demonstrated for quantum simulations, while in our work, we will be focusing on VQE algorithms for NISQ devices.
Another method proposed by Di Matteo et al. [39] improves the Hamiltonian encoding with the Gray code. The work has a generalized encoding scheme but considers only the two-body problem of a deuteron, which can be reduced into an effective one-body problem involving only the relative motion of the neutron and proton of the deuteron. In other words, only the encoding of one-particle system is presented in [39].
In this paper, we propose a generalized qubitefficient encoding (QEE) scheme to deal with manyelectron (many-body) systems. Instead of targeting the original system Hamiltonian, our QEE scheme aims at eliminating undesired electronic configurations, not only the configurations that do not respect the symmetries but also insignificant configurations found using perturbation arguments or other classical preprocessing methods from the system. This is similar to active space selection but the slight difference is that specific electronic configurations are chosen. Thus, the qubit counts can be further optimized as compared to previous commonly used methods, and the encoding of qubit Hamiltonian is at the last step of our scheme, so there is no need to obtain the original N -qubit Hamiltonian as in [30]. With the desired electronic configurations obtained, we then map these configurations to qubit basis states so we only need the qubit number to be logarithmic in the number of the desired configurations. Finally, the qubit Hamiltonian can be constructed with the aid of operators that flip a qubit state or the operators that reflect the qubit state (entry-operators, as defined in Sec. II B 2) which can be further decomposed to Pauli operator strings. Note that the antisymmetric fermionic exchange factors are directly taken into account from the transition matrix elements of the excitation operators (including also the number operators) between the electronic configurations (see Sec. II B 2 for details).
The rest of the paper is organized as follows. Sec. II A briefly introduces the background of quantum computational chemistry. Sec. II B formulates the QEE scheme we proposed. In Secs. II C and II D, we demonstrated how to implement our method on quantum devices. Some examples for the QEE of molecules that do not use only a minimal basis set are shown in detail in Sec. II E. Sec. III and Sec. IV summarize and conclude our theoretical analysis and experimental results.

A. Quantum Chemistry and fermionic Hamiltonian
One of the most important problems in quantum computational chemistry is to find the eigenvalues and eigenfunctions of the time-independent Schrodinger equation where |Ψ is an eigenfunction of the Hamiltonian operator H with corresponding eigenvalues E. By applying the Born-Oppenheimer approximation, such a problem can be reduced to an electronic structure problem by treating the nuclei as fixed charges with electronic Hamiltonian being where Z I and R I denote the atomic number and position of the Ith nucleus, and r i denotes the position of the ith electron. Alternatively, the secondquantization formalism of the electronic Hamiltonian projecting onto basis wavefunctions {Ψ p (x i )} (with x i being the spatial and spin coordinate of the ith electron) is where h pq and h pqrs are the one-and two-electron integrals defined as (5) The creation and annihilation operators are defined as where |f N −1 , · · · , f p , · · · , f 0 is a vector of occupation numbers representing whether an electron is presenting (f p = 1) in the Slater determinant or not (f p = 0), the ⊕ sign denotes addition modulo 2, and the term (−1) p−1 i=0 fi addresses the exchange antisymmetric nature of fermions [4,40].

B. Encoding
To simulate fermionic systems on quantum processors, an encoding of fermionic states is needed. Following [31], an encoding is an isometry E : H elec → H q where H elec and H q denote fermionic and qubit Hilbert space. Note that in this work, a ket state with subscript f or q indicates that it is a fermionic or qubit state, respectively. A fermionic state |f f = |f N −1 , ..., f 0 f ∈ H elec corresponds to a qubit state E |f f ∈ H q , and a fermionic Hamiltonian H elec is mapped to its qubit counterpart H q ≡ E •H elec •E −1 .
For example, the mapping of the JW encoding method is defined as E JW |f f ≡ |f q . That is, the ith qubit represents the occupation number of the ith spin-orbital. The mapping of creation and annihilation operators under JW transform are where Q † p = 1 2 (X p − iY p ) and Q p = 1 2 (X p + iY p ) are qubit creation and annihilation operators, respectively. For the rest of the work, we often mention common encoding schemes including the JW, parity, and the BK fermionic-to-qubit mappings.

Qubit-Efficient Encoding
Common fermionic-to-qubit mappings often describe a qubit Hamiltonian with a spin-orbital basis where some segments of the Hilbert space are spanned by insignificant electronic configurations such as configurations with incorrect particle numbers. As Eq. (3) suggests that the second-quantized Hamiltonian is particle-conserving, configurations with incorrect particle numbers should not contribute to energy expectation values (Eq. (18)). Using a basis with relevant configurations to describe qubit Hamiltonians will reduce the number of qubits required for simulating fermionic many-body systems. We show how to systematically construct qubit Hamiltonians from the configurations that respect total particle numbers. We also show that the total spin of the configurations can be restricted to further reduce the number of qubits required.
For a system with N spin-orbitals and m electrons, there are only N m particle-conserving electronic configurations. Instead of using N qubits, we expect that Q = log 2 N m qubits is enough for simulation. First, we define a fermionic configuration |f f = |f N −1 , ..., f 0 f and the set of all particleconserving fermionic configurations F m = {|f f ∈ H elec : |f | = m} where |f | = |{k : f k = 1}| de-notes the Hamming weight, i.e., the total number of 1 (non-zero element), of f . Configurations in F m are mapped to Q Q = {|0 q , |1 q } ⊗Q , the computational basis states of a Q-qubit system, by E. On the other hand, similar to the concepts of freezing or removing insignificant orbitals, we can remove or add any electronic configurations into the F m set so that the Q-qubit Hilbert space is optimally exploited. For example, even though we have chosen all the particle-conserving configurations to be in F m , some of the configurations might not be contributing to electronic correlation by using perturbation theory arguments. Thus, these configurations can be removed from the set and we can still map the rest of the configurations ascendingly to a Q-qubit Hilbert space or even smaller Hilbert space.
The choice of E can be various as long as it is an isometry. Previous works have used Gray-code encoding for m = 1 system [39] or sparse encoding to construct sparse qubit Hamiltonian [31]. As Similarly, states in Q Q can be also sorted in an ascending order as Q Q = {|q 0 q , |q 1 q , ...}. In this work, we define QEE as E QEE |f i f = |q i q . Even though the mapping of fermioinic configurations to qubit basis states could be in an arbitrary order, we align F m with Q Q in an ascending manner (from Hartree-Fock configuration to the fully-excited configuration). In this way, the asymmetric state preparation and measurement (SPAM) error of the |0 and |1 qubit states can be taken into account. Since the |1 state is often more error-prone than the |0 state in real quantum devices (see, e.g. , the last two columns of Table VI in Appendix C), we choose an ascending encoding such that more significant configurations are represented by qubit states with more bits in the |0 state to increase the fidelity of our computation. Note that this encoding does not require single-qubit gates for initialization as in other encoding methods because the |0 ⊗Q state is the Hartree-Fock state that can be our reference state for post-Hartree-Fock methods.

Hamiltonian Encoding
In most common fermionic-to-qubit mapping schemes, both creation and annihilation operators have their corresponding qubit operators. However, a single creation or annihilation operator changes the number of electrons in the system, which results in irrelevant electronic states and cannot be encoded using QEE. We first rewrite the second-quantized Hamiltonian as where we define excitation operators E pq ≡ a † p a q (which also include number operators when p = q) and use the fermionic anti-commutation relation {a † p , a q } = δ pq . As E pq is a particle-numberconserving operator, the electronic Hamiltonian expressed in terms of excitation operators can be mapped to qubit operators with QEE.
Any excitation operator E pq can be written Note that we decompose E pq into a linear combination of transitions from k to k , but for each k, only one k gives non-zero c pq k k . As any excitation operator E pq can be decom- where |q k q = E |f k f is the encoded qubit state of |f k f . In our encoding scheme, all configurations in F m are mapped to some Q-qubit computational basis states. Hence for two computational basis states |q q = |q Q−1 , ..., q 0 q and |q q = q Q−1 , ..., q 0 q , the transition |q q q| q can be factorized as We further define the qubit creation operator Q + , qubit annihilation operator Q − , qubit number operators N (0) and N (1) as In this work, these four operators are called entryoperators as each of them has exactly one non-zero entry in its matrix representation. A qubit state transition can thus be written as a tensor product of some entry-operators. Then any (encoded) excitation operatorẼ pq can be expressed as a sum of the products of entry-operators, where T k k,w are some entry-operators corresponding to |q k q q k | q . As each entry-operator is a sum of two Pauli operators, Eq. (16) can be then expressed in terms of Pauli operator strings, which allows us to write down the qubit Hamiltonian as sum of Pauli operator strings. Finally, the expectation value of H q can be evaluated and minimized on a quantum processor with variational quantum algorithms.

C. Variational Quantum Eigensolver and Ansatz Circuit
After obtaining the qubit Hamiltonian, we then apply the VQE algorithm to solve the electronic structure problem on a quantum processor. Given a qubit Hamiltonian H with unknown minimum eigenvalue E min and its corresponding eigenstate |Ψ min , the variational method in Eq. (18) helps find the ground-state energy by tuning θ (note that θ represents a vector that contains one or more parameters) in the parametrized trial wavefunction |Ψ(θ) .
In other words, the ground-state energy and wavefunction can be found by finding the parameters that minimize the energy expectation value Ψ(θ)| H |Ψ(θ) . Such a VQE algorithm is separated into hybrid executions for quantum and classical computers, where the trial wavefunctions preparation and measurement are done on a quantum processor, and the parameters are updated classically using optimization algorithms. The parametrized wavefunction can be represented as where |Ψ ref is a reference state that has great overlap with the minimum eigenstate |Ψ min and U (θ) is the trial state circuit (or ansatz circuit). Qubit reg-isters are often initialized into the |0 ⊗Q state and we often need to apply unparametrized operations on the |0 ⊗Q state to obtain a reference state |Ψ ref that properly describes the chemical systems. For example, the reference state could be a Hartree-Fock state or a multi-reference state [18][19][20][21][22][23]. Since the |0 ⊗Q state is the Hartree-Fock state in our method so we do not need to apply any unparametrized operations. For the measurement process of the VQE algorithm, since a qubit Hamiltonian is a linear combination of Pauli strings, the linearity of expectation can thus be used to calculate the energy expectation value for each trial state with a given set of parameters θ.
The design of circuit ansatz determines the feasibility and accuracy of the VQE algorithm. To capture or approximate the complexity of the exact wavefunction, researchers came up with chemicallyinspired quantum circuit design with inspiration from classical computational chemistry. The most common one is the unitary coupled cluster (UCC) ansatz stemming from classical coupled cluster theory [41,42].
However, chemically-inspired approaches often need Trotter approximation, and the depth of the circuits is often too large to be practical on NISQ devices. Another common type of circuit ansatz design is the hardware-efficient approach where it aims at heuristically describing a wavefunction with thorough consideration of hardware constraints for NISQ devices [15][16][17]. Hardwareefficient circuits are often built up by single-qubit rotation operators and few numbers of nearest neighbor CNOT gates. This type of circuit ansatz can also capture the complexity of the exact wavefunction because of its high expressibility and entangling capability where the parameterized circuits span most of the Hilbert space including the chemical subspace required to find minimum eigenenergies [43]. The concern of using hardware-efficient ansatz for qubit Hamiltonian obtained from common mapping schemes is that the parameters often get stuck on barren plateaus or local minimum where gradients vanish in this region during optimization. This is because these heuristic ansatz circuits are often used to solve problems by trial and error method with repeated, varied attempts. In the case of using VQE to solve electronic structure problem, the span of the hardware-efficient parameterized circuits often includes not only appropriate symmetry subspace but also insignificant sectors of the Hilbert space. Thus, the final state obtained from hardware-efficient ansatz using common mapping schemes might include configurations that do not respect the conservation of particle numbers or other symmetries.
Using QEE, most of the Hilbert space is spanned by significant configurations with appropriate symmetry. If the number of fermionic configurations that respect the required symmetry is |F m | = 2 Q , i.e., we can use exactly Q qubits to encode all the configurations so no insignificant configurations will be in Qqubit Hilbert space H q (see, e.g. , Table I). Whereas if 2 Q−1 < |F m | < 2 Q , since we still need a Q-qubit Hilbert space to accommodate all the fermionic configurations, there will be some qubit basis states not representing any of the desired fermionic configurations (see, e.g. , Table III). Nevertheless, the number of insignificant configurations presenting in such a Q-qubit H q is still much fewer than that of in a N -qubit Hilbert space using common mapping or encoding schemes for the case of 2 Q−1 < |F m | < 2 Q . Thus, we can use hardware-efficient ansatz circuits since the final states are more likely to respect the required symmetry. Also, it is stated in [44] that the gradients of parameterized circuits vanish exponentially as qubit counts increase. Therefore, our encoding method would suffer less from the barren plateau problem comparing to common encoding schemes that require exponentially more qubits than our QEE method. More importantly, our encoding method reduces the coherence time required for operating the quantum circuit in the VQE algorithm as compared to common mapping schemes that require a larger number of qubits and consequently a higher ansatz circuit depth to reach the same level of entanglement.
For the illustrative example in Sec. II E 3 and Sec. II E 4, we use a 4-qubit hardware-efficient ansatz circuit that consists of alternating layers of R y rotations and CNOT entanglements shown in Fig. 1. This is because the circuit depth for UCC scales at least quadratically with respect to the number of qubits [45] compared to linear scaling for our hardware-efficient ansatz, so it might not be practical to use UCC ansatz circuits in this case. The number of repetitions of the alternating layers is two with an additional final rotation layer, and the entanglement pattern uses only the nearest neighbor CNOT gates. Since only R y and CNOT gates are employed in the circuit, the prepared quantum states will only have real amplitudes. This circuit is also called the real-amplitudes 2-local circuit [46].

D. Error Mitigation
Errors in near term quantum processors accumulate quickly during computations which could ruin the results or, specifically, energy expectation val- ues for the VQE algorithm. Quantum error correction methods could help fix this problem, but these methods often require a large number of qubits that would be impractical on near-term NISQ devices. Even though compared to common mapping schemes, our encoding method has reduced the number of qubits and lowered the circuit depth, the error in noisy hardware is still considerable, preventing us from reaching the desired accuracy of the observables. Therefore, we adopt error mitigating methods in our illustrative examples to demonstrate the feasibility of our method.
The first error mitigating method we use is measurement error mitigation. It calibrates readout counts by applying the inverse of the matrices generated from measurement calibration circuits from each basis state [47,48]. The other method we adopt is an extrapolation method. This is done by amplifying the major error rate of the ansatz circuit and approximate the error-free limit of the energy expectation value by linear extrapolation [17,[47][48][49]. For example, the noise of the ansatz circuit in Fig. 1 is dominated by two-qubit CNOT gate errors so we can perform the VQE algorithm using similar constructs of the ansatz circuit but with some redundant CNOT pairs as shown in Fig. 2 and Fig. 3. We can thus assume that the observable depends on a noise variable = c 0 , where c is the number of CNOT gates, and 0 is the error of a single CNOT gate (assuming the same CNOT gate error for every qubit). After extrapolating the results from each circuit, we could get the observable by linear extrapolation method at error-free (no CNOT gate error) condition. This is done by assuming that the CNOT gate error is still small enough so that we could do a first-order Taylor expansion of the noisy observable O( ) with respect to at ≈ 0, so that we would see a linear response of the observable error to the CNOT gate error and can find the error-free observable O(0).

H 2 , STO-3G, Total-spin-restricted
We show here a step-by-step instruction of how QEE maps the excitation operators E pq to qubit operators in Pauli operator strings. We use an H 2 molecule in the STO-3G basis set as an example. In this case, the system includes only two 1s atomic orbitals so there are 4 converged spinorbitals (σ 1s,u↓ , σ 1s,g↓ , σ 1s,u↑ , σ 1s,g↑ ) from a Hartree-Fock self-consistent field calculation. We can write an electronic configuration in the fermionic occupation basis of this system as Furthermore, we restrict the total spin such that only the singlet electronic configurations are present in the system. We can then map these fermionic configurations in an ascending order into the qubit state basis as shown in Table I.
With the mapping from the fermionic configurations to the qubit states and Eq. (16), we can transform the excitation operators in the fermionic basis to the qubit state basis where the entry-operators can help us build the Pauli operators as shown in Table II.

H 2 , STO-3G, total-spin-unrestricted
In this subsection, we do not restrict the total spin to singlet configurations, so there will be triplet electronic configurations present in the system. Similarly, for an H 2 molecule in the STO-3G basis set, we can write an electronic configuration in the fermionic TABLE II. Mapping of excitation operators to Pauli operators for a total-spin-restricted H 2 molecule in the STO-3G basis set. Note that I k in the Entry-operator column denotes an identity operator on the k-th qubit.

Excitation fermionic basis Qubit state basis Entry-operator
Pauli Note that the ordering of occupation numbers in Eq. (24) is slightly different from the total-spinrestricted case of Eq. (22) in Sec. II E 1. However, there are 6 fermionic configurations in this case so 3 qubits are required to represent all these configurations as shown in Table III (also in an ascending order). Filled spin-orbitals f 3 f 2 f 1 f 0 q 2 q 1 q 0 σ 1s,g↓ σ 1s,g↑ 0011 000 σ 1s,u↑ σ 1s,g↑ 0101 001 σ 1s,u↑ σ 1s,g↓ 0110 010 σ 1s,u↓ σ 1s,g↑ 1001 011 σ 1s,u↓ σ 1s,g↓ 1010 100 σ 1s,u↓ σ 1s,u↑ 1100 101 Thus, using similar mapping procedure shown in the previous example, we can write the qubit Hamiltonian at the interatomic distance of hydrogen bond length 0.735Å as 3. H 2 , 6-31G, Total-spin-restricted By adopting symmetries in conservation of electrons and spins (Z 2 symmetries, two qubits reduction), it is possible for the parity or BK mappings to reduce 2 qubits for the encoding of a system with an arbitrary number of spin-orbitals [31]. For the case of an H 2 molecule in the STO-3G basis set, our QEE method as well as the parity and BK mappings only require 2 qubits, i.e., a reduction of 2 qubits from a 4-qubit setting. Therefore, it is more pedagogical to do experiments on a larger system where the QEE reduces more than 2 qubits. We show here the reduction of 4 qubits in the case of H 2 in the 6-31G basis set, where there are 8 spin-orbitals and 2 electrons in the system. The VQE data is shown in Sec. III.

LiH, STO-3G, Total-spin-restricted
We also apply our encoding method to a LiH molecule in the STO-3G basis set with the core frozen and the 2p y orbital removed (assuming zero filling) for the Li atom. In this case, there are also 8 spin-orbitals and 2 electrons in the system so it requires 8 qubits for the JW encoding. We choose to only consider the singlet configurations so this system is similar to the case in Sec. II E 3. Thus, this system requires 4 qubits for our encoding scheme since there are 16 fermionic configurations. We show the potential energy surfaces of this system in Sec. III as well.
Note that we present the reduction using particleconserving and total-spin symmetries, but our method has the flexibility of removing any configurations by perturbation arguments or imposing other symmetries or constraints to systematically reduce the dimension of a Hilbert space.

III. RESULTS AND DISCUSSION
Simulations for an H 2 molecule in the 6-31G basis set and a LiH molecule in the STO-3G basis set with restricted total spin at some given interatomic distances of the two atoms of each molecule are performed with the quantum subroutine of the VQE algorithms using Qiskit. The classical optimization of the variational parameters was done using the Constrained Optimization by Linear Approximation (COBYLA) algorithm with a maximum iteration number of 500. The QEE Hamiltonian of the system at different interatomic distances are generated using the implementation method (code) at [50]. The exact energies and ground-state configurations of the JW encoded qubit Hamiltonian are used to verify the correctness of these QEE qubit Hamiltonian using the statevector simulator in Qiskit.
The ansatz circuits used in the VQE algorithms are the real-amplitudes 2-local circuits [46] with two layers of linear entanglement (Fig. 1) and its variants with redundant CNOT pairs ( Fig. 2 and Fig. 3) so the CNOT gate counts of the circuits were 6, 12, and 18, respectively. To mimic the effect of realistic noisy quantum machine, the simulations are performed on the QASM simulator with a noise model implemented from the calibration data of IBM Quantum device ibmq santiago shown in Appendix C. The first 4 qubits of the device ibmq santiago in the noise model are used because they form a linear chain of qubits so that no extra CNOT gates were needed to implement our ansatz circuits. The experiments are run with 10 4 or 10 5 readout shots per circuit with the measurement error being mitigated by the inverse of a calibrated matrix. For each CNOT gate count, 10 independent VQE experiments are done to find the error-free limit of the energy expectation values using the linear extrapolating error mitigating method.
The potential energy surfaces of the H 2 system are plotted in Fig. 4(a) from discrete data points at the interatomic distances of 0.3 to 2.8 angstrom with more data points plotted from 0.7 to 0.8 angstrom close to the equilibrium distance, and the potential energy surfaces of the LiH system are plotted in Fig. 4(c) from 0.5 to 4.0 angstrom with more data points plotted from 1.5 to 1.6. The number of measurement shots for both cases is 10 4 The Hartree-Fock energies are obtained using the "PySCF" Python-based chemical simulation package and the exact energies (ground-state energies) are obtained from diagonalization of the JW encoded qubit Hamiltonian. Since there are errors arisen from finite numbers of measurements (shots), SPAM errors of the qubits, and single-qubit gate errors in VQE experiments even at the error-free limits of the  (c), The red curves were obtained using the Hartree-Fock method and the black curves represent the exact energy surfaces obtained by diagonalization of the JW qubit Hamiltonian with classical algorithms. The blue curves were the extrapolated energies over three different CNOT gate counts with the energies of each CNOT gate count being averaged over 10 sets of VQE experiments and with 10 4 shots for each iteration using QEE qubit Hamiltonian. The simulations were performed on the QASM simulator with a noise model implemented from the calibration data of IBM Quantum device ibmq santiago shown in Appendix C using qubit the 0, 1, 2, and 3. For (b) and (d), the curves and data points represent the energy errors with respect to the exact energy surfaces of each molecule. The error bars represent the 95% confidence uncertainties that took the standard deviations of experiments at each CNOT gate count and the residues of linear regression into account. Most of the distributions agree within the chemical accuracy defined as 1 kcal/mol. CNOT gates, 10 independent VQE experiments are done for each of the CNOT gate counts. The errors of the extrapolated energies with respect to the exact energies are plotted in Fig. 4(b) and in Fig. 4(d) with the error bars showing the uncertainties in 95% confidence intervals. These uncertainties are propagated from the residues of the linear regressions and the standard deviations of the distributions at each of the CNOT gate counts. Even though the energy errors of the VQE experiments are slightly higher than the chemical accuracy (1 kcal/mol), most of the uncertainties reach the chemical accuracy. Thus, another experiment on increasing the measurement shots per circuit is done to further test the feasibility of this method in the NISQ era. We will discuss this result later.
In Kandala et al.'s work [17], they used a similar extrapolation method to estimate the ground-state energies of an H 2 molecule and a LiH molecule in the STO-3G basis set using the BK encoding. Instead of stacking up redundant CNOT gates, they extended the pulse times of the CNOT gates to amplify the major errors. In general, our ground-state potential energy surfaces obtained from VQE have less error than their results at different interatomic distances. Since, for the H 2 cases, we used a larger Energies. The simulations were performed on the QASM simulator with a noise model implemented from the calibration data of IBM Quantum device ibmq santiago shown in Appendix C using qubits 0, 1, 2, and 3. Each of the data points in solid circles was averaged over 10 sets of experiments using 10 4 or 10 5 shots per circuit with the rotation angles pre-evaluated on a noiseless simulator. Each of the error bars of the solid circles is twice of the standard deviation over the energy distribution for the 10 experiments. The red and blue lines are the linear fits of the energies in solid circles. The hollow circles are the extrapolated energies with the error bars being the 95% confidence uncertainties estimated from the standard deviations and linear regression residues. The distributions of the extrapolated energies using 10 5 shots agree within the chemical accuracy and there is significantly less variance in this case. Note that the blue circles in (b) are slightly lower than the red circles. basis set (6-31G) and more qubits than those of their work, it would be more reasonable to compare the LiH cases. The authors in [17] also froze the core orbital of LiH but they remove both the 2p y and 2p z orbitals. Thus, there are 2 extra spin-orbitals in our system, but we use the same number of qubits (4 qubits) as theirs. With these 2 extra spin-orbitals, we can capture slightly more correlation using the same number of qubits. It can be observed from Fig. 4(d) and the bottom right of Fig. 4. in [17] that some of their extrapolated energies were found to be quite far away from chemical accuracy comparing to our result. Such improvement was not directly due to the inclusion of the 2p z orbital in our system, because the 2p z orbital does not interact strongly with other orbitals, and the energy errors are the comparison criteria for the VQE performance here. Instead, the entire Hilbert space is spanned by the configurations with desired symmetries in our case, so the final state would not include undesired or unphysical configurations after an optimization search using a heuristic hardware-efficient ansatz circuit. This shows that we can use the same number of qubits to reach a better accuracy for the same chemical system.
To demonstrate that chemical accuracy could be achievable for QEE on the present and near-term de-vices, more measurement shots per circuit are performed on the same noise model to investigate how noise in a finite number of measurements affects the variational computations and the results are plotted in Fig. 5. The tunable parameters (the rotation angles) of the ansatz circuits are first optimized and obtained using Qiskit's statevector simulator (noiseless simulator) so the parameters (rotation angles) of the ansatz circuits are fixed in this experiment to prevent the uncertainties in the variational process. The measurement error mitigation and extrapolation to the error-free limit are also done in this experiment. Note that the error distribution of the experiment using 10 4 shots per iteration in Fig. 5(a) is far from chemical accuracy because the parameters are pre-optimized on a noiseless simulator and fixed during the experiments, so the robustness from VQE against some noise, such as noise in single-qubit gates, would not be present as compared to the experiments in Fig. 4 [3,10]. Figure 5(a) shows that the error of the extrapolated energy with respect to the exact ground-state energy obtained by Hamiltonian diagonalization at the interatomic distance of 0.745Å (the equilibrium distance in the 6-31G basis set) decreases as the number of shots per circuit increases and the uncertainties decreases significantly as well. The distribution of the extrapolated energy using 10 5 shots at the error-free limit agrees with the exact ground-state energy within chemical accuracy. A similar result is shown for a LiH molecule in Fig. 5(b) where both the error and the uncertainty of the extrapolated energy decrease using more shots per circuit. In particular, the overestimated extrapolated values of the ground-state energy lower than the exact energy obtained by diagonization indicated by the error bar (red solid line) at the error-free point in the case of 10 4 shots is significantly improved (see the error bar in blue solid line at the error-free point) by using 10 5 shots. Similar trends could be seen in Fig. 6 where the experiments were done on IBM quantum devices. These results indicate that substantial numbers of measurements are still needed for the simulations on noisy quantum devices. Therefore, given that the measurement error mitigation and extrapolation to the error-free limit for two-qubit CNOT gates are performed, the main concern for our method for the H 2 molecule in the 6-31G basis set and the LiH molecule in STO-3G basis set is the probabilistic behavior of a finite number of measurements in the noisy simulations instead of decoherence or SPAM error of the quantum processors. In short, all of our results demonstrate that quantum chemical simulations using QEE qubit Hamiltonians are suitable in the NISQ era. Some additional admissible use cases for our QEE scheme are provided in Table V.

IV. CONCLUSION
In conclusion, in order to realize molecular quantum simulations of large systems, quantum hardware should be improved and the quantum algorithms should also be optimized to respect hardware constraints. We have designed an alternative encoding scheme to reduce qubit resources by filling up (most of) the Hilbert space with desired configurations. For an H 2 molecule in the 6-31G basis set and a LiH molecule in the STO-3G basis set, we have reduced the required number of qubits from 8 to 4 with our encoding scheme and have simulated the molecules by incorporating a noise model from a real IBM Quantum machine with the distribution of the extrapolated energies agreeing with the exact energies obtained by Hamiltonian diagonalization to chemical accuracy.
For electron number m ≤ N 2 , the number of qubits Q needed in our QEE scheme has an upper bound of O(m log 2 N ), and for m > N 2 , the upper bound of the number of qubits Q is of O((N − m) log 2 N ) (see Appendix B for the derivation), which is a noticeable advantage compared to Q = N in most present encoding schemes. For a given molecular system, the number of spin-orbitals N for quantum chemical simulation increases rapidly as the basis set becomes larger. For example, a water molecule with the ccpV5Z basis set has 201 molecular orbitals, or = 65 qubits in the totalspin-unrestricted case, which is a prominent reduction and would be a good starting point to realize the advantage of quantum processors over classical computers in solving quantum chemistry problems. Currently, one of the largest quantum processors available on IBM Quantum is the 65-qubit machine ibmq manhattan. However, its quantum volume [51,52] is just 32, so a lot of effort still needs to be made to increase the reliable circuit depth, i.e., the number of gates that can be successively and reliably performed in a quantum circuit on the quantum machine. In most previous VQE works, the basis sets used are minimal and insufficient to achieve results with the desired accuracy compared with experimental data. With QEE, one may perform chemical simulations with larger basis sets but only require a lower amount of qubit resources, which permits a greater accuracy for quantum chemistry calculation in the NISQ era.
Compared to previous compact encoding studies [30,31,37,39], our work has a generalized scheme and is practical for NISQ devices, where such qubit reduction can be applied to fermionic systems of any size, and the encoding of two-electron terms is also included. However, the number of Hamiltonian terms that has to be preprocessed by classical computing seems to be a bottleneck in both our work and some compact encoding studies [30,31,38,39]. By considering all the possible excitations, the total number of Pauli operator terms before combining like terms of our QEE scheme that should be processed has an upper bound of O( N 2m+1 (m−1)! m! ) as shown in Appendix E due to the decompositions of all entry-operators. In most cases, the numbers of Hamiltonian terms will be more than those of the JW encoding scheme, which scale as O(N 4 ). Nevertheless, Table V provides several use cases for the QEE scheme, where there are significant reductions of qubit counts and modest numbers of Hamiltonian terms (sometimes even fewer terms than the systems using the JW encoding scheme).
On the other hand, the advantage of significant reduction of the qubit number by our QEE scheme for large molecules, which substantially alleviates the vanishing gradient and long ansatz circuit problems, will be useful in the NISQ era if there is a better classical preprocessing method. Besides, in our proposed QEE scheme, one has the degree of freedom to map certain fermionic states to qubit states in an arbitrary order or basis. This corresponds to choosing suitable basis orders since the decomposition of all entry-operators within a qubit-number-reduced Hamiltonian is equivalent to the tensor product decomposition of that Hamiltonian using Pauli operators. In this work, we order fermionic states in an ascending manner to respect hardware SPAM errors. Some suitably chosen mappings between fermionic states and qubit states may enable us to systematically decompose the encoded excitation operators without expanding all entry-operators. In other words, qubit Hamiltonian with different mappings corresponds to different similar matrices so there may exist specific arrangements of the basis to construct qubit Hamiltonian efficiently. Hence further analysis should be done on other ordering methods to possibly reduce classical preprocessing time or the number of terms in the qubit Hamiltonian.  Table VI and Table VII show the calibration data of a IBM quantum machine ibmq santiago. These calibration data were used to construct the noise model used in this work.   [1,0] 0.573% 561.78 [1,2] 0.686% 604.44 [2,1] 0.686% 568.89 [2,3] 0.670% 376.89 [3,2] 0.670% 412.44 [3,4] 0.636% 376.89 [4,3] 0.636% 341.33