QHyper.problems#

This module contains implementaions of different problems. Problems are defined using Polynomial module. No problem is imported by deafult to reduce number of dependencies. To use any problem you can import it directly like

from QHyper.problems.knapsack import KnapsackProblem

or use function Problems.get() with the name of the problem. Any problem that is in directory ‘QHyper/custom’ or ‘custom’ will be also available in this function.

Interface

Problem()

Interface for different combinatorial optimization problems

Available problems

knapsack.KnapsackProblem(max_weight[, ...])

Objective function and constraints for the knapsack problem

tsp.TravelingSalesmanProblem(number_of_cities)

Class defining objective function and constraints for TSP

maxcut.MaxCutProblem(edges)

MaxCut problem

workflow_scheduling.WorkflowSchedulingProblem(...)

Workflow Scheduling Problem

community_detection.CommunityDetectionProblem(...)

Problem class instance - objective function for network community detection

Additional functions

class Problems[source]#
static get(name)[source]#

Get problem class by name. Used for creating Problem objects from config.

The problem will be available by the ‘name’ attribute if defined or by the class name. Letters case doesn’t matter.

Return type:

Type[Problem]