#include <Python.h>
#include <numpy/arrayobject.h>
#include "structmember.h"
#include <stdio.h>
#include "NN.h"
#include "numpy_interface.h"
Go to the source code of this file.
◆ PY_SSIZE_T_CLEAN
◆ create_NN()
Creates an instance of class NN and return with a pointer pointing to the class instance (C++ linking is needed)
- Returns
- Return with a void pointer pointing to an instance of NN class.
Definition at line 59 of file qgd_nn_Wrapper.cpp.
◆ PyInit_qgd_nn_Wrapper()
PyMODINIT_FUNC PyInit_qgd_nn_Wrapper |
( |
void |
| ) |
|
◆ qgd_nn_Wrapper_dealloc()
◆ qgd_nn_Wrapper_get_nn_chanels()
static PyObject* qgd_nn_Wrapper_get_nn_chanels |
( |
qgd_nn_Wrapper * |
self, |
|
|
PyObject * |
args, |
|
|
PyObject * |
kwds |
|
) |
| |
|
static |
Wrapper function to call the start_decomposition method of C++ class N_Qubit_Decomposition.
- Parameters
-
self | A pointer pointing to an instance of the class qgd_nn_Wrapper. |
args | A tuple of the input arguments: finalize_decomp (bool), prepare_export (bool) |
kwds | A tuple of keywords |
Definition at line 163 of file qgd_nn_Wrapper.cpp.
◆ qgd_nn_Wrapper_init()
static int qgd_nn_Wrapper_init |
( |
qgd_nn_Wrapper * |
self, |
|
|
PyObject * |
args, |
|
|
PyObject * |
kwds |
|
) |
| |
|
static |
Method called when a python instance of the class qgd_nn_Wrapper is initialized.
- Parameters
-
self | A pointer pointing to an instance of the class qgd_nn_Wrapper. |
args | A tuple of the input arguments: Umtx (numpy array), qbit_num (integer), optimize_layer_num (bool), initial_guess (string PyObject |
kwds | A tuple of keywords |
Definition at line 131 of file qgd_nn_Wrapper.cpp.
◆ qgd_nn_Wrapper_new()
static PyObject* qgd_nn_Wrapper_new |
( |
PyTypeObject * |
type, |
|
|
PyObject * |
args, |
|
|
PyObject * |
kwds |
|
) |
| |
|
static |
◆ release_NN()
void release_NN |
( |
NN * |
instance | ) |
|
◆ qgd_nn_Wrapper_members
PyMemberDef qgd_nn_Wrapper_members[] |
|
static |
◆ qgd_nn_Wrapper_methods
PyMethodDef qgd_nn_Wrapper_methods[] |
|
static |
Initial value:= {
"Method to retrieve the data chanels for the neural network."
},
{NULL}
}
static PyObject * qgd_nn_Wrapper_get_nn_chanels(qgd_nn_Wrapper *self, PyObject *args, PyObject *kwds)
Wrapper function to call the start_decomposition method of C++ class N_Qubit_Decomposition.
Structure containing metadata about the methods of class qgd_nn_Wrapper.
Definition at line 267 of file qgd_nn_Wrapper.cpp.
◆ qgd_nn_Wrapper_Module
PyModuleDef qgd_nn_Wrapper_Module |
|
static |
Initial value:= {
PyModuleDef_HEAD_INIT,
"qgd_nn_Wrapper",
"Python binding for the neural network component of SQUANDER",
-1,
}
Structure containing metadata about the module.
Definition at line 349 of file qgd_nn_Wrapper.cpp.
◆ qgd_nn_Wrapper_Type