-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Cirq-web now supports operations with no location information #7541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…en't just line or grid qubits
|
Making a note here that it will likely be necessary to decouple client code generation to a dedicated class like a factory at some point. This class would generate client code based off of the type of circuit, and to test it, we could feed in different circuits and test client code generation there. This would be especially helpful when testing things like moment filtering, tooltips, etc — it seems inevitable that there will be a lot more interaction between different types of Python circuits and what's displayed in browsers/notebooks. A good example of this is here, as of now, the browser makes the decision to show or hide the This would also help with #4257. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7541 +/- ##
==========================================
- Coverage 97.54% 97.54% -0.01%
==========================================
Files 1099 1099
Lines 99191 99191
==========================================
- Hits 96755 96751 -4
- Misses 2436 2440 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
We should merge #7687 in first before merging this one |
Fixes #5172, which showed that there may be instances where users want to view a circuit containing more than Grid and Line Qubits. Currently, cirq-web crashes if an operation is not in that set.
This PR introduces a patch where operations with no location information, storing them as
foreign_symbolsin theGridCircuitclass. This resolves the base-case circuit given in the issue.Foreign symbols, which as of now consist only of those with no location information, are stored to the side of the circuit in the same moment that they occur. Foreign symbols are also listed at the bottom of each visualization. See example:
Displayed circuit was taken from this stim example:
This PR also introduced Issue #7540.