Skip to main content
QUICK REVIEW

[论文解读] PyQUBO: Python Library for Mapping Combinatorial Optimization Problems to QUBO Form

Mashiyat Zaman, Kôtarô Tanahashi|arXiv (Cornell University)|Mar 2, 2021
Quantum Computing Algorithms and Architecture参考文献 27被引用 7
一句话总结

PyQUBO 是一个开源的 Python 库,可高效地将复杂的组合优化问题映射为适合在 Ising 机器(包括量子退火器)上执行的二次无约束二值优化(QUBO)和伊辛模型格式。该库的 C++ 优化后端实现了表达式构建的 O(n) 时间复杂度,显著优于纯 Python 和 SymPy 实现,使其适用于大规模问题。

ABSTRACT

We present PyQUBO, an open-source, Python library for constructing quadratic unconstrained binary optimizations (QUBOs) from the objective functions and the constraints of optimization problems. PyQUBO enables users to prepare QUBOs or Ising models for various combinatorial optimization problems with ease thanks to the abstraction of expressions and the extensibility of the program. QUBOs and Ising models formulated using PyQUBO are solvable by Ising machines, including quantum annealing machines. We introduce the features of PyQUBO with applications in the number partitioning problem, knapsack problem, graph coloring problem, and integer factorization using a binary multiplier. Moreover, we demonstrate how PyQUBO can be applied to production-scale problems through integration with quantum annealing machines. Through its flexibility and ease of use, PyQUBO has the potential to make quantum annealing a more practical tool among researchers.

研究动机与目标

  • 解决为复杂组合优化问题手动构建 QUBO 和伊辛哈密顿量的挑战。
  • 提供一种高层级、可读性强且可扩展的 Python 接口,用于构建 QUBO 和伊辛模型。
  • 通过基于 C++ 的实现,提升大规模优化问题的性能与可扩展性。
  • 支持与真实 Ising 机器(包括 D-Wave 量子退火系统)的集成。
  • 使研究人员能够通过自动约束验证和参数调优,快速原型设计并调试复杂的优化问题。

提出的方法

  • PyQUBO 使用高层级 Python 类抽象数学表达式和约束,实现 QUBO 和伊辛哈密顿量的直观构建。
  • 支持整数和离散变量的二进制变量编码,可将非二进制问题转换为 QUBO 形式。
  • 该库在 C++ 后端中采用基于二叉树的内部表达式表示,实现高效且无需复制的构建,时间复杂度为 O(n)。
  • 提供内置方法,通过惩罚项实现约束强制,确保解的可行性。
  • PyQUBO 与 D-Wave Ocean SDK 集成,支持直接导出为 QUBO 矩阵,用于 D-Wave Advantage 量子退火硬件。
  • 该库包含高级调试功能,如模型验证和复杂问题实例的参数调优。
Figure 2: A summary of logical gate circuit elements and their truth tables.
Figure 2: A summary of logical gate circuit elements and their truth tables.

实验结果

研究问题

  • RQ1如何通过高层级编程接口系统且高效地将组合优化问题映射为 QUBO 和伊辛模型格式?
  • RQ2与纯 Python 或符号计算库(如 SymPy)相比,基于 C++ 的优化后端在构建大规模 QUBO 表达式时具有哪些性能优势?
  • RQ3当与量子退火硬件集成时,PyQUBO 在真实世界、生产规模的优化问题上能实现多大程度的可扩展性?
  • RQ4PyQUBO 的内部数据结构(如二叉树与有序数组)对大规模哈密顿量的内存使用和构建时间有何影响?
  • RQ5PyQUBO 能否降低研究人员在不同应用领域中使用 Ising 机器时的开发与调试开销?

主要发现

  • PyQUBO 的基于 C++ 的实现(Array(C++))在表达式构建中达到 O(n) 时间复杂度,优于纯 Python 和 SymPy,后者因在添加项时复制列表而表现出 O(n²) 复杂度。
  • 对于大规模问题(如高 QUBO 矩阵密度的图划分和旅行商问题),PyQUBO(C++)的内存使用量和运行时间显著低于 SymPy 和基于 Python 的 PyQUBO。
  • PyQUBO 中的 Array(C++) 实现性能优于 Set(C++) 变体,因其更高效的结构管理,具有更低的内存占用和更快的编译时间。
  • PyQUBO 有效支持了真实世界问题的建模与求解,包括数字划分、0-1 背包问题、图着色问题以及使用二进制乘法器的整数分解问题。
  • 与 D-Wave Ocean SDK 及 D-Wave Advantage 量子退火系统的集成,证明了 PyQUBO 在生产规模优化工作流中的实际应用价值。
  • 基准测试确认,PyQUBO 的性能可随问题规模有效扩展,适用于复杂的大规模组合优化任务。
Figure 3: Diagram for a 3-bit binary multiplier. The arrows labeled $C$ and $S$ refer to the sum and carry of the individual half- and full-adders (labeled HA and FA). The $b_{m}a_{n}$ labels represent the $m$ -th and $n$ -th digit binaries joined by an AND gate.
Figure 3: Diagram for a 3-bit binary multiplier. The arrows labeled $C$ and $S$ refer to the sum and carry of the individual half- and full-adders (labeled HA and FA). The $b_{m}a_{n}$ labels represent the $m$ -th and $n$ -th digit binaries joined by an AND gate.

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。