LLY-DML is part of the LILY project and is a Quantum Machine Learning model. It uses so-called L-Gates. These gates are Machine Learning gates that modify their state based on an input to map to a desired state of an input.
The get_state() method performs the following steps to determine the most probable state based on the activation matrices:
Instantiate the Circuit Class
An instance of the Circuit class is created.
Read Data
The method executes read_data to load the necessary data.
Iterate Over All Activation Matrices
A loop iterates through all available activation matrices. For each activation matrix, the following sub-steps are performed:
Convert Input Data
The convert_input_data method is called to appropriately convert the input data.
Check Input Data
check_input_data is executed to validate the converted data.
Create Initial Circuit
The initial circuit is created using create_initial_circuit(self).
Perform Measurement
The measure(self, shots) method is called, where the number of shots is defined in the data.json file (e.g., "shots": 1024).
Determine the Most Probable State
After measurement, the method analyzes which state is most likely. This state is flagged and stored in the variable self.flagged_state, including the matrix name and the corresponding state.
State Determination
Overall, the function iterates through all activation matrices and determines the corresponding state for each matrix.
This approach ensures that all activation matrices are systematically processed to accurately determine and store the most probable state.
module/all.py
Method
get_state()
The
get_state()
method performs the following steps to determine the most probable state based on the activation matrices:Instantiate the Circuit Class
Circuit
class is created.Read Data
read_data
to load the necessary data.Iterate Over All Activation Matrices
convert_input_data
method is called to appropriately convert the input data.check_input_data
is executed to validate the converted data.create_initial_circuit(self)
.measure(self, shots)
method is called, where the number ofshots
is defined in thedata.json
file (e.g.,"shots": 1024
).Determine the Most Probable State
self.flagged_state
, including the matrix name and the corresponding state.State Determination
This approach ensures that all activation matrices are systematically processed to accurately determine and store the most probable state.