-
Notifications
You must be signed in to change notification settings - Fork 0
Software overview
This document should give you an idea of the structure of the repo: What files are more important and what are boilerplate.
LibMark is the client side package used to talk to the WebMark server. LibMark will hopefully be included in Tequila at some point, so all users would have easy access to it. Currently the code is in the project folder's quantmark-subfolder.
The purpose of the software is to collect information on experiments run on different quantum computers. Both the results and setups are of interest, so both need to be collected. The data structures used by Tequila and SciPy, for example, are complex and probably depend on the version of the package. Therefore the information needs to be dissected at the client side where the libraries are available. This makes LibMark2 quite lengthy and complex looking.
There are three calls the client needs to make:
- Create a new instance and initialize it with data known at this point
- Add a new sets of data to the structure by calling add_run (maybe inside a loop)
- Push the structure to the server by calling push
Most of the files were created by Django Rest Framework. Only the files containing significant changes are described here.
Django's core settings file. Plenty of interesting settings pertaining to deployment.
The URL dispatcher. Very simple, but important file.
This file is not used for the time being. Has to do with Django Rest Framework's serializing, which could prove useful if implemented.
Initialization functions for the data structures. They can't be class functions because they reference each other causing circular referrals.
Standard Django view functions. Currently:
- Home view lists the entries in the database
- Detail view shows a single entry
- result_list is the api endpoint which accepts posts
Contains the data structures stored in the database. A single experiment consists of one Result object, which has a one-to-many relationship to Runs. Runs is an abstract class, which is inherited to subclasses per VQE optimizer. The optimizers hold very different data.
Django requires that the models have to be imported to the init file.
Django HTML templates. restframework/base.html is the common ancestor for all HTML views.
Simple tests for regression testing. Testing Django routines would require mocking major parts of Django and/or the database.