Evolution.py#

Main evolution loop orchestrator.

Wires together the protocol implementations (population generation, circuit factory, fitness evaluation, reproduction) and runs the generational evolution loop with async hardware measurements.

Warning

This module is marked as NOT CURRENT VERSION. See TrivialEvolution for the reference implementation currently used for testing.

class Evolution.Evolution(gen_data_factory: GenDataFactory, circuit_factory: CircuitFactory, reproduce: Reproducer, gen_init_populations: GenerateInitialPopulations, eval_population_fitness: EvaluatePopulationFitness, generate_measurements: GenerateMeasurements, hardware: Hardware, plot_data_recorder: PlotDataRecorder)[source]#

NOT CURRENT VERSION, SHOULD BE REVISED USING TRIVIAL_EVOLUTION This class utilizes the protocols defined to run experiments There is only one implementation of Evolution needed If there are any desired features that are not supported in this version of the class then this class should be modified to support them and preserve existing behavior

__init__(gen_data_factory: GenDataFactory, circuit_factory: CircuitFactory, reproduce: Reproducer, gen_init_populations: GenerateInitialPopulations, eval_population_fitness: EvaluatePopulationFitness, generate_measurements: GenerateMeasurements, hardware: Hardware, plot_data_recorder: PlotDataRecorder)[source]#

Initializes the Evolution object with all of the protocols. Does not execute any protocols

run()[source]#

Runs the desired experiment, based on the protocols provided