Restructure CompilationConfig, add HardwareDescription
Explanation of changes
- Restructures the
CompilationConfigby introducing thehardware_compilation_config - The
hardware_compilation_configcontains thebackend, thehardware_descriptions, thehardware_options, andconnectivity(which may contain an old-style hardware config) - The new
hardware_descriptionsdatastructure stores the description of the control hardware instruments (such as hardware_type, high-level settings). - Updates documentation to reflect this new structure of the
CompilationConfig
Motivation of changes
Part of &1 (closed)
This MR makes sure that config information corresponding to the "circuit_to_device compilation" and "hardware compilation" are grouped separately.
After this MR, the old-style hardware config dict now only contains connectivity informations, which we can transfer to the new Connectivity datastructure in a follow-up MR.
Still to do
-
Make sure the documentation (clearly) reflects this structure -
Double-check all CompilationConfig(sub)datastructures docstrings -
Add _import_backend_if_strvalidator toHardwareCompilationConfig -
Decide which fields in HardwareCompilationConfigshould be Optional -
Make sure compiling with an (deprecated) old-style hardware works and is covered by some tests -
Bump CompilationConfigversion -
Double-check if using Annotatedtype is best option to discriminate betweenHardwareDescriptionclasses
Merge checklist
See also merge request guidelines
-
Merge request has been reviewed (in-depth by a knowledgeable contributor), and is approved by a project maintainer. -
New code is covered by unit tests (or N/A). -
New code is documented and docstrings use numpydoc format (or N/A). -
New functionality: considered making private instead of extending public API (or N/A). -
Public API changed: added @deprecated(or N/A). -
Tested on hardware (or N/A). -
CHANGELOG.mdandAUTHORS.mdhave been updated (or N/A). -
Windows tests in CI pipeline pass (manually triggered by maintainers before merging).
For reference, the issues workflow is described in the contribution guidelines.
Edited by Tobias Bonsen