Release 0.21.0
New features since last release
-
A
Result.metadata
property is added to retrieve the metadata of a job result. (#663) -
A setter method for
Result.state
is added for setting a state for a local simulation if a state has not previously been set. (#663) -
Functions are now available to convert between XIR and Strawberry Fields programs. (#643)
For example,
prog = sf.Program(3) eng = sf.Engine("gaussian") with prog.context as q: ops.Sgate(0, 0) | q[0] ops.Sgate(1, 0) | q[1] ops.BSgate(0.45, 0.0) | (q[0], q[2]) ops.MeasureFock() | q[0] xir_prog = sf.io.to_xir(prog)
resulting in the following XIR script
>>> print(xir_prog.serialize()) Sgate(0, 0) | [0]; Sgate(1, 0) | [1]; BSgate(0.45, 0.0) | [0, 2]; MeasureFock | [0];
Bug fixes
-
The
TDMProgram.compile_info
andTDMProgram.target
fields are now set when aTDMProgram
is compiled using the "TDM" compiler. (#659) -
Updates
Program.assert_max_number_of_measurements
to expect the maximum number of measurements from the device specification as a flat dictionary entry instead of a nested one. (#662)"modes": { "pnr_max": 20, "homodyne_max": 1000, "heterodyne_max": 1000, }
instead of
"modes": { "max": { "pnr": 20, "homodyne": 1000, "heterodyne": 1000, } }
Documentation
- README has been ported to Markdown. (#664)
Contributors
This release contains contributions from (in alphabetical order):
Theodor Isacsson