I am following the Hamiltonian simulation: https://strawberryfields.ai/photonics/demos/run_hamiltonian_simulation.html#id14 for continuous variable (CV) [qumodes] and was wondering if there is any support to get the ground state energy using parametrized circuits like VQE in this setup. Also, is there any place to see how QITE (quantum imaginary time evolution) can be applied in strawberryfields (in case this is the only way yet possible)?

Hi @rgjha, welcome to the Forum!

I haven’t tried it myself but maybe you could program a VQE algorithm in PennyLane (you can follow this demo) and use the PennyLane-SF plugin to run it on StrawberryFields.

I’m not sure I understand the second part of your question. What do you mean by “in case this is the only way yet possible”? Does the Quantum Natural Gradient Optimizer in PennyLane do what you need? You can learn more about it in this demo. For VQE-like problems, the objective function for the optimizer can be a qnode that returns the expectation value of a Hamiltonian.

Please let me know this is what you needed!

Hi @CatalinaAlbornoz, thanks for your reply. I think what you suggest about PennyLane-SF plugin might indeed be useful. In the second part, I was thinking about the computation of the expectation value of a Hamiltonian directly in SF. QITE is one method people have explored (https://arxiv.org/abs/2107.00791) so I was asking for native SF methods apart from this. With qubits, I am aware of how to do this but not so with continuous variables. In a recent Bosonic QISKIT paper Sec VI B (https://arxiv.org/abs/2209.11153), it was mentioned that they want to do this. Naturally, I was thinking if there is any simulator that has done it already and hence the question. Apart from what you have replied, I would appreciate it if you can post more details as they evolve in the future. Thanks a lot.

Hi @rgjha,

I think that using the PennyLane-SF plugin may be the easiest way but if you want to use SF directly you can try using the TimeEvolution function that we have in Strawberry Fields. I’m not sure that it will work for what you’re looking to do but it’s worth taking a look at it.

Regarding the expectation value of a Hamiltonian we don’t have something like this in SF (we do have it in PennyLane) but we have a function to calculate the expectation value of samples samples_expectation.

Is this what you were looking for?