This code repository contains the code, configs and data used to perform experiments in the accompanying paper. The code is self contained and can be easily extended.
The code can be run using the following command:
python train.py -c [circuit_type] -t [expt_type] --cfg path/to/config.jsonHere:
-
circuit_typerefers to two different types of quantum circuits. They differ in the way data is encoded into the quantum state. We used the circuit type2for all our experiments. -
expt_typerefers to the experiment type to be performed. Choices arequbitandlayer. If the former is selected then the number of layers must be kept constant in the config file and for the latter case the number of qubits must be kept constant.
-
We use a parameter
etathat is set to either 0.3 or 0.01. You may need to adjust this parameter for your own dataset. -
In our experiments we have found the default value of
0.55to be a good choice for our set of datasets. If you're experimenting with your own dataset then a strategy may be to perform a grid search with constant qubits and layers.