Description Usage Arguments Value Examples
View source: R/QuantumMNIST256Classifier.R
Quantum classifier which was proposed by Maria Schuld (2018). Consists of 33 quantum gates with a depth of 19. Takes as input samples with dimensions of 256 and a corresponding list of labels indicating the correct output value of each sample. Will update the parameters of the gates in order to correctly identify one of the digits specified.
1 2 3 4 5 |
data |
matrix containing input training data. Rows are individual samples. There must be 256 columns |
labels |
Vector containing labels of digits. Length must be the same as the number of rows in data |
digit |
Individual digit (0-9) to identify |
eta |
learning rate for parameter updates |
decay |
Multiplier for learning rate after each training iteration. If set to less than 1, the learning rate decays in time |
bsc |
Scaler for the learning rate of the bias. Setting to a low value will result in other parameters updating faster than the bias |
t |
Number of training iterations to perform. Total runs is equal to this value multiplied by the number of samples provided |
tag |
String to attach to name of output files |
pl |
Boolean indicating whether training output should be plotted |
train |
Boolean specifying if network should trained on training data, only false if passing in pretrained model |
validT |
Boolean specifying if the network should be tested on validation data while being trained |
vdata |
Validation data, necessary if validT is set to true in which case network is tested on this data while being trained. Can be set to same as data. |
vlabels |
Validation labels, necessary if validT is set to true in which case network is tested on vdata while being trained. Can be set to same as labels. |
pretrained |
Boolean specifying if a pretrained model is being passed in. If so, alpha, beta, and gamme will be set to intputs, rather than randomized. |
alpha |
alpha values for gates if pretrained is set to TRUE, should be a vector of length 33 |
beta |
beta values for gates if pretrained is set to TRUE, should be a vector of length 33 |
gamma |
gamma values for gates if pretrained is set to TRUE, should be a vector of length 33 |
List containing a list of the 33 gates and the matrix representing the entire circuit of the trained classifier
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.