vacuum_padding(gate_args, delays=[1, 6, 36])[source]

Pad the gate arguments with 0 for vacuum modes.

Adds zeros to the beginning and end of the gate-argument lists in order to make sure: - the non-trivial gates start punctual with the arrival of the first (possibly delayed) pulse - all loops are emptied from optical pulses at the end of the program - all gate lists have the same number of elements

  • gate_args (dict) – dictionary with the collected arguments for squeezing gate, phase gates and beamsplitter gates

  • delays (list, optional) – The delay applied by each loop in time bins. Defaults to [1, 6, 36].


the input dictionary with the lists of phase-gate and beamsplitter arguments sandwiched with appropriate amounts of zeros

Return type