A class containing basic methods for the decomposition process.
More...
#include <NN.h>
|
void | create_randomized_parameters (int num_of_parameters, int qbit_num, int levels, Matrix_real ¶meters, matrix_base< int8_t > &nontrivial_adaptive_layers) |
| Call to construct random parameter, with limited number of non-trivial adaptive layers. More...
|
|
void | get_nn_chanels (const Matrix &Umtx, const int &target_qbit, Matrix_real &chanels) |
| call retrieve the channels for the neural network associated with a single unitary More...
|
|
void | get_nn_chanels (int qbit_num, const Matrix &Umtx, Matrix_real &chanels) |
| call retrieve the channels for the neural network associated with a single unitary More...
|
|
void | get_nn_chanels (int qbit_num, int levels, Matrix_real &chanels, matrix_base< int8_t > &nontrivial_adaptive_layers) |
| call retrieve the channels for the neural network associated with a single, randomly generated unitary More...
|
|
void | get_nn_chanels (int qbit_num, int levels, int samples_num, Matrix_real &chanels, matrix_base< int8_t > &nontrivial_adaptive_layers) |
| call retrieve the channels for the neural network associated with a single, randomly generated unitary More...
|
|
void | get_nn_chanels_from_kernel (Matrix &kernel_up, Matrix &kernel_down, Matrix_real &chanels) |
| call retrieve the channels for the neural network associated with a single 2x2 kernel More...
|
|
| NN () |
| Nullary constructor of the class. More...
|
|
| NN (std::vector< matrix_base< int >> topology_in) |
| Constructor of the class. More...
|
|
|
int | tt |
| number of gate blocks used in one shot of the optimization process More...
|
|
|
std::mt19937 | gen |
| Standard mersenne_twister_engine seeded with rd() More...
|
|
int | num_threads |
| Store the number of OpenMP threads. (During the calculations OpenMP multithreading is turned off.) More...
|
|
std::random_device | rd |
| Will be used to obtain a seed for the random number engine. More...
|
|
std::vector< matrix_base< int > > | topology |
| connectivity between the wubits More...
|
|
A class containing basic methods for the decomposition process.
Definition at line 61 of file NN.h.
◆ NN() [1/2]
Nullary constructor of the class.
- Returns
- An instance of the class
Definition at line 34 of file NN.cpp.
◆ NN() [2/2]
Constructor of the class.
- Parameters
-
The | list of conenctions between the qubits |
- Returns
- An instance of the class
Definition at line 56 of file NN.cpp.
◆ create_randomized_parameters()
void NN::create_randomized_parameters |
( |
int |
num_of_parameters, |
|
|
int |
qbit_num, |
|
|
int |
levels, |
|
|
Matrix_real & |
parameters, |
|
|
matrix_base< int8_t > & |
nontrivial_adaptive_layers |
|
) |
| |
Call to construct random parameter, with limited number of non-trivial adaptive layers.
- Parameters
-
num_of_parameters | The number of parameters |
Definition at line 82 of file NN.cpp.
◆ get_nn_chanels() [1/4]
call retrieve the channels for the neural network associated with a single unitary
- Parameters
-
Umtx | A unitary of dimension dim x dim, where dim is a power of 2. |
target_qbit | The target qubit for which the chanels are calculated |
chanels | output array containing the chanels prepared for th eneural network. The array has dimensions [ dim/2, dim/2, 4 ] (dimension "4" stands for theta_up, phi, theta_down , lambda) |
Definition at line 222 of file NN.cpp.
◆ get_nn_chanels() [2/4]
call retrieve the channels for the neural network associated with a single unitary
- Parameters
-
Umtx | A unitary of dimension dim x dim, where dim is a power of 2. |
chanels | output array containing the chanels prepared for th eneural network. The array has dimensions [ dim/2, dim/2, 4 ] (dimension "4" stands for theta_up, phi, theta_down , lambda) |
qbit_num | Th number of qubites |
Umtx | A unitary of dimension dim x dim, where dim is a power of 2. |
chanels | output array containing the chanels prepared for th eneural network. The array has dimensions [ dim/2, dim/2, 4 ] (dimension "4" stands for theta_up, phi, theta_down , lambda) |
Definition at line 306 of file NN.cpp.
◆ get_nn_chanels() [3/4]
call retrieve the channels for the neural network associated with a single, randomly generated unitary
- Parameters
-
qbit_num | The number of qubits |
levels | The number of adaptive levels to be randomly constructed |
chanles | output argument to return with an array containing the chanels prepared for the neural network. The array has dimensions [ dim/2, dim/2, 4 ] (dimension "4" stands for theta_up, phi, theta_down , lambda) |
parameters | output argument of the randomly created parameters |
Definition at line 402 of file NN.cpp.
◆ get_nn_chanels() [4/4]
call retrieve the channels for the neural network associated with a single, randomly generated unitary
- Parameters
-
qbit_num | The number of qubits |
levels | The number of adaptive levels to be randomly constructed |
samples_num | The number of samples |
chanles | output argument to return with an array containing the chanels prepared for the neural network. The array has dimensions [ samples_num, dim/2, dim/2, 4 ] (dimension "4" stands for theta_up, phi, theta_down , lambda) |
parameters | output argument of the randomly created parameters |
Definition at line 463 of file NN.cpp.
◆ get_nn_chanels_from_kernel()
call retrieve the channels for the neural network associated with a single 2x2 kernel
- Returns
- return with an 1x4 array containing the chanels prepared for the neural network. (dimension 4 stands for theta_up, phi, theta_down , lambda)
Definition at line 160 of file NN.cpp.
◆ gen
Standard mersenne_twister_engine seeded with rd()
Definition at line 75 of file NN.h.
◆ num_threads
Store the number of OpenMP threads. (During the calculations OpenMP multithreading is turned off.)
Definition at line 79 of file NN.h.
◆ rd
std::random_device NN::rd |
|
protected |
Will be used to obtain a seed for the random number engine.
Definition at line 73 of file NN.h.
◆ topology
connectivity between the wubits
Definition at line 77 of file NN.h.
◆ tt
number of gate blocks used in one shot of the optimization process
Definition at line 67 of file NN.h.
The documentation for this class was generated from the following files: