-
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
Supporting TFQ using IonqDevice #4769
Comments
cc @dabacon |
I believe that TensorFlow quantum has support for LineQubit's but this has not yet been released. tensorflow/quantum#641 You should be able to get access to it by installing the nightly version of TFQ I think that support for LineQubit in TFQ is probably better than translating from GirdQubit or NamedQubit, but if we want to add some sort of support for this in cirq-ionq, we could do that (it would just be kind of adhoc...) @MichaelBroughton any idea about timescale for the next TFQ release. |
Right, LineQubit support is now present everywhere in TFQ nightly builds. Would love it if anyone wants to poke around and see if things are working as intended. For the next TFQ release, we want to finish 1D MPS simulation which roughly entails:
All this in mind I'd say an official release could be a month or two away give or take. Regarding the more philosphical question of "should we design an all to all qubit type": I think the answer here is no, naming a type something like |
Awesome, thanks for the info! Will let you know if we get a chance to test before things are released, I would definitely love to give it a spin 🙂 Re: leaking device behavior into other layers, I totally agree with your rationale. I'm curious to know if you think that GridQubit and LineQubit suffer from the same problem? I would think that if we don't want device properties to bleed into Qubit representations, it would make sense for them to be addressing veneers on the same primitive 'bag of Qubits' type used for serialization. You could imagine a new device with 3d addressing of Qubits wanting to use that addressing scheme, but today that would require changes to TFQ serialization (I think?) Now whether it makes sense to actually plan a refactor like that, I don't rightly know 😅 mostly asking to confirm my own understanding of the libs. Thanks again for the quick and comprehensive responses y'all! |
Had a chance to take tfq nightly for a spin, hit that we needed to implement https://quantumai.google/reference/python/cirq/work/Sampler and am taking a stab at it ;) Edit, ha! and it's right there Cirq/cirq-ionq/cirq_ionq/service.py Line 115 in 1d57c81
|
And with that, it all seems to be working well! Thanks for the help folks :) |
Is your design idea/issue related to a use case or problem? Please describe.
Use case: using TF quantum with devices that have all to all connectivity but which address qubits linearly.
#3447 is related, but we (Ionq) have support for all-to-all, but we enforce LineQubit because logically, the qubits are identified by location on the ion trap.
Describe your design idea/issue
Issue: TesnorFlow quantum only supports GridQubits as documented here
https://www.tensorflow.org/quantum/api_docs/python/tfq/convert_to_tensor?hl=hi
Idea: support translating GridQubits into LineQubits for devices that have all to all connectivity.
Filing this to get feedback from the community, as I don't know much about the intent of these classes. Naively, I would assume that it would make sense to extend LineQubit (1d nearest neighbor), GridQubit (2d nearest neighbor) to AllToAllQubit (1d all 2q gates supported). Am happy to discuss other ways to solve the issue though :)
The text was updated successfully, but these errors were encountered: