Skip to main content

A Python library designed to help users design classical- and quantum-driven solutions for the Maximum Independent Set (MIS) problem.

Project description

PyPI version Tests Coverage

Maximum independent set

The Maximum Independent Set problem (MIS) is a standard and widespread graph problem in scheduling, network theory, error correction, and even in the quantum sector as part of more general optimization algorithms (e.g., QUBO formulations) or as a benchmark on quantum annealers or neutral atom devices.

There is currently no known polynomial-time algorithm for general graphs running on classical (non-quantum) devices, which means that, in practice, finding an exact solution for large graphs is generally not possible due to time and hardware limitations. For this reason, most applications of MIS must satisfy themselves with finding approximate solutions. As it turns out, in some cases, even finding approximate solutions is considered hard. For these reasons, there is high interest in solving MIS on quantum devices.

The maximum-independent-set library provides the means to achieve this: it compiles an MIS into a form suited for execution on existing analog quantum hardware, such as the commercial QPUs produced by Pasqal. It is designed for scientists and engineers working on optimization problems—no quantum computing knowledge required and no quantum computer needed for testing.

This library lets users treat the solver as a black box: feed in a graph of interest, get back an optimal (or near-optimal) independent set. For more advanced users, it offers tools to fine-tune algorithmic strategies, leverage quantum hardware via the Pasqal cloud, or even experiment with custom quantum sequences and processing pipelines.

Users setting their first steps into quantum computing will learn how to implement the core algorithm in a few simple steps and run it using the Pasqal Neutral Atom QPU. More experienced users will find this library to provide the right environment to explore new ideas - both in terms of methodologies and data domain - while always interacting with a simple and intuitive QPU interface.

This library is actively used to solve real-world projects. We have applied it to optimize the layout and costs of 5G network deployments, schedule satellite missions with Thales, and improve charging network planning for electric vehicles with EDF. These case studies highlight how quantum-based MIS solutions can tackle complex challenges across telecom, aerospace and energy sectors.

Installation

Using hatch, uv or any pyproject-compatible Python manager

Edit file pyproject.toml to add the line

  "maximum-independent-set"

to the list of dependencies.

Using pip or pipx

To install the pipy package using pip or pipx

  1. Create a venv if that's not done yet
$ python -m venv venv
  1. Enter the venv
$ . venv/bin/activate
  1. Install the package
$ pip install maximum-independent-set
# or
$ pipx install maximum-independent-set

QuickStart

from mis import MISSolver, MISInstance, BackendConfig, SolverConfig
import networkx as nx

# Generate a simple graph (here, a triangle)
graph = nx.Graph()
graph.add_edges_from([(0, 1), (0, 2)])
instance = MISInstance(graph)

# Use a default quantum backend.
config = SolverConfig(backend=BackendConfig())
solver = MISSolver(instance, config)

# Solve the MIS problem.
results = solver.solve()

# Show the results.
print("MIS solutions:", results)
results[0].draw()

Documentation

Documentation

Tutorials.

Full API documentation.

Getting in touch

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

maximum_independent_set-0.3.1.tar.gz (50.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

maximum_independent_set-0.3.1-py3-none-any.whl (58.6 kB view details)

Uploaded Python 3

File details

Details for the file maximum_independent_set-0.3.1.tar.gz.

File metadata

  • Download URL: maximum_independent_set-0.3.1.tar.gz
  • Upload date:
  • Size: 50.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for maximum_independent_set-0.3.1.tar.gz
Algorithm Hash digest
SHA256 6a5e1b63e5861651b19b23fa6ea3c0145e8dd070588a715511cf17545b331857
MD5 4663884d1c960c6d70f543cdb2bbcd0b
BLAKE2b-256 a351fc6a1855de24baf58e1c2b11e39ef51b3e998fc7c7fa0b7baca77ee5fa26

See more details on using hashes here.

Provenance

The following attestation bundles were made for maximum_independent_set-0.3.1.tar.gz:

Publisher: publish.yml on pasqal-io/maximum-independent-set

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file maximum_independent_set-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for maximum_independent_set-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d9f6f22bcb41aad4dc8b5172736b5de6df85b54c52224b3d0a722e11da69a9ee
MD5 8ec11bcb5369ecd20749e5e519702b55
BLAKE2b-256 833dfe3ff473b5ac752dfd3fb31e8fc099c825d26fa34a295b47c220811f5d29

See more details on using hashes here.

Provenance

The following attestation bundles were made for maximum_independent_set-0.3.1-py3-none-any.whl:

Publisher: publish.yml on pasqal-io/maximum-independent-set

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page