Parameter Monitoring and Throttling#
OrangeQS Juice allows you to monitor any parameter published on a Juice topic and automatically throttle (pause) experiments if the parameter exceeds a configured threshold. This is essential for protecting equipment and ensuring safe operation in automated quantum laboratory setups.
This tutorial explains how to set up parameter monitoring and throttling using the configuration system. See Tutorial 4. Parameter Monitoring and Throttling for a hands-on walkthrough that sets this up for a real topic, start to finish.
What is Parameter Monitoring?#
Many devices and services in Juice publish real-time values (parameters) to topics, such as temperature, pressures and currents. The parameter monitoring system lets you:
Watch any published value on a topic.
Define warning and throttle thresholds.
Publish throttle states to notify experiments if they can continue.
Send alerts based on these states.
How Throttling Works#
If a monitored parameter exceeds the configured throttle_if_larger threshold, Juice will pause (throttle) experiment execution. When the parameter drops below the stop_throttle_if_smaller threshold, execution resumes.
Configuring Parameter Monitoring#
Parameter monitoring is configured using the parameter-monitor.toml file. Each monitored parameter is defined as a unit in the configuration. Place this file in the lab repo, then restart the task manager to apply it:
from orangeqs.juice.client.service import restart_service
restart_service("task-manager")
If the change should also show up on the dashboard’s Parameter Monitor widget, click the restart icon in the dashboard’s own navbar too.
[juice_topic_monitoring_units.mc_temperature]
display_label = "MC Temperature"
monitored_topic = "system-monitor.thermometry_unit_1.thermometer_5"
monitored_event_type = "orangeqs.juice.system_monitor.data_structures.TemperaturePoint"
monitored_field = "temperature"
unit = "kelvin"
warn_if_larger = 20.0e-3
throttle_if_larger = 25.0e-3
throttle_grace_interval = 10.0
stop_throttle_if_smaller = 20.0e-3
stop_throttle_grace_interval = 5.0
[juice_topic_monitoring_units.50mK_temperature]
display_label = "50mK Temperature"
monitored_topic = "system-monitor.thermometry_unit_1.thermometer_4"
monitored_event_type = "orangeqs.juice.system_monitor.data_structures.TemperaturePoint"
monitored_field = "temperature"
unit = "kelvin"
warn_if_larger = 90.0e-3
throttle_if_larger = 100.0e-3
throttle_grace_interval = 10.0
stop_throttle_if_smaller = 80.0e-3
stop_throttle_grace_interval = 5.0
The configuration schema can be found at parameter-monitor.toml
Pro Tip
If you are an extension developer, you can bundle your configuration with your extension so that Juice automatically picks it up when your extension is installed.
Best Practices#
Troubleshooting
If your parameter is not being monitored, check:
The topic exists and is publishing values.
The event type and field are correct.
You have restarted the task manager (and the dashboard, if the change should show up there)