Textbook Quantum Optics

Hi all! Full disclosure: totally new to StrawberryFields and PennyLane.

I was interested in simulating simple quantum optics experiments that are found in standard textbooks in a simple manner on my desktop. For instance, measuring all quadratures of a two-mode squeezed state repeatedly using heterodyne measurements, and then extract various statistical measures (mean, variance, covariance, etc.) from these records. Is this something that can be done with Xanadu’s software ?

Thanks for your help!

Hi @JeromeB,

Welcome to the forum!

Absolutely - a good place to start on this is the Strawberry Fields tutorials. I recommend to check out the first 3-4 tutorials there, they provide a lot of examples that go step-by-step through basic protocols and show how to use the various operations and measurements available. The Quickstart Guides also contain some simple usage examples.

Hope that helps, as you work on implementing things, feel free to ask us any other questions that come up :slight_smile:

Hello glassnotes and thanks for the reply.

I actually had a good look around the different tutorials and documentations. Alas, I did not find the information that I was seeking.

As explained above, I wanted to do a very simple textbook example were a two-mode squeezed state is generated and then the different field quadratures are simultaneously measured for both fields. Repeating the measurement several times, then the msmt statistics can be obtained and a phase-space representation of the two-mode squeezed state can be drawn.

I had an interesting chat with your colleague Nicolas Quesada about my intentions and we found a few interesting bits:

As it turns out, the Gaussian backend doesn’t allow for repeated heterodyne measurements. Turning to the Bosonic backend, there is an issue with the way that heterodyne command is treated in the engine since it seems to lock-in with the initial measurement outcome even if the program is run repeatedly. The issue seems also to affect homodyne measurements, since I tried a work-around the MeasureHD by using anscillas, BS and MeasureX/P to manually perform heterodyning, and it also failed.

To resolve the issue, I have to run the program twice in a row with MeasureHD for some strange reason and then it works as expected. Hopefully this can be solved easily in the near future.

Thanks for the follow-up and kudos to Nicolas for helping me out!


Hi @JeromeB,

Thanks very much for the follow up info, and glad to hear you got to chat with Nico.

By the way, please feel free to open an issue on our Github for any of the points you mentioned. This will make sure they are on the radar of the Strawberry Fields dev team :slight_smile: