Overview

../_images/sfcomponents.svg

The Strawberry Fields codebase includes a number of complementary components. These can be separated into frontend components and backend components (all found within the strawberryfields.backends submodule).

Software components

Frontend:

Backend:

Top-level functions

convert(func) Decorator for converting user defined functions to a RegRefTransform.
about() About box for Strawberry Fields.
cite() Prints the BibTeX citation for Strawberry Fields.
version() Version number of Strawberry Fields.

Code details

strawberryfields.version()[source]

Version number of Strawberry Fields.

Returns:package version number
Return type:str
strawberryfields.about()[source]

About box for Strawberry Fields.

Prints the installed version numbers for SF and its dependencies, and some system info. Please include this information in bug reports.

strawberryfields.cite()[source]

Prints the BibTeX citation for Strawberry Fields.

BibTex code for reference [40].

strawberryfields.convert(func)

Decorator for converting user defined functions to a RegRefTransform.

This allows classical processing of measured qumodes values.

Example usage:

@convert
def F(x):
    # some classical processing of x
    return f(x)

with prog.context as q:
    MeasureX       | q[0]
    Dgate(F(q[0])) | q[1]
Parameters:func (function) – function to be converted to a RegRefTransform.