LILY-QML / LLY-DML

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.
https://www.lilyqml.de
2 stars 5 forks source link

Runner - Circuit - DML #14

Closed xleonplayz closed 3 weeks ago

xleonplayz commented 2 months ago

Disclaimer

The function is partially implemented and is currently undergoing revisions. The method's final structure should adhere to the provided pattern, but adjustments need to be made to ensure it is fully functional. It is important to build the method in a robust and stable manner, incorporating the necessary changes to achieve this goal.

Method: runner

Description:

The runner method executes a quantum circuit based on a specified number of shots (measurements). Shots determine how many times the circuit is measured to obtain statistically reliable results. The method accepts the number of shots as an integer and uses it to run the circuit on a quantum simulator or backend.

Input Parameters:

Return Value:

Workflow:

  1. Circuit Initialization: The quantum circuit is prepared and set up with measurement gates.
  2. Simulation Run: The circuit is executed with the specified number of shots (shots) on a simulator or quantum backend.
  3. Result Return: The measurement results are collected and returned in an appropriate structure, reflecting the frequency of the observed states.

Example Usage:

The method can be called as follows:

results = my_circuit.runner(shots=1024)

Here, results would return a dictionary, for example, mapping bitstrings to their respective frequencies.