Document in cirq.apply_unitary's docstring that it can operate on qudit subspaces
See original GitHub issueIf you have a state tensor defined over qutrits, and you call cirq.apply_unitary
targeting this state tensor but give it a qubit gate, apply_unitary will operate on the 01 subspace. This isn’t currently documented but it should be mentioned in the docstring.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Generalization of quantum gates to qudits #3190 - GitHub
Now that cirq supports qudits, we should generalize our quantum gates where possible/appropriate. Some examples of gates that should work on ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@aditya-giri That’s right.
@Strilanc @vtomole instead of this would it make sense to add an optional argument to ApplyUnitaryArgs to specify the subspaces to operate on?
Edit: looks like arbitrary subspaces would be impossible to do performantly, but slices should work, and any 2-dimensional subspace can be specified as a slice. Maybe that’s too unintuitive for the value added though.
cc @cduck @dabacon