-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Handle Qudits #933
Comments
Everything we do with operations should correspond to twiddling some kind of quantum control knob. A |
I'm going to start making some changes in my local Cirq fork to support qudit handling (well specifically, I want qutrit simulation, but I'll plan to write qutrits as the d=3 case of qudits). Do you think there will be a reasonable case to merge my (planned) local changes into Cirq? I can see a case for keeping everything in core Cirq in qubits (it could be irritating for beginners to need to be aware of qudits). But if you were definitely planning on building qudits into Cirq, I could do my best to do it exactly as you planned (e.g. rename Qubit to Qudit?). Let me know if you have any comments/suggestions. Thanks! -Pranav Gokhale (PhD student at UChicago with Fred Chong) |
The main blocker for supporting qudits is the fact that One possible way to fix this would be to replace all matrices with tensors. This would replace the size assumption with a dimension-of-shape assumption ( |
Suggested names for QubitId: QuId The thing that will happen here that is odd is that methods that return "qubits" now return "quids" which is not really discoverable. Also places where we pass in Qubits no take quids, which is also kind of odd. |
I vote |
What about QuditId? Or just Qudit? The easy thing here is to have QubitId just be a special case of QuditId with the dimension attribute set to 2. Things could then be generalized to qudits gradually. |
Of the given options, I'm for Qid as well. |
My vote goes to quid; it has a nice ring to it and one can make useful variations out of it easily: qubid, qutid, quqid, qupid, etc,. if ever needed. |
I'll go with @bryano. |
Note that this concept is slightly more general than qudits. An id could also refer to e.g. couplers and resonators that are control elements of the system instead of state elements. Things you want to give commands to. |
@Strilanc Do you have specific examples in mind of a "Qnob" that is not a qudit? In any case, it seems useful to have all three constructs: qubit, qudit, and q-whatever. Half-serious suggestion for the latter: "Qbar" (rhymes with "foobar") |
I just think of it as "generic target of operation", or "things I might want to bounce particular microwaves off of at particular times". I think |
+1 for |
- Did a replace-all "QubitId" -> "Qid" - Tweaked QubitId's docstring - Manually tweaked instances of "qubit id" in prose - Left GridQubit/NamedQubit/LineQubit alone Part of #933
- Did a replace-all "QubitId" -> "Qid" - Tweaked QubitId's docstring - Manually tweaked instances of "qubit id" in prose - Left GridQubit/NamedQubit/LineQubit alone Part of #933
Casey, Pranav, et.al. have open sourced their Cirq fork implementation for Qudits (but mostly qutrits): https://github.com/epiqc/qutrits |
…#1771) For #933. Part 2 after #1777. - `cirq.unitary` and `cirq.apply_unitary` check for the `qid_shape` protocol and use properly sized numpy arrays. - `Circuit` also checks for the `qid_shape` protocol for `Circuit.unitary` and related methods. - `Circuit` now implements the `qid_shape` protocol. Qudit features not in this PR are channels, mixtures, simulators, measurements, optimizers.
…ols (#2056) Part of #933. Support added: - IdentityGate and Measurement can be applied to qudits. - Protocols apply_channel, pauli_expansion, phase_by, and qasm either support qudits or don't crash when given qudit values. - `testing.assert_implements_consistent_protocols()` correctly tests qudit values.
Part of #933. Where the invert mask is True, switches the measurements of |0> and |1> without modifying |2> and above. Also fix `str(TrialResult)` for qudits.
Currently we use "QubitId" everywhere, but tying ourselves to two level systems seems bad. How are we going to work with higher dimensional quantum systems, or boson or fermion (or heaven forbit para-fermion) based systems?
The text was updated successfully, but these errors were encountered: