We’re very excited to announce the release of Strawberry Fields version 0.16.
![]()
This release is focused on supporting time domain algorithms via the new sf.TDMProgram class and extending the apps.qchem module with new functions.
Time Domain
![]()
Highly scalable simulation of Gaussian states is now available with native support for time-domain multiplexing algorithms via the new TDMProgram class.
The following is an example for time domain program with 2 concurrent modes:
Code example
import strawberryfields as sf
from strawberryfields import ops
prog = sf.TDMProgram(N=2)
with prog.context([1, 2], [3, 4], copies=3) as (p, q):
ops.Sgate(0.7, 0) | q[1]
ops.BSgate(p[0]) | (q[0], q[1])
ops.MeasureHomodyne(p[1]) | q[0]
eng = sf.Engine("gaussian")
results = eng.run(prog)
print(results.all_samples)
{0: [array([1.26208025]), array([1.53910032]), array([-1.29648336]),
array([0.75743215]), array([-0.17850101]), array([-1.44751996])]}
For more details see the Time-domain photonic circuits demonstration.
Vibronic Transition ![]()
The ability to apply the Doktorov operator on a given state is now available by using the VibronicTransition function from the apps.qchem.dynamics module.
Code example
from strawberryfields.apps.qchem.vibronic import VibronicTransition
modes = 2
p = sf.Program(modes)
with p.context as q:
VibronicTransition(U1, r, U2, alpha) | q
Time evolution
![]()
The time evolution operator can be applied on a given state using the TimeEvolution function from the apps.qchem.dynamics module.
Code example
modes = 2
p = sf.Program(modes)
with p.context as q:
sf.ops.Fock(1) | q[0]
sf.ops.Interferometer(Ul.T) | q
TimeEvolution(w, t) | q
sf.ops.Interferometer(Ul) | q
The full release notes are available at Release notes — Strawberry Fields 0.23.0 documentation.
As always, this release would not have been possible without all the help from our contributors:
@jmarrazola , @Tom_Bromley, @theodor, @josh, @sjahangiri, @nathan, Fabian Laudenbach, @Nicolas_Quesada, @antalszava, Ilan Tzitrin.