Hi everyone,

Is there any way to do non-Gaussian gate decompositions in Strawberry Fields using the methods mentioned in Ref? Are the exact and approximate decompositions implemented in SF?

Best

Hi everyone,

Is there any way to do non-Gaussian gate decompositions in Strawberry Fields using the methods mentioned in Ref? Are the exact and approximate decompositions implemented in SF?

Best

Hey @Rina! Welcome to the forum

I think there’s something the matter with your hyperlink (it’s not clickable). That said, every compiler has a `decompose`

method akin to this one. I’m not 100% sure how they’d handle non-Gaussian operators (if at all) in terms of something exact or an approximation. I’ll have to get back to you on that! Hang tight

Thanks, @isaacdevlugt !

You’re right, here is the link again

https://quantum-journal.org/papers/q-2021-02-08-394/pdf/

So I’d like to know if I can build an arbitrary non-Gaussian gate in SF.

For example, I want to use the e^{(\hat{x}^10)} gate in my algorithm.

I made specifically this example to have sth which is difficult to decompose by hand and probably requires hundreds of basic gates to apply.

Is there a way to do this in SF?

Thanks!

Hey @Rina!

Just heard back from some experts. We don’t have non-Gaussian decompositions supported in SF, nor do we plan to support them. If you wanted to add an \exp(i x^{10}) gate, you could fork the SF repository, and then use the cubic phase gate as a template for implementing it: sf.ops.Vgate — Strawberry Fields 0.23.0 documentation

Hope this clears things up!

@isaacdevlugt: thanks for the answer!

May I know why there is no plan for supporting such decompositions?

I mean is there a technical limitation that prohibits including this in SF?

Does it mean any arbitrary non-gaussian operation in SF (except the cubic phase gate and Kerr gate) should be built manually? What is the highest number of gates (circuit depth) that SF can support?

May I know why there is no plan for supporting such decompositions?

StrawberryFields is in maintenance mode until further notice, meaning that we will fix bugs and tweak around the edges if needed, but no new features will be added at this time.

Does it mean any arbitrary non-gaussian operation in SF (except the cubic phase gate and Kerr gate) should be built manually?

Yes

What is the highest number of gates (circuit depth) that SF can support?

If applying Gaussian gates to Gaussian states, you can apply as many as you want since those systems can be simulated efficiently. If using non-Gaussian gates in the Fock basis, then the limitation would likely be how many of those gates you can apply before your initial Fock cutoff is a bad approximation, e.g. if the non-Gaussian gates are adding photons to the system and driving the support of the state beyond the cutoff.

1 Like

Thanks for the clarification!

1 Like

My pleasure! Let us know if you have any other questions

1 Like

Hi, I have just implemented x-operator string for up to 4 modes and arbitrary exponents in https://github.com/pc2/strawberryfields/tree/rschade/operator_decomposition.

You can find example usage and tests in

https://github.com/pc2/strawberryfields/blob/rschade/operator_decomposition/test_xstring.py

1 Like