Skip to content

better default upper bounds in CompilerProfile #89

@sgrava

Description

@sgrava
  1. Define better upper bounds for device specs when they are missing
  2. Investigate alternative compiler profiles when some values are missing in the device.

Description

1.

In qoolqit/devices/device.py these default values for device specs are defined

UPPER_DURATION = 6000
UPPER_AMP = 4.0 * pi
UPPER_DET = 4.0 * pi
LOWER_DISTANCE = 5.0

2.

Following discussion on #68

... when UPPER_AMP is set by hand meaning that one could call CompilerProfile.MAX_AMP and get a compilation with respect to a maximum amplitude that is fictitious (e.g. in the MockDevice case). It would't throw any error but it is tricky. I see people using MockDevice only when they want to experiment, then we should probably also let them experiment with the values of UPPER_DURATION, _AMP and so on. They are instead hardcoded.

To make more explicit. Let's say someone want to do a time evolution with certain parameters on the mock device in such a way to check whether increasing the total time would change the final result.

The UPPER_DURATION of MockDevice will be hardcoded as 6000.
Now they can insert any value for the time since there are no limits in the device and the QuantumProgram would be compiled accordingly.
However, if they select CompilerProfile.MAX_DURATION they would get a Sequence whose maximum duration is UPPER_DURATION that is >smaller with respect to what they put as maximum time (since it was hardcoded)
It is not breaking anything but it seems confusing to me.

To do

  • UPPER_DET should be more $40\pi$ as in AnalogDevice
  • Formalize 2. and investigate (figure how to disable some CompilerProfile if value is missing)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions