Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frozen QPE #151

Open
JonathonMisiewicz opened this issue Sep 21, 2021 · 2 comments
Open

Frozen QPE #151

JonathonMisiewicz opened this issue Sep 21, 2021 · 2 comments
Assignees
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@JonathonMisiewicz
Copy link
Contributor

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.

@JonathonMisiewicz JonathonMisiewicz added the bug Something isn't working label Sep 21, 2021
@JonathonMisiewicz JonathonMisiewicz self-assigned this Sep 28, 2021
@JonathonMisiewicz
Copy link
Contributor Author

@imagoulas Please provide a minimal example of this bug.

@JonathonMisiewicz
Copy link
Contributor Author

JonathonMisiewicz commented Sep 28, 2021

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.

@JonathonMisiewicz JonathonMisiewicz mentioned this issue Oct 5, 2021
3 tasks
@JonathonMisiewicz JonathonMisiewicz added the wontfix This will not be worked on label Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant