Git Product home page Git Product logo

Comments (4)

jvdwetering avatar jvdwetering commented on August 25, 2024

Were these circuits generated by Quipper? Could you give me some examples? I have never used Quipper myself, and only built the parser to work with the circuits I needed to, but if Quipper sometimes produces circuits without the "nocontrol" keyword, then I could just modify the parser

from pyzx.

mhodson-rigetti avatar mhodson-rigetti commented on August 25, 2024

quipper-gse-example.zip

I have attached an example of a Quipper output from the Ground State Estimation application. In addition to omitting the "nocontrol" keyword, Quipper circuits may omit declaration of the qubits up front, which causes a parse failure (as the loader is looking for a colon-separated string of qubits). Both issues can be resolved with a fairly simple patch. I'll aim to provide one.

Reference for the source Quipper GSE algorithm:

https://www.mathstat.dal.ca/~selinger/quipper/doc/Quipper-Algorithms-GSE-Main.html

from pyzx.

mhodson-rigetti avatar mhodson-rigetti commented on August 25, 2024

46-fix-parse-quipper-nocontrol.zip

@jvdwetering - Here is a patch for the minimal change set to support the absence of "nocontrol", and also to support other Quipper commands including QMeas, QDiscard. Includes a test that compares the internal qubits and gate list for a version of test_circuit.circuit modified for the additional commands (but otherwise logically the same).

Would it be possible for you to stage this on a branch, so we can depend on it, and consider it for release?

Thanks!

from pyzx.

jvdwetering avatar jvdwetering commented on August 25, 2024

Hi, I implemented your patch. Let me know if everything works as it should.

from pyzx.

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.