Skip to content
/ eqdr Public

EQDR: Elite Quantum Diffusion Recombination. M.Sc. Computer Science thesis: Adapting Grover's Quantum Search algorithm to multimodal fitness based optimization problems

Notifications You must be signed in to change notification settings

tratteo/eqdr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elite Quantum Diffusion Recombination

Adapting Grover's Quantum Search algorithm to fitness based multimodal optimization problems. Devising a novel recombination procedure for a hybrid Quantum Evolutionary Algorithm.

Document: EQDR: an Elite Quantum Diffusion Recombination procedure

Execute

Dependencies

pip install -r requirements.txt

Run example

python run.py <id>

Running custom experiments

# Experiment name
experiment_name = "rastrigin"

# Common parameters
size = 8
fitness = {
    "function": "rastrigin",
    "threshold": 1e-3,
    "target": 0,
}
oracle = {
    "operator": "pattern",
    "expression": "**001000",
}
lmbd = 1.2

# Run experiments, each identified by its instance_name. Results will be saved in > results/<experiment_name>_<instance_name>.csv

# Read the eqdr.pdf thesis file to know the different parameters

execute_eqdr_experiment(
    experiment_name,
    [
        {
            "name": "eqdr_rcd",
            "config": {
                "size": size,
                "lambda": lmbd,
                "iterations": iterations,
                "fitness": fitness,
                "oracle": oracle,
                "recombination": {
                    "enabled": True,
                    "k_out": 12,
                    "prob": 0.6,
                    "gamma": {
                        "function": "gaussian",
                        "alpha": 0.5,
                    },
                    "type": "contribution",
                    "mutate_prob": 0.3,
                    "mutate_factor": 0.2,
                },
            },
        },
        {
            "name": "eqdr_spd",
            "config": {
                "size": size,
                "lambda": lmbd,
                "iterations": iterations,
                "fitness": fitness,
                "oracle": oracle,
                "recombination": {
                    "k_out": 12,
                    "prob": 0.6,
                    "type": "proportional",
                    "uniform_accuracy": 0.75,
                    "enabled": True,
                    "mutate_prob": 0.3,
                    "mutate_factor": 0.2,
                },
            },
        },
        {
            "name": "eqdr_ud",
            "config": {
                "size": size,
                "lambda": lmbd,
                "iterations": iterations,
                "fitness": fitness,
                "oracle": oracle,
                "recombination": {
                    "k_out": 12,
                    "prob": 0.6,
                    "uniform_accuracy": 0.75,
                    "type": "uniform",
                    "enabled": True,
                    "mutate_prob": 0.3,
                    "mutate_factor": 0.2,
                },
            },
        },
    ],
)

About

EQDR: Elite Quantum Diffusion Recombination. M.Sc. Computer Science thesis: Adapting Grover's Quantum Search algorithm to multimodal fitness based optimization problems

Topics

Resources

Stars

Watchers

Forks

Languages