GeneticConfiguration

public struct GeneticConfiguration

Configuration of a genetic algorithm to evolve a quantum circuit

Public properties

  • Number of gates in an evolved circuits will be between the boundaries specified by depth

    Declaration

    Swift

    public let depth: Range<Int>
  • Maximum number of times a reproduction operation will be applied to increase the number of evolved circuits in a population

    Declaration

    Swift

    public let generationCount: Int
  • Number of evolved circuits produced by a genetic algorithm will be between the boundaries specified by populationSize. The minimum size is the size of the initial population of randomly generated circuits

    Declaration

    Swift

    public let populationSize: Range<Int>
  • A reproduction operation is applied over a sub-set of the entire population of evolved circuits. tournamentSize is the size of this sub-set

    Declaration

    Swift

    public let tournamentSize: Int
  • There are 2 reproduction operations: cross-over and mutation. mutationProbability is the probability of applying the latter on each new generation. It is expected to take a value between 0.0 and 1.0

    Declaration

    Swift

    public let mutationProbability: Double
  • An evolved circuit is evaluated against multiple GeneticUseCase instances. Each evaluation returns a a score, the lowest the score, the better a circuit solves a given GeneticUseCase instance. If the score is below this threshold, the circuit is considered in the right track to solve the use case

    Declaration

    Swift

    public let threshold: Double
  • If the total score of an evolved circuit (i.e. the score considering all GeneticUseCase instances) is below errorProbability, the circuit is considered a solution for the entire problem

    Declaration

    Swift

    public let errorProbability: Double

Public init methods