Gaussian Boson Sampling with PennyLane
Overview
Gaussian Boson Sampling with PennyLane
This PennyLane demo introduces Gaussian Boson Sampling (GBS), a photonic sampling task that has been central to demonstrations of quantum computational advantage, including Xanadu's Borealis device and the photonic experiment of Zhong et al. It explains the physics behind boson sampling, from the bunching of bosons seen in the Hong-Ou-Mandel effect to Aaronson and Arkhipov's original proposal, and describes how the Gaussian variant, introduced by Hamilton et al., replaces hard-to-prepare single photons with experimentally friendlier squeezed states. Using the legacy PennyLane-Strawberry Fields plugin and its Gaussian backend, the demo builds a small circuit that squeezes four modes and passes them through a Haar-random four-mode interferometer of beamsplitters and phase shifters, then reads out the Fock-basis probability distribution. It verifies numerically that these probabilities match the theoretical formula, in which each event probability is proportional to the squared hafnian of a submatrix of the interferometer unitary, computed with The Walrus library. Because evaluating the hafnian is a sharp-P-hard problem, closely related to the matrix permanent, GBS is believed to be classically intractable at scale, which is exactly what makes it a compelling near-term demonstration of quantum advantage.
Run it
pip install -r requirements.txt
python demo.py
Source and license
Imported from demonstrations_v2/gbs/demo.py in PennyLaneAI/demos at c52c0abeb5122218aa96b38eea848864cce7323f, under the Apache License 2.0. Original authors: Xanadu and the PennyLane community. The upstream LICENSE is included alongside this example.
This entry was created automatically from publicly available records. QCR links to public sources and only stores repository content where the license permits redistribution.
Versions
Cite all versions? Use the base QCR ID to always reference the latest version of this entry.
Join the Discussion
Comments (0)
No comments yet. Be the first to share your thoughts!