| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| """ | |
| Entry point for application: | |
| runs numerical experiment to verify Choi-Cholesky decomposition of CP(TP)-maps. | |
| """ | |
| # ---------------------------------------------------------------- | |
| # IMPORTS | |
| # ---------------------------------------------------------------- | |
| import os | |
| import sys | |
| from pathlib import Path | |
| os.chdir(Path(__file__).parent.parent.as_posix()) | |
| sys.path.insert(0, os.getcwd()) | |
| from .choi_cholesky._core.logging import * | |
| from .choi_cholesky.experiments.choi_cholesky import * | |
| from .choi_cholesky.queries._console.prog_examples import * | |
| from .choi_cholesky.setup import * | |
| # ---------------------------------------------------------------- | |
| # EXECUTION | |
| # ---------------------------------------------------------------- | |
| if __name__ == "__main__": | |
| # set sessions settings | |
| sys.tracebacklimit = 0 | |
| # parse cli flags | |
| args = CliArguments(info=INFO).parse(*sys.argv[1:]) | |
| # early terminate if only version requested | |
| if args.mode == "version": | |
| print(VERSION) | |
| exit(0) | |
| # set up logging | |
| configure_logging() | |
| # execute main method | |
| verify_choi_cholesky( | |
| d1=args.dim1, | |
| d2=args.dim2, | |
| n=args.num, | |
| map=args.map, | |
| algorithm=args.algorithm, | |
| seed=args.seed, | |
| ) | |