Resolve "All `CompilationNodes` should accept the full `CompilationConfig` as input"

Explanation of changes

  • All CompilationNodes now have input arguments schedule and config, which is the full CompilationConfig.
  • To ensure backward compatibility, the compilation functions can still accept partial configs (device_cfg, hardware_cfg)
  • DeviceCompilationConfig is moved into backends.graph_compilation to avoid circular import
  • The compilation_options in the SimpleNodeConfig class are no longer needed and are therefore removed

The nodes for which this was implemented are (should be all nodes currently in use):

  • compile_circuit_to_device
  • set_pulse_and_acquisition_clock
  • determine_absolute_timing (additionally has time_unit input argument but this should be moved into compilation_config as well)
  • Qblox hardware_compile
  • Zhinst compile_backend
  • add_pulse_information_transmon (legacy function)

Motivation of changes

Closes #405 (closed)

Once we start populating the HardwareOptions (like LatencyCorrections) in the CompilationConfig, the compilation nodes (hardware backends) will need access to not only the hardware_config (currently stored in compilation_config.connectivity), but also to the compilation_config.hardware_options.

See also this comment by @slavoutich: &1 (comment 1201163230)


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.md and AUTHORS.md have 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 Edgar Reehuis

Merge request reports

Loading