Skip to main content

QXMT is a experiment management tool for quantum computing and quantum machine learning.

Project description

QXMT: Quantum Experiment Management Tool

MIT License unit tests Docs PyPI version Downloads

QXMT is an open-source tool designed for managing experiments in quantum machine learning. Its primary focus is on minimizing the cost of managing experiments and ensuring reproducibility. To reduce costs, QXMT aims to minimize the amount of implementation code needed for experiment management, allowing developers and researchers to focus on implementing new experiments. For reproducibility, QXMT manages experimental configurations via configuration files, enabling not only the original developers but also collaborators to easily reproduce the same results without significant additional effort.

QXMT includes a variety of datasets, machine learning models, and visualization methods to support experiment management. By using these components together, users can avoid the need to develop entire workflows from scratch while also ensuring that experiments can be evaluated under consistent conditions. These default features will continue to be expanded in future updates.

Limitation

QXMT is a newly released tool, and its features are currently limited. The quantum libraries and devices that have been tested are listed below. For future development plans, please refer to the roadmap. Even if your environment is not listed, you can still manage experiments by implementing according to the interfaces provided by QXMT. For details on how to implement these interfaces, please refer to the documentation.

Quantum Library Simulator Real Machine

pennylane

Qulacs

Qiskit

Cirq

Installation

QXMT is tested and supported on 64-bit systems with:

  • Python 3.10, 3.11

You can install QXMT with Python's pip package manager:

pip install qxmt

When installing QXMT, you have the option to enable the LLM functionality. By default, it is not installed. By enabling the LLM feature, you can automatically generate experiment summaries based on code differences. If needed, please install it using the following command:

pip install qxmt[llm]

Tool Overview

QXMT manages experiments in the following folder structure.

<your_project>
├── data
├── configs
│   ├── config_1.yaml
│   ├──   ⋮
│   └── config_n.yaml
└── experiments
    ├── <your_experiment_1>
       ├── experiment.json
       ├── run_1
          ├── config.yaml
          ├── shots.h5
          └── model.pkl
       ├── run_2
       ├──          └── run_n
           └── <your_experiment_n>

Keywords

  • data: Contains the raw data used in the experiments.
  • configs: Holds YAML files that define the configurations for each experiment run.
  • experiments: Contains the results of the experiments.
    • A dedicated folder is automatically created for each experiment, based on the name provided when the experiment is initialized.
    • Each experiment folder includes an experiment.json file and subfolders that manage the individual runs of the experiment.

Getting Started

1. Start new experiment

import qxmt

# initialize experiment setting
experiment = qxmt.Experiment(
    name="operation_check",  # set your experiment name
    desc="operation check of experiment package",  # set your experiment description
    auto_gen_mode=False,  # if True, each experimental description is automatically generated by LLM
).init()

# run experiment. each experiment defined in config file or instance.
# see documentation for details on instance mode
# run from config
artifact, result = experiment.run(config_source="configs/template-openml.yaml")

# get instance of each experiment artifact
dataset = artifact.dataset
model = artifact.model

# output result
# result table convert to pandas dataframe
experiment.runs_to_dataframe()

# visualization (Below are some of the features. See documentation for details.)
model.plot_train_test_kernel_matrix(dataset.X_train, dataset.X_test, n_jobs=5)

2. Load existing experiment

# load existing experiment from json file
experiment = qxmt.Experiment().load_experiment(
    "experiments/operation_check/experiment.json")

# reproduction target run artifact
reproduction_model = experiment.reproduce(run_id=1)

# run new experiment
artifact, result = experiment.run(config_source="configs/template-openml.yaml")

# output result
experiment.runs_to_dataframe()

Contributing

We happily welcome contributions to QXMT. For details on how to contribute, please refer to our Contribution Guide.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qxmt-0.3.5.tar.gz (52.5 kB view details)

Uploaded Source

Built Distribution

qxmt-0.3.5-py3-none-any.whl (76.6 kB view details)

Uploaded Python 3

File details

Details for the file qxmt-0.3.5.tar.gz.

File metadata

  • Download URL: qxmt-0.3.5.tar.gz
  • Upload date:
  • Size: 52.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.13.0 Darwin/23.6.0

File hashes

Hashes for qxmt-0.3.5.tar.gz
Algorithm Hash digest
SHA256 ee5cb4a43ec5474f1b97f87a7fb82fef00ebec708a64758aeafc8b6f9323d48f
MD5 50de1db494b11c9c4e128725e5df5a48
BLAKE2b-256 fc00a261b338fdc93724a4cc86c295c7b965fb2a9d417b304531c780e95b4d5c

See more details on using hashes here.

File details

Details for the file qxmt-0.3.5-py3-none-any.whl.

File metadata

  • Download URL: qxmt-0.3.5-py3-none-any.whl
  • Upload date:
  • Size: 76.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.13.0 Darwin/23.6.0

File hashes

Hashes for qxmt-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 2d6f51987b067bc41a50de11fb670b42cf20d60e3d696619d02fd46368e3ed93
MD5 4d84e2ae13acc36fe10e600221c08088
BLAKE2b-256 ba2fd9ac05de2c5519ace468529ae67493477ef89d9e3f5d89e8607ebe6c9b05

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page