sf.io

Warning

Unless you are a Strawberry Fields developer, you likely do not need to use these functions directly.

See the save() and load() functions for saving/loading Strawberry Fields quantum programs.

This module contains functions for loading and saving Strawberry Fields Program objects and converting from/to Blackbird and XIR scripts to Strawberry Fields code.

Functions

to_blackbird(prog[, version])

Convert a Strawberry Fields Program to a Blackbird Program.

to_xir(prog, **kwargs)

Convert a Strawberry Fields Program to an XIR Program.

to_program(prog)

Convert a Blackbird or an XIR program to a Strawberry Fields program.

loads(s[, ir])

Load a quantum program from a string.

generate_code(prog[, eng])

Converts a Strawberry Fields program into valid Strawberry Fields code.

Contents