Closed antalszava closed 2 years ago
Here's an example of a device-spec with modes as a dictionary (specifically containing a lower maximum value for the number of photon number measurements and a higher one for homodyne). Note that the TD2 modes in the device spec also is a dictionary, but has it's own mode validation. It doesn't compile using the Program.compile()
method, and thus never calls the mode check mentioned above.
Certain devices specify modes conditionally to characteristics of the circuit to be simulated. For example, simulating circuits that contain measurements using PNR detectors might require more computational power as simulating the same circuit, but with homodyne measurements.
Therefore, we would like to extend the check for modes in
Program
, so that a dictionary of options for modes can also be used.