GithubHelp home page GithubHelp logo

Comments (3)

NoureldinYosri avatar NoureldinYosri commented on August 28, 2024

what is the desired behaviour here? I think cirq.CZ is treated as a native gate so operations decompose into it but it doesn't have its own decomposition

from cirq.

maffoo avatar maffoo commented on August 28, 2024

I don't know what the expected behavior is; I guess maybe the idea here is that if an op can't be decomposed this is supposed to raise? The docs for decompose_once are not very clear on this, and obviously the behavior of decompose is different. Maybe decompose_once is intended to be something like "decompose exactly once" versus "decompose at most once".

from cirq.

dstrain115 avatar dstrain115 commented on August 28, 2024

cirq cync: The root cause which spawned this issue could be a problem with multiprocessing, since there is global state keeping track of this table. This global state is only in the calling code, not in cirq itself.

Conclusion is that this is intended behavior, since decompose_once should return exception denoting that you are at the base case.

The sole action item here is to document the behavior of decompose_once when you specify a "base gate".
Nice to have would be to have a specialized exception type (or a more helpful message).

from cirq.

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.