Giter VIP home page Giter VIP logo

Comments (2)

JonathonMisiewicz avatar JonathonMisiewicz commented on July 19, 2024

@imagoulas Please provide a minimal example of this bug.

from qforte.

JonathonMisiewicz avatar JonathonMisiewicz commented on July 19, 2024

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.

from qforte.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.