Code Monkey home page Code Monkey logo

Comments (3)

jotterbach avatar jotterbach commented on June 3, 2024

@willzeng
I looked through the code and I think the problem has an upside and a downside.

  • On the upside: VQE only has functions of the form f: list -> PyQuil.function which is exactly what we want. Hence there is no direct dependency on pyquil.ParametricFunction

  • On the other hand pyqaoa.qaoa has a dependency on various parts od pyquil.Paulis, which hence indirectly introduces a dependency to ParametricFunctions through Paulis.exponential_map that returns a decorated program.

As far as I can tell from a first pass Paulis.exponential_map is the only point where we induce ParametricFunction into grove. There is no direct import of ParametricFunction in the grove library (except some ipynb) and the name of parametric_state_evolve is misleading. In this light it might be worthwhile to try and refactor Paulis to purge the dependency. What's our thought?

cc @ncrubin as he wrote most of qaoa.py according to the git annotate.

from grove.

willzeng avatar willzeng commented on June 3, 2024

Yep that's correct @jotterbach. As part of this issue exponential_map should be changed to return a python function rather than a parametric program. I also agree that changed should be made to make function behavior clear if their output type has changed

from grove.

willzeng avatar willzeng commented on June 3, 2024

this was fixed by #32

from grove.

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.