solprop.recipe.export#

A recipe written out as the plain Python script a person would write (SEP 41, S1).

The script is the way out of a recipe for whatever a recipe cannot hold: a custom pulse, a callable, an unregistered type. It makes the same run: the same simulation, hash included, and the same execution settings, which the hash does not cover.

Functions

script(recipe, output)

Write a recipe as a plain Python script.

solprop.recipe.export.script(recipe, output)[source]#

Write a recipe as a plain Python script.

Parameters:
recipeRecipe

The recipe.

outputstr or None

The file the run writes, or None for memory.

Returns:
str

The script.