sf.tdm¶
This package contains classes and functions for creating time-domain algorithms in Strawberry Fields.
Functions¶
|
Creates a GBS instance in form of a |
|
Makes a user-defined set of gate arguments compatible with |
|
Calculates the mode indices for use in a |
|
Checks whether a variable name is a p-type variable. |
|
Extracts the three loop-phase offsets from the device specification. |
|
Adds a pi offset to the phase-gate arguments that cannot be applied by the Borealis modulators. |
|
Matches the user-defined squeezing values to a discrete set of squeezing levels supported by the device. |
|
Moves all measured vacuum modes from the first shot of the returned TDM samples array to the end of the last shot. |
|
Creates a list of random beamsplitter arguments for GBS jobs. |
|
Creates a list of random rotation-gate arguments for GBS jobs. |
|
Reshapes the samples dict so that they have the expected correct shape. |
|
Convenience function to shift a list by a number of steps. |
|
Takes the gate arguments as a list and returns them as a dictionary. |
|
Takes the gate arguments as a dictionary and returns them as a list. |
|
Pad the gate arguments with 0 for vacuum modes. |