QUANT-NET Controller
The QUANT-NET Controller provides the centralized controller functions for the control plane.
quantnet_controller
Run a QUANT-NET Controller instance
Usage
quantnet_controller [OPTIONS]
Options
- --mq-broker-host <mq_broker_host>
Specify the message queue broker host
- --mq-broker-port <mq_broker_port>
Specify the message queue broker port
- --mq-mongo-host <mq_mongo_host>
Specify a MongoDB host (if mongo configured)
- --mq-mongo-port <mq_mongo_port>
Specify a MongoDB port (if mongo configured)
- --plugin-path <plugin_path>
Specify a path containing controller plugins
- --schema-path <schema_path>
Specify a path containing additional schema files
- -c, --config <config_file>
Specify a configuration file
Configuration File
The controller makes use of an INI configuration file. A path can be provided
explicitly with the -c/--config CLI flag; if the file does not exist
the controller exits immediately. Without -c, the following paths are probed:
$QUANTNET_HOME/etc/quantnet.cfg(only when$QUANTNET_HOMEis set)
/opt/quantnet/etc/quantnet.cfg(always)
Example:
[common]
logdir = /var/log/quantnet
loglevel = INFO
[database]
default = mongodb://localhost:27017
[plugins]
path=/opt/qn-plugins
[schemas]
path=/opt/qn-plugins/schema
[scheduling]
name=BatchScheduler
[routing]
name=PathFinder
[monitoring]
name=Monitor
The configuration file may contain multiple sections as documented below.
[common]
- logdir
- Type:
string
- Default:
/var/log/quantnet
A directory to store log files.
- loglevel
- Type:
string
- Default:
INFO
The log level to configure.
INFO,WARN,CRITICAL,ERROR,DEBUG
[database]
- default
- Type:
string
- Default:
-
The database URI. Example:
mongodb://localhost:27017
- schema
- Type:
string
The database schema name. [postgresql specific]
[mq]
- host
- Type:
string
The message queue (MQTT) broker host.
- port
- Type:
string
The message queue (MQTT) broker port.
- mongo_host
- Type:
string
- Default:
127.0.0.1
The MongoDB host used by the message bus layer.
- mongo_port
- Type:
string
- Default:
27017
The MongoDB port used by the message bus layer.
[experiment_definition]
- def_file_path
- Type:
string
The path to an experiment definition Python source file.
[plugins]
- plugins_path
- Type:
string
The path to a directory containing loadable controller plugins.
[schemas]
- schemas_path
- Type:
string
The path to a directory containing YAML schemas conforming to the Message Bus spec.
[scheduling]
- scheduling_name
- Type:
string
The name of a Scheduling module to make active in the Controller.
[routing]
- routing_name
- Type:
string
The name of a Routing module to make active in the Controller.
[monitoring]
- monitoring_name
- Type:
string
The name of a Monitoring module to make active in the Controller.
Topology API
The controller’s getInfo RPC with type="topology" supports an optional
full parameter:
full=False(default) — returns a lightweight summary with each node’s type and qubit/channel counts.full=True— returns complete node definitions including full channel data, plus aggregate counts of nodes, qubits, and channels across the topology.
Logging File
A Python logging module logger.conf may be included in the QUANT-NET configuration path.
Example:
[loggers]
keys=root,gmqtt
[handlers]
keys=console
[formatters]
keys=simple
[logger_root]
level=INFO
handlers=console
[logger_gmqtt]
level=CRITICAL
handlers=console
qualname=gmqtt
propagate=0
[handler_console]
class=StreamHandler
level=DEBUG
formatter=simple
args=(sys.stdout,)
[formatter_simple]
format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
Development Install
After downloading the source tree, pull requirements and install package in edit mode:
pip3 install -e .
Local Development Environment
See the Quick Start guide.