-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
When I run this code I could find the optimal solution with MIS solver v=0.2.3, now with the version 0.3.0 I cannot find any good solution.
from mis import MISSolver, MISInstance, SolverConfig, BackendConfig, BackendType, MethodType
import networkx as nx
import my_functions as mf
my_cloud_credentials = mf.get_cloud_credentials("my_cloud_credentials.txt")
G = nx.Graph([(4, 9), (4, 10), (5, 6), (5, 7), (6, 7), (9, 10)])
G.add_nodes_from([1,2,3,8])
config = SolverConfig(
backend = BackendConfig(
backend=BackendType.QUTIP,#
username=my_cloud_credentials["username"],
project_id=my_cloud_credentials["project_id"],
password=my_cloud_credentials["password"]
),
method = MethodType.EAGER,
max_iterations=1,
preprocessor=None,
postprocessor=None
)
instance = MISInstance(G)
# Run the solver
solver = MISSolver(instance, config)
solutions = solver.solve()
# Display results
print("MIS solution:", solutions[0].nodes)
print("Solution frequency:", solutions[0].frequency)
solutions[0].draw()
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels