Fidelity for bosonic states

Hi,

I am wondering if it’s possible to compute fidelity between two bosonic states (linear combinations of Gaussians). I know this can be done with Gaussian states, but not linear combinations of them.

I first thought about combining the vectors of means and covariance matrices from the Gaussians in the linear combination to get a single Gaussian, but now I am not sure I have enough data to do something like that.

Another method I’m thinking of is to compare each Gaussian of a set to its “corresponding” Gaussian of the other set. But here, I don’t know what the correct ordering is to carry on this comparison.

For some more context: I am comparing output GKP states from a CSUM circuit and its teleported version, both of which run using the bosonic backend.
Previously, I had been converting these output states into a Fock basis representation (using density matrix) but this process takes a while (and I want to compare this circuit for several choices of circuit parameters).
Now I am wondering if it’s possible to compare the output states using their linear combination of Gaussians expressions and not having to convert them to the Fock basis.

Thanks, and let me know if you need more information!

Hey @Francisco_J_Estrella :wave:! Thanks for the question :smile:! We’re looking into an answer for you. In the mean time, please share any relevant code to your question if you have it :computer:.

Hi Francisco. That’s a good question and I don’t have a ready answer fo you. I think your first attempt was on the right track though. Maybe the combinations have to be taken with care: I haven’t tried, but you may want to try computing the fidelity between all the pairs of Gaussians from each set and only then combine the results.
Let us know if it works out.

1 Like

Hi @Francisco_J_Estrella were you able to figure this out?

My thought is to convert your bosonic state to a Wigner function and calculate the Fidelity using the Wigner function formula. Would that work in SF?

Hi @jchapSF, welcome to the Forum!

We have specific functions in Strawberry Fields to calculate fidelity, but they won’t work with any state, there are some restrictions. For instance you can get the fidelity of the reduced state in a specified mode (single-mode) with a state supplied by you. You can also calculate The fidelity of the state with a product of coherent states, and the fidelity of the state with the vacuum state. You can find these three functions here in the documentation.

I’m not sure that this would work for this particular case. As @ziofil mentioned before you would need to be very careful in computing the fidelity between all of the pairs.

This being said, if you have found a better way of computing the fidelity please feel free to add more details here! In our introduction to the bosonic backend tutorial you will see how we work with the Wigner function of a Cat state, which may answer the first half of your question.

Please let us know if this is helpful for you.

Hi,

Since asking this question, I did come across the method for calculating the fidelity with a vacuum or coherent state and that was helpful.

I also looked through your Bosonic backend tutorial which was somewhat helpful but mostly I was looking for how to do PNR detection and post-selection with the Bosonic backend which I obviously didn’t find since it hasn’t been implemented yet.

My suggestion centered around the idea that the Wigner function is a general description of a quantum state and the fidelity formula is straightforward (overlap integral). Now that I understand better how the bosonic backend represents states and that the Wigner function is just sampled from that, my suggestion ends up being more of a band-aid/interim solution and amounts to calculating a discrete overlap integral between two discretely sampled Wigner functions (one from the Bosonic output state and another from the target state).

Thanks,
Joe

1 Like

Hi @jchapSF,

If you want to share the other method that you found it would be awesome so that others can benefit from the answer too.

Thanks for adding your thoughts around the Bosonic backend and the Wigner function too!

Let us know if you have any outstanding questions. :grinning:

To combine and summarize from my last two posts, my suggestion for an approximate method to calculating the fidelity for bosonic states is to calculate the state’s Wigner function and calculate the (discrete) overlap integral between that Wigner function and the Wigner function of the target state (Eqn . 73 of https://doi.org/10.1134/S1054660X06100057).

1 Like

Thanks for sharing this @jchapSF !