Only start instruments that are in the compiled instructions
This MR ensures that only instruments which are listed in the compiled_instructions of the instrument coordinator will be started by the instrument coordinator.
This change was motivated by a bug seen in the Quantware lab where they have both Cluster and VNA in their setup. The VNA was always being triggered by the instrument coordinator, even when running schedules which do not use the VNA. The problem is that the start method of the instrument coordinator was starting every instrument which has an instrument coordinator component, even if they are not used in the schedule.
This MR fixes this by only starting the instruments which have a key in the compiled_instructions.
One thing to note is that the old docstring stated that the instruments would be started in the order they were added to the instrument coordinator. This will not necessarily be true in the new implementation. In any case, this behaviour was not tested for in the tests, so I don't know if it was essential, I'm guessing not.
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 @deprecatedand entry in deprecated code suggestions (or N/A). -
Newly added/adjusted documentation and docstrings render properly (or N/A). -
Pipeline fix or dependency update: post in #software-for-developerschannel to mergemainback in or update local packages (or N/A). -
Tested on hardware (or N/A). -
CHANGELOG.mdandAUTHORS.mdhave been updated (or N/A). -
Performance tests: if changes can affect performance, trigger CI manually and evaluate results (or N/A). -
Windows tests in CI pipeline pass (manually triggered by maintainers before merging). - Maintainers do not hit Auto-merge, we need to actively check as manual tests do not block pipeline
For reference, the issues workflow is described in the contribution guidelines.