# rudolfovoorg/parallel_biqbin_maxcut architecture

> Architecture diagram of the GitHub repository rudolfovoorg/parallel_biqbin_maxcut, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rudolfovoorg/parallel_biqbin_maxcut
- Repository: https://github.com/rudolfovoorg/parallel_biqbin_maxcut

## Overview

BiqBin is a parallel branch-and-bound solver for Max-Cut and unconstrained binary quadratic (QUBO) problems, with a placeholder general-BQP wrapper. The main user workflow is to select a problem format, parse and normalize an instance, invoke the solver under MPI, and serialize a solution. The native solver also exposes heuristic, bounding, and cutting-plane capabilities; QPLIB support is implemented through a dedicated reader and model components. Edges are limited to README statements, excerpted calls, or SOURCE INDEX references; some native and optional-integration wiring is therefore omitted or marked unverified.

Main entry points: [`biqbin/argparsers.py`](https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin/argparsers.py) (Argument parsing), [`biqbin/biqbin_base.py`](https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin/biqbin_base.py) (Solver facade), [`biqbin_heuristic.py`](https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin_heuristic.py) (Heuristic CLI), [`biqbin/data_parsers.py`](https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin/data_parsers.py) (Input parsers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_python_api["Python API"]
  node_maxcut_cli["Max-Cut CLI<br/>[biqbin_maxcut.py]"]
  node_qubo_cli["QUBO CLI<br/>[biqbin_qubo.py]"]
  node_heuristic_cli["Heuristic CLI"]
  node_bqp_cli["BQP CLI<br/>[biqbin_bqp.py]"]
  node_arguments["Argument parsing<br/>[argparsers.py]"]
  node_problem_models["Problem and solution models<br/>[biqbin_base.py]"]
  node_solver_facade["Solver facade<br/>[biqbin_base.py]"]
end

subgraph group_formats["Problem formats"]
  node_input_parsers["Input parsers<br/>[data_parsers.py]"]
  node_output_writers["Solution writers<br/>[data_parsers.py]"]
  node_shared_utilities["Matrix and data utilities<br/>[utils.py]"]
end

subgraph group_native["Native solver"]
  node_native_entry["MPI entry and dispatch<br/>[main.c]"]
  node_native_api["Native solver API<br/>[biqbin.h]"]
  node_branch_bound["Branch and bound<br/>[bab_functions.c]"]
  node_bounding["SDP bounding<br/>[bounding.c]"]
  node_cutting_planes["Cutting planes<br/>[cutting_planes.c]"]
  node_bundle["Bundle optimization<br/>[bundle.c]"]
  node_heuristics["Heuristics<br/>[heuristic.c]"]
  node_cpp_wrapper["C++ solver wrapper<br/>[wrapper.cpp]"]
end

subgraph group_qplib["QPLIB model"]
  node_qplib_reader["QPLIB reader<br/>[reader.py]"]
  node_qplib_problem["QPLIB problem<br/>[prob.py]"]
  node_qplib_objective["Objective evaluators<br/>[obj.py]"]
  node_qplib_constraints["Constraint evaluators<br/>[cons.py]"]
  node_qplib_matrix["Lower matrix<br/>[lower_mat.py]"]
end

node_user(("Problem user"))
node_external_sampler["D-Wave sampler"]

node_user -->|"runs"| node_maxcut_cli
node_user -->|"runs"| node_qubo_cli
node_user -->|"runs"| node_heuristic_cli
node_user -->|"runs"| node_bqp_cli
node_maxcut_cli -->|"parses options"| node_arguments
node_qubo_cli -->|"parses options"| node_arguments
node_heuristic_cli -->|"parses options"| node_arguments
node_bqp_cli -->|"parses options"| node_arguments
node_arguments -->|"selects format"| node_input_parsers
node_input_parsers -->|"creates problems"| node_problem_models
node_input_parsers -->|"reads QPLIB"| node_qplib_reader
node_problem_models -->|"validates matrices"| node_shared_utilities
node_solver_facade -.->|"invokes native solver"| node_native_entry
node_solver_facade -->|"accepts problem"| node_problem_models
node_solver_facade -.->|"returns solution"| node_output_writers
node_output_writers -->|"serializes data"| node_shared_utilities
node_native_entry -->|"uses declarations"| node_native_api
node_native_entry -->|"initializes search"| node_branch_bound
node_branch_bound -.->|"computes bounds"| node_bounding
node_branch_bound -.->|"runs heuristics"| node_heuristics
node_bounding -.->|"uses cuts"| node_cutting_planes
node_bounding -.->|"optimizes bound"| node_bundle
node_heuristics -.->|"calls wrapper"| node_cpp_wrapper
node_qplib_reader -->|"constructs problem"| node_qplib_problem
node_qplib_problem -->|"evaluates objective"| node_qplib_objective
node_qplib_problem -->|"evaluates constraints"| node_qplib_constraints
node_qplib_objective -->|"uses matrix"| node_qplib_matrix
node_qplib_constraints -->|"uses matrix"| node_qplib_matrix
node_heuristic_cli -.->|"supports sampler"| node_external_sampler

click node_maxcut_cli "https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin_maxcut.py"
click node_qubo_cli "https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin_qubo.py"
click node_heuristic_cli "https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin_heuristic.py"
click node_bqp_cli "https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin_bqp.py"
click node_arguments "https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin/argparsers.py"
click node_problem_models "https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin/biqbin_base.py"
click node_solver_facade "https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin/biqbin_base.py"
click node_input_parsers "https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin/data_parsers.py"
click node_output_writers "https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin/data_parsers.py"
click node_shared_utilities "https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin/utils.py"
click node_qplib_reader "https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin/external/pyqplib/reader.py"
click node_qplib_problem "https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin/external/pyqplib/prob.py"
click node_qplib_objective "https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin/external/pyqplib/obj.py"
click node_qplib_constraints "https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin/external/pyqplib/cons.py"
click node_qplib_matrix "https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin/external/pyqplib/lower_mat.py"
click node_native_entry "https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/src/main.c"
click node_native_api "https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/src/biqbin.h"
click node_branch_bound "https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/src/bab_functions.c"
click node_bounding "https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/src/bounding.c"
click node_cutting_planes "https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/src/cutting_planes.c"
click node_bundle "https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/src/bundle.c"
click node_heuristics "https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/src/heuristic.c"
click node_cpp_wrapper "https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/src/wrapper.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_maxcut_cli,node_qubo_cli,node_heuristic_cli,node_bqp_cli,node_arguments,node_problem_models,node_solver_facade,node_user toneBlue
class node_input_parsers,node_output_writers,node_shared_utilities toneAmber
class node_native_entry,node_native_api,node_branch_bound,node_bounding,node_cutting_planes,node_bundle,node_heuristics,node_cpp_wrapper toneMint
class node_qplib_reader,node_qplib_problem,node_qplib_objective,node_qplib_constraints,node_qplib_matrix toneRose
class node_external_sampler toneIndigo
```

## Components

### Python API

- [Max-Cut CLI](https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin_maxcut.py): `biqbin_maxcut.py`
- [QUBO CLI](https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin_qubo.py): `biqbin_qubo.py`
- [Heuristic CLI](https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin_heuristic.py): `biqbin_heuristic.py`
- [BQP CLI](https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin_bqp.py): `biqbin_bqp.py`
- [Argument parsing](https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin/argparsers.py): `biqbin/argparsers.py`
- [Problem and solution models](https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin/biqbin_base.py): `biqbin/biqbin_base.py`
- [Solver facade](https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin/biqbin_base.py): `biqbin/biqbin_base.py`

### Problem formats

- [Input parsers](https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin/data_parsers.py): `biqbin/data_parsers.py`
- [Solution writers](https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin/data_parsers.py): `biqbin/data_parsers.py`
- [Matrix and data utilities](https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin/utils.py): `biqbin/utils.py`

### Native solver

- [MPI entry and dispatch](https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/src/main.c): `src/main.c`
- [Native solver API](https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/src/biqbin.h): `src/biqbin.h`
- [Branch and bound](https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/src/bab_functions.c): `src/bab_functions.c`
- [SDP bounding](https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/src/bounding.c): `src/bounding.c`
- [Cutting planes](https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/src/cutting_planes.c): `src/cutting_planes.c`
- [Bundle optimization](https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/src/bundle.c): `src/bundle.c`
- [Heuristics](https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/src/heuristic.c): `src/heuristic.c`
- [C++ solver wrapper](https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/src/wrapper.cpp): `src/wrapper.cpp`

### QPLIB model

- [QPLIB reader](https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin/external/pyqplib/reader.py): `biqbin/external/pyqplib/reader.py`
- [QPLIB problem](https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin/external/pyqplib/prob.py): `biqbin/external/pyqplib/prob.py`
- [Objective evaluators](https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin/external/pyqplib/obj.py): `biqbin/external/pyqplib/obj.py`
- [Constraint evaluators](https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin/external/pyqplib/cons.py): `biqbin/external/pyqplib/cons.py`
- [Lower matrix](https://github.com/rudolfovoorg/parallel_biqbin_maxcut/blob/main/biqbin/external/pyqplib/lower_mat.py): `biqbin/external/pyqplib/lower_mat.py`

### Other components

- **Problem user**
- **D-Wave sampler**

## Connections

- Problem user → Max-Cut CLI: runs (evidence: `README.md`)
- Problem user → QUBO CLI: runs (evidence: `README.md`)
- Problem user → Heuristic CLI: runs (evidence: `README.md`)
- Problem user → BQP CLI: runs (evidence: `README.md`)
- Max-Cut CLI → Argument parsing: parses options (evidence: `biqbin_maxcut.py`)
- QUBO CLI → Argument parsing: parses options (evidence: `biqbin_qubo.py`)
- Heuristic CLI → Argument parsing: parses options (evidence: `biqbin_heuristic.py`)
- BQP CLI → Argument parsing: parses options (evidence: `biqbin_bqp.py`)
- Argument parsing → Input parsers: selects format (evidence: `biqbin/argparsers.py`)
- Input parsers → Problem and solution models: creates problems (evidence: `biqbin/data_parsers.py`)
- Input parsers → QPLIB reader: reads QPLIB (evidence: `biqbin/data_parsers.py`)
- Problem and solution models → Matrix and data utilities: validates matrices (evidence: `biqbin/biqbin_base.py`)
- Solver facade → MPI entry and dispatch: invokes native solver
- Solver facade → Problem and solution models: accepts problem (evidence: `biqbin/biqbin_base.py`)
- Solver facade → Solution writers: returns solution (evidence: `biqbin/data_parsers.py`)
- Solution writers → Matrix and data utilities: serializes data (evidence: `biqbin/data_parsers.py`)
- MPI entry and dispatch → Native solver API: uses declarations (evidence: `src/main.c`)
- MPI entry and dispatch → Branch and bound: initializes search (evidence: `src/main.c`)
- Branch and bound → SDP bounding: computes bounds
- Branch and bound → Heuristics: runs heuristics
- SDP bounding → Cutting planes: uses cuts
- SDP bounding → Bundle optimization: optimizes bound
- Heuristics → C++ solver wrapper: calls wrapper
- QPLIB reader → QPLIB problem: constructs problem (evidence: `biqbin/external/pyqplib/reader.py`)
- QPLIB problem → Objective evaluators: evaluates objective (evidence: `biqbin/external/pyqplib/prob.py`)
- QPLIB problem → Constraint evaluators: evaluates constraints (evidence: `biqbin/external/pyqplib/prob.py`)
- Objective evaluators → Lower matrix: uses matrix (evidence: `biqbin/external/pyqplib/obj.py`)
- Constraint evaluators → Lower matrix: uses matrix (evidence: `biqbin/external/pyqplib/cons.py`)
- Heuristic CLI → D-Wave sampler: supports sampler (evidence: `README.md`)
