Coder Social home page Coder Social logo

mpostat-matlab's Introduction

mpostat-matlab

MATLAB code to find the stationary state of a one-dimensional quantum lattice system, using matrix product operators.

mpostat-matlab's People

Contributors

otbrown avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mpostat-matlab's Issues

Validate Code

Code passes unit-testing but hasn't been run through rigorous validation yet (because it is still too slow). The validation tests do exist and are currently running on the workstation, but will likely take some time to run, and may not succeed due to convergence problems etc. We will have to trust in the unit tests for now, but a full validation run should be a priority.

Most recent validationTests commit at the creation of this issue: b120fd1

Finalise Test-Suite

Write system tests which reproduce published results, as well as trivial results.
Add further unit tests to limit changes in functionality.

TASKLIST:

  • Get current test-suite running...
  • Add ConvTestTest
  • Find arXiv paper which had medium size system results
  • Reproduce results from paper
  • Include result reproduction in system test
  • Check all tests run on cluster

User input should determine eigenvalue accuracy

Redefine control logic and how THRESHOLD is used. Calculation should simply be allowed to end if eigenvalues have converged but above desired THRESHOLD. RUNMAX should become an internal variable, set suitably high.

Optimise Code

Code meets performance targets (still to be set), and STILL PASSES ALL TESTING.

TASKLIST:

  • Set up profiling script
  • Define performance targets
  • Meet performance targets

RCan fails tests with O(1E-13) errors some of the time

Assertion failed in RCanTest/[testHILBY=value2,testLENGTH=value2]testTracePreservation and it did not run to completion.

---------------------
Framework Diagnostic:
---------------------
assertLessThan failed.
--> The value must be less than the maximum value.

Actual double:
         2.747801985947262e-13
Maximum Value (Exclusive):
         2.000000000000000e-14

------------------
Stack Information:
------------------
In /home/ob25/code/mpostat-matlab/testing/utilTests/RCanTest.m (RCanTest.testTracePreservation) at 63

Port some functions to C/C++ and interface through MEX

MATLAB in principle allows one to call Fortran/C/C++ code through it's MEX functions. We already do this to call PRIMME! Some of the functions rely heavily on for-loops, which ought to be faster in C/C++, so consider porting them, and use profiling to confirm speedup. Profiling reveals the following principle candidates for porting:

  • EffLSparse
  • GrowRight
  • GrowLeft
  • MPOHermProd

GrowLeft/GrowRight are likely the easiest to target initially as they do not use sparse matrices.

Refactor to OO

Structs (classes in MATLAB) could be used to define Matrix Product States instead of Cell arrays. This may or may not be more efficient. A greater advantage may be found if it means that the code can be compiled by MATLAB to C (there is no equivalent available for cell arrays in MATLAB's built-in C exporter).

Calculation does not end when solution is getting worse

When too low a matrix dimension is used the eigenvalues may actually move further away from 0 on each iteration. If this is the case the calculation should be stopped. This should be applied irrespective of convergence.

  • A check should be made that the solution is moving closer to zero, and the calculation stopped if it is not
  • Unit test for Stationary function should be extended to test that this does in fact happen

Implement warm-up routine

It can help to start with a low dimension approximation and to iteratively increase the matrix dimension and decrease the convergence threshold, as in the work of Mascarenhas, Flayac, and Savona.

  • Write control function for warm-up approach
  • Write unit test for warm-up control function
  • Extend validation tests to include validation of warm-up approach

Add pseudo-Hermitian variant

New variant will attempt to solve direct problem, and if that fails will try to solve the Hermitian product of the effective Liouvillian instead -- this is not a 'proper' technique but may yield useful results nevertheless.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.