You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This bug does not appear to be directly related to the use of frozen orbitals, but is directly related to the fact that frozen orbitals expand the systems to which QPE may be applied. Here's a fun example:
E_fci = -20
coef_vec = [E_fci, 0]
circ_vec = [
Circuit( ), build_circuit('Z_1')
]
H2_qubit_hamiltonian = QubitOperator()
for i in range(len(circ_vec)):
H2_qubit_hamiltonian.add(coef_vec[i], circ_vec[i])
ref = [1,0]
print('\nBegin QPE test')
print('----------------------')
# make test with algorithm class
mol = Molecule()
mol.hamiltonian = H2_qubit_hamiltonian
alg = QPE(mol, reference=ref, trotter_number=2)
alg.run(t = 0.4,
nruns = 100,
success_prob = 0.9,
num_precise_bits = 12)
Egs = alg.get_gs_energy()
assert Egs == approx(E_fci, abs=1.1e-3)
By all accounts, the eigenvalue to approximate is E_fci, but QPE returns -11.41617264484267. I can only conclude the QPE algorithm is severely bugged, and it slipped through tests.
Attempts to use frozen core with QPE apparently lead to anomalous energies. @imagoulas would have further details.
We should identify the problem and fix it so that frozen orbitals can be used with QPE.
The text was updated successfully, but these errors were encountered: