Skip to content

kardashin/learning-mps

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 

Quantum Machine Learning Tensor Network States

This is the follow-up code for the article Quantum Machine Learning Tensor Network States

The program generates a given number of random unitary matrices of dimensionality 2^n, where n is a given number of qubits, and, for each unitary, tries to approximate one of its eigenstates by using the Matrix Product State (MPS) ansatz with successive increasing the number of ebits it can support (see the original paper for details). Random unitaries are generated by means of the function unitary_group(), which is a part of the SciPy package. For the minimization part of the algorithm, the optimization methods from scipy.optomize.minimize are used. The initial parameters of the MPS ansatz are set randomly for each run.

The program is represented in the two versions: as the source code learning-mps.py and as the Jupyter notebook learning-mps.ipynb.

The program requires the following inputs:

  • number of qubits (e.g. 4)
  • number instances to average over (e.g. 5)
  • optimization method (e.g. BFGS)

The program outputs the four files:

  • fun_values_flat.txt -- values of the cost function for each iteration;
  • overlaps_flat.txt -- overlaps with the closest eigenstate for each iteration;
  • entanglements_flat.txt -- entanglement entropies of the found eigenstate for each iteration;
  • plot-*.pdf -- the plot of above-mentioned values.

The Qiskit package is required for execution.

About

Code for the article "Quantum Machine Learning Tensor Network States"

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published