cli: command-line interface

qecsim.cli

This module contains the qecsim command line interface (CLI).

Components are integrated into the CLI via entries in the [options.entry-points] section of setup.cfg. The format of entries is <short_name> = <module_path>:<class_name>. Codes, error models and decoders appear under the keys qecsim.cli.run.codes, qecsim.cli.run.error_models and qecsim.cli.run.decoders, respectively. Fault-tolerant compatible codes, error models and decoders appear under the keys qecsim.cli.run_ftp.codes, qecsim.cli.run_ftp.error_models and qecsim.cli.run_ftp.decoders, respectively.

For example, the 5-qubit code appears in setup.cfg as follows:

[options.entry_points]
qecsim.cli.run.codes =
    five_qubit = qecsim.models.basic:FiveQubitCode

Optionally, one-line descriptions for CLI help messages can be provided by decorating implementation classes with qecsim.model.cli_description(). For example, see qecsim.models.basic.FiveQubitCode.