Comments (3)
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.
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.
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)
- Type errors in quantum engine api code
- Typo in docstring for GPI2 gate HOT 5
- External link returns 404 HOT 4
- Drop python 3.10 HOT 2
- update protobuf API calls so it does not have to be pinned to protobuf-4 HOT 1
- docs/hardware/pasqal/getting_started.ipynb fails to execute in Google Colab HOT 1
- Issue when commuting moments HOT 1
- Update cirq_rigetti to conform to the new mypy standard HOT 2
- cphase comparison with CZ failing after dependency update HOT 1
- Quantum shannon decomposition fails for QFT with non-unitary matrix error HOT 1
- Avoid pickling of cached values of `cached_method` decorated functions
- CI Pytest Windows fails because cirq_rigetti does not install
- dev docs suggest using "git remote -va" but -a is not a valid flag
- mypy fails with error about duplicate module named "setup.py"
- pylint fails with errors about bad-option-value HOT 3
- Support reset operation in QASM importer HOT 4
- Update sources to pass typecheck with mypy==1.11.1 HOT 1
- Update sources for compatibility with NumPy 2
- Inconsistent behavior of Default Insert Strategy
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cirq.