How to go from continuous variable qumodes to Qubit gates

I’d like to know how one could go from qumodes to qubits and how the gates would look for the process. At this point, this is not for a specific use case but I’d rather be informed in general about the possibilities. I am referring to this paper for the CV gates. And for the workflow:

CV gates -> black box (as of now for me) -> Qubit gates

How would the gates look going from CV to Qubit? Does a transpiler exist?

And a more general question: how many qubit gates would I need per photonic gate?

Hi @Shawn, just to clarify your question; are you looking to ‘discretize’ the photonic circuit layers in the CVQNN, in order to execute it on a qubit-based system?

Hi @josh thanks for the reply. Yes, essentially. But going broader than that, I am more so curious, if there is a possibility to go from CV to Qubit and how the gates for such a transformation would look.

Dear @Shawn,

Moving between DV and CV quantum computing is not a trivial task. Converting states from infinite to finite dimensions will have its caveats. I am not aware if the transpiler you are asking for exists.

Instead, what can be done is Hybrid and interacting CV/qubit systems. This is an open area of research; see the following paper for some of the tricks on how hybrid CV-DV Quantum Computing may be done:

https://www.nature.com/articles/nphys3410?proof=true

This is similar to what we do in PennyLane and Strawberry Fields, for an example see here:

You can easily interact CV QNodes with qubit QNodes in PennyLane. The key subtlety to appreciate here is that each QNode ends with extracting classical information from the device, such as measuring the expectation value of an observable. In that setting, you can make a CV QNode in PennyLane that measures, e.g., the expectation value of X . This classical information can then be fed to a separate qubit QNode and used to vary the gates in it.

Hi @AroosaIjaz thanks for the insight! I know of the paper https://arxiv.org/abs/quant-ph/0008040 going from DV to CV. I did see that example in PL but that is also going from DV to CV and not the other way around.

So is CV to DV just not possible?

Hi @Shawn,

In theory, you can simulate a qubit system in a CV system, and conversely, you can simulate a CV system in a qubit system (up to some cut off). Moreover, there is not a unique way to do this. For example, the dual-rail encoding creates a qubit state in a potentially CV system by associating |0> with a photon in one mode and |1> with the photon being in another mode. However, the complication comes when one wants to apply gates to the encoded system. For example, applying an entangling gate such as CNOT in the dual rail encoding is not simple and does not map directly to “simple” gates in a photonic setting.

This area is still an open area of research and we encourage you to check out the materials we have shared. It’s also important to note that this is more of an implementation/architecture based question - it should not be something we should worry about at the level of PennyLane. For example, if we have successfully encoded a qubit in a CV system, then PennyLane would just be able to work with the standard set of qubit gates.

However, as we mentioned here:

You can easily interact CV QNodes with qubit QNodes in PennyLane. The key subtlety to appreciate here is that each QNode ends with extracting classical information from the device, such as measuring the expectation value of an observable. In that setting, you can make a CV QNode in PennyLane that measures, e.g., the expectation value of X. This classical information can then be fed to a separate qubit QNode and used to vary the gates in it.

You can freely convert between CV and qubit QNodes (in either order) because in the middle classical information is extracted.

Hi @Tom_Bromley thanks a lot for the explanation. I have a few questions.

  1. Am I understanding that correctly that visualizing/having the gates of a CV system to qubit/DV system is very complicated and not yet understood?

  2. If that is true, how else would we be able to encode a CV system into a DV system if we don’t know how the gates look?

  3. Or is it so, that when we have a photonic QC and a qubit QC the QCs wont need gates to simulate one another?

  4. The GKP states and their seminal paper focus on going from DV to CV. But the GKP states can also be used to go the other way, right? (I am almost certain this is true just want to get confirmation)

  5. What I am not wrapping my head around is the fact there seems to be a difference between encoding a CV system to a DV system (or vice versa) and having the gates of a CV system to a DV system. How can you encode it without having gates and vice versa? The gates are at the basis of operations of a computer and without the gates, there is no computer.

Hi @Shawn,

Am I understanding that correctly that visualizing/having the gates of a CV system to qubit/DV system is very complicated and not yet understood?

If that is true, how else would we be able to encode a CV system into a DV system if we don’t know how the gates look?

Or is it so, that when we have a photonic QC and a qubit QC the QCs wont need gates to simulate one another?

I’d say that it’s clear what unitary we want to do, or equivalently what the transformation is that we want to perform. The difficulty is implementing the gate physically, e.g., the CNOT gate could be probabilistic for dual-rail qubits. So it really comes down to the details of how you implement the encoded gate on an actual device.

The GKP states and their seminal paper focus on going from DV to CV. But the GKP states can also be used to go the other way, right? (I am almost certain this is true just want to get confirmation)

I’m not an expert in this area, but my understanding is that the paper shows how a qubit/finite-dimensional system can be embedded in a CV system. To me I understand this to mean “going from CV to DV”. As far as I’m aware, they don’t focus on how to embed a CV system in qubits, but I haven’t read the paper in depth.

What I am not wrapping my head around is the fact there seems to be a difference between encoding a CV system to a DV system (or vice versa) and having the gates of a CV system to a DV system. How can you encode it without having gates and vice versa? The gates are at the basis of operations of a computer and without the gates, there is no computer.

I think this comes back to the question of implementation. We can define an embedding and transformations on the embedded space, but it’s the implementation details that make things a research question for practical hardware.

@Shawn, I’m quite curious on the motivation for this line of questioning? Is this just out of interest, or related to a specific goal in PennyLane?

Thanks @Tom_Bromley. That makes a lot more sense. Yea it’s out of interest (with the hopes of having something like this work in PL). I find this stuff really fascinating but a lot of this stuff as you said is at the forefront of research, what some people with PhDs in this field can only attempt to understand. I need to get into a PhD program soon :smiley:

1 Like

So I guess there is no straightforward way to transform a DV gate algorithm (Shor’s Algorithm, HHL, QPE, QFT, Grover’s Algorithm, etc…) to a CV algorithm that will run on a photonic system. It would be quite a boon to have an application stack which allowed users to run these algorithms on photonic devices as easily as running a GBS algorithms on the photonic devices.

1 Like

Hi @john_anthony,

Yes you are correct, there is no single obvious way to go about a DV to CV translation but there are a few established options available as mentioned earlier in this thread.

Thanks for pointing out the suggestion of an application stack to translate these algorithms, would this be something you’d be interesting in championing as a contributor? We’d be happy to provide support where possible!

1 Like