sf.tdm.to_args_list¶
-
to_args_list
(gate_dict, device=None)[source]¶ Takes the gate arguments as a dictionary and returns them as a list.
The returned list will be compatible with circuits conforming to the circuit layout in the provided device specification, and can be passed to the context when creating the corresponding
TDMProgram
.Note
If no device is passed, this function will simply flatten the loops in the
gate_dict
. If a device is passed, the gate order in the returned list will be validated against the gate order in the device layout. Any gates with free parameters containing the substring “loop” will be skipped.- Parameters
gate_args (dict) – dictionary with the collected arguments for squeezing gate, phase gates and beamsplitter gates
device (sf.Device) – the Borealis device containing the supported squeezing parameters
- Returns
list with the collected arguments for squeezing gate, phase gates and beamsplitter gates
- Return type
list