Skip to content

Joaggi/Learning-with-Density-Matrices-and-Random-Features

Repository files navigation

Learning with density matrices and random features

The code for the paper ArXiv or Springer

Abstract

A density matrix describes the statistical state of a quantum system. It is a powerful formalism to represent both the quantum and classical uncertainty of quantum systems and to express different statistical operations such as measurement, system combination and expectations as linear algebra operations. This paper explores how density matrices can be used as a building block to build machine learning models exploiting their ability to straightforwardly combine linear algebra and probability. One of the main results of the paper is to show that density matrices coupled with random Fourier features could approximate arbitrary probability distributions over Rn. Based on this finding the paper builds different models for density estimation, classification and regression. These models are differentiable, so it is possible to integrate them with other differentiable components, such as deep learning architectures and to learn their parameters using gradient-based optimization. In addition, the paper presents optimization-less training strategies based on estimation and model averaging. The models are evaluated in benchmark tasks and the results are reported and discussed.

Setup

Installation

Install Miniconda from here and then run the following commands to create the learning_with_density_matrices environment:

conda env create -f environment.yml

conda activate learning-with-density-matrices

Next, install the package:

pip install -e .

or if you want development dependencies as well:

pip install -e .[dev]

Gitsubmodules update

This repository rely on some gitsubmodules. To update them run:

git submodule update --init --recursive

Ml-flow

All the experiments will be saved on Ml-flow in the following path using sqlite: mlflow/

mkdir mlflow/

After running your experiments, you can launch the ml-flow dashboard by running the following command:

mlflow ui --port 8080 --backend-store-uri sqlite:///mlflow/tracking.db

Citation

If you find our work useful in your research, please consider citing our paper:

@article{gonzalez2022learning,
  title={Learning with density matrices and random features},
  author={Gonz{\'a}lez, Fabio A and Gallego, Alejandro and Toledo-Cort{\'e}s, Santiago and Vargas-Calder{\'o}n, Vladimir},
  journal={Quantum Machine Intelligence},
  volume={4},
  number={2},
  pages={23},
  year={2022},
  publisher={Springer}
}

About

This paper explores how density matrices can be used as a building block to build machine learning models exploiting their ability to straightforwardly combine linear algebra and probability.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors