pyqubo:用于从数学表达式构造QUBO的Python DSL

上传者: 42129300 | 上传时间: 2023-04-16 02:08:51 | 文件大小: 261KB | 文件类型: ZIP
C++
皮库伯 PyQUBO允许您根据灵活的数学表达式轻松创建QUBO或Ising模型。 PyQUBO的一些功能是 基于Python(C ++后端)。 与Ocean SDK完全集成。 () 自动验证约束。 ( ) 用于参数调整的占位符。 ( ) 有关更多详细信息,请参见。 用法示例 创建QUBO 本示例构造一个简单的表达式并将其编译为model 。 通过调用model.to_qubo() ,我们得到结果QUBO。 (此示例解决了集合S = {4,2,7,1}的) >>> from pyqubo import Spin >>> s1, s2, s3, s4 = Spin( " s1 " ), Spin( " s2 " ), Spin( " s3 " ), Spin( " s4 " ) >>> H = ( 4 * s1 + 2 * s2 + 7 * s3 + s4) ** 2 >>> mo

文件下载

资源详情

[{"title":"( 111 个子文件 261KB ) pyqubo:用于从数学表达式构造QUBO的Python DSL","children":[{"title":"make.bat <span style='color:#111;'> 810B </span>","children":null,"spread":false},{"title":"googletest.cmake <span style='color:#111;'> 431B </span>","children":null,"spread":false},{"title":"pybind11.cmake <span style='color:#111;'> 417B </span>","children":null,"spread":false},{"title":"cimod.cmake <span style='color:#111;'> 339B </span>","children":null,"spread":false},{"title":".coveragerc <span style='color:#111;'> 76B </span>","children":null,"spread":false},{"title":"test.cpp <span style='color:#111;'> 14.31KB </span>","children":null,"spread":false},{"title":"pybind_mapping.cpp <span style='color:#111;'> 12.53KB </span>","children":null,"spread":false},{"title":"pyqubotest.cpp <span style='color:#111;'> 8.05KB </span>","children":null,"spread":false},{"title":"poly.cpp <span style='color:#111;'> 5.92KB </span>","children":null,"spread":false},{"title":"express.cpp <span style='color:#111;'> 5.85KB </span>","children":null,"spread":false},{"title":"reduce_order.cpp <span style='color:#111;'> 5.05KB </span>","children":null,"spread":false},{"title":"placeholderpoly.cpp <span style='color:#111;'> 4.61KB </span>","children":null,"spread":false},{"title":"expanded.cpp <span style='color:#111;'> 1.79KB </span>","children":null,"spread":false},{"title":"coeff.cpp <span style='color:#111;'> 1.63KB </span>","children":null,"spread":false},{"title":"encoder.cpp <span style='color:#111;'> 895B </span>","children":null,"spread":false},{"title":"theme_overrides.css <span style='color:#111;'> 337B </span>","children":null,"spread":false},{"title":"Doxyfile <span style='color:#111;'> 109.78KB </span>","children":null,"spread":false},{"title":".gitignore <span style='color:#111;'> 1.72KB </span>","children":null,"spread":false},{"title":".gitignore <span style='color:#111;'> 20B </span>","children":null,"spread":false},{"title":".gitkeep <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"express.h <span style='color:#111;'> 13.56KB </span>","children":null,"spread":false},{"title":"model.h <span style='color:#111;'> 8.90KB </span>","children":null,"spread":false},{"title":"poly.h <span style='color:#111;'> 5.54KB </span>","children":null,"spread":false},{"title":"prod.h <span style='color:#111;'> 5.51KB </span>","children":null,"spread":false},{"title":"coeff.h <span style='color:#111;'> 4.48KB </span>","children":null,"spread":false},{"title":"compiled_qubo.h <span style='color:#111;'> 4.20KB </span>","children":null,"spread":false},{"title":"placeholderpoly.h <span style='color:#111;'> 3.49KB </span>","children":null,"spread":false},{"title":"decoded_solution.h <span style='color:#111;'> 3.46KB </span>","children":null,"spread":false},{"title":"expanded.h <span style='color:#111;'> 3.23KB </span>","children":null,"spread":false},{"title":"coeffprod.h <span style='color:#111;'> 2.74KB </span>","children":null,"spread":false},{"title":"pybase.h <span style='color:#111;'> 1.41KB </span>","children":null,"spread":false},{"title":"array_index.h <span style='color:#111;'> 1.26KB </span>","children":null,"spread":false},{"title":"compiled_sub_h.h <span style='color:#111;'> 1.08KB </span>","children":null,"spread":false},{"title":"encoder.h <span style='color:#111;'> 888B </span>","children":null,"spread":false},{"title":"linkedlist.h <span style='color:#111;'> 344B </span>","children":null,"spread":false},{"title":"utils.h <span style='color:#111;'> 329B </span>","children":null,"spread":false},{"title":"compiled_penalty.h <span style='color:#111;'> 240B </span>","children":null,"spread":false},{"title":"binary_quadratic_model.hpp <span style='color:#111;'> 25.97KB </span>","children":null,"spread":false},{"title":"hash.hpp <span style='color:#111;'> 601B </span>","children":null,"spread":false},{"title":"vartypes.hpp <span style='color:#111;'> 182B </span>","children":null,"spread":false},{"title":"MANIFEST.in <span style='color:#111;'> 18B </span>","children":null,"spread":false},{"title":"graph_partition.ipynb <span style='color:#111;'> 32.63KB </span>","children":null,"spread":false},{"title":"graph_coloring.ipynb <span style='color:#111;'> 27.25KB </span>","children":null,"spread":false},{"title":"TSP.ipynb <span style='color:#111;'> 16.47KB </span>","children":null,"spread":false},{"title":"multiplier.ipynb <span style='color:#111;'> 10.24KB </span>","children":null,"spread":false},{"title":"integer_partition.ipynb <span style='color:#111;'> 1.93KB </span>","children":null,"spread":false},{"title":"LICENSE <span style='color:#111;'> 11.09KB </span>","children":null,"spread":false},{"title":"Makefile <span style='color:#111;'> 675B </span>","children":null,"spread":false},{"title":"Makefile <span style='color:#111;'> 657B </span>","children":null,"spread":false},{"title":"feature_request.md <span style='color:#111;'> 560B </span>","children":null,"spread":false},{"title":"bug_report.md <span style='color:#111;'> 352B </span>","children":null,"spread":false},{"title":"multiplier.png <span style='color:#111;'> 53.60KB </span>","children":null,"spread":false},{"title":"full_adder.png <span style='color:#111;'> 16.41KB </span>","children":null,"spread":false},{"title":"half_adder.png <span style='color:#111;'> 9.15KB </span>","children":null,"spread":false},{"title":"array.py <span style='color:#111;'> 29.24KB </span>","children":null,"spread":false},{"title":"test_model.py <span style='color:#111;'> 12.89KB </span>","children":null,"spread":false},{"title":"test_array.py <span style='color:#111;'> 10.44KB </span>","children":null,"spread":false},{"title":"test_integer.py <span style='color:#111;'> 6.18KB </span>","children":null,"spread":false},{"title":"order_enc_integer.py <span style='color:#111;'> 6.08KB </span>","children":null,"spread":false},{"title":"conf.py <span style='color:#111;'> 6.02KB </span>","children":null,"spread":false},{"title":"test_express.py <span style='color:#111;'> 4.99KB </span>","children":null,"spread":false},{"title":"setup.py <span style='color:#111;'> 4.71KB </span>","children":null,"spread":false},{"title":"logical_constraint.py <span style='color:#111;'> 4.64KB </span>","children":null,"spread":false},{"title":"solver.py <span style='color:#111;'> 4.37KB </span>","children":null,"spread":false},{"title":"test_logical_constraint.py <span style='color:#111;'> 4.14KB </span>","children":null,"spread":false},{"title":"test_constraint.py <span style='color:#111;'> 4.07KB </span>","children":null,"spread":false},{"title":"one_hot_enc_integer.py <span style='color:#111;'> 3.35KB </span>","children":null,"spread":false},{"title":"logic.py <span style='color:#111;'> 3.29KB </span>","children":null,"spread":false},{"title":"benchmark_tsp.py <span style='color:#111;'> 2.70KB </span>","children":null,"spread":false},{"title":"log_encoded_integer.py <span style='color:#111;'> 2.49KB </span>","children":null,"spread":false},{"title":"unary_encoded_integer.py <span style='color:#111;'> 2.30KB </span>","children":null,"spread":false},{"title":"asserts.py <span style='color:#111;'> 1.67KB </span>","children":null,"spread":false},{"title":"integer.py <span style='color:#111;'> 1.50KB </span>","children":null,"spread":false},{"title":"__init__.py <span style='color:#111;'> 830B </span>","children":null,"spread":false},{"title":"package_info.py <span style='color:#111;'> 729B </span>","children":null,"spread":false},{"title":"__init__.py <span style='color:#111;'> 461B </span>","children":null,"spread":false},{"title":"__init__.py <span style='color:#111;'> 39B </span>","children":null,"spread":false},{"title":"__init__.py <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"model.rst <span style='color:#111;'> 11.53KB </span>","children":null,"spread":false},{"title":"getting_started.rst <span style='color:#111;'> 9.96KB </span>","children":null,"spread":false},{"title":"express.rst <span style='color:#111;'> 9.08KB </span>","children":null,"spread":false},{"title":"README.rst <span style='color:#111;'> 5.48KB </span>","children":null,"spread":false},{"title":"CONTRIBUTING.rst <span style='color:#111;'> 2.44KB </span>","children":null,"spread":false},{"title":"integer.rst <span style='color:#111;'> 1.13KB </span>","children":null,"spread":false},{"title":"index.rst <span style='color:#111;'> 481B </span>","children":null,"spread":false},{"title":"array.rst <span style='color:#111;'> 464B </span>","children":null,"spread":false},{"title":"constraint.rst <span style='color:#111;'> 342B </span>","children":null,"spread":false},{"title":"logic.rst <span style='color:#111;'> 218B </span>","children":null,"spread":false},{"title":"utils.rst <span style='color:#111;'> 177B </span>","children":null,"spread":false},{"title":"pyqubo.Array.subtract.rst <span style='color:#111;'> 105B </span>","children":null,"spread":false},{"title":"pyqubo.Array.reshape.rst <span style='color:#111;'> 102B </span>","children":null,"spread":false},{"title":"pyqubo.Array.matmul.rst <span style='color:#111;'> 99B </span>","children":null,"spread":false},{"title":"pyqubo.Array.fill.rst <span style='color:#111;'> 93B </span>","children":null,"spread":false},{"title":"pyqubo.Array.div.rst <span style='color:#111;'> 90B </span>","children":null,"spread":false},{"title":"pyqubo.Array.dot.rst <span style='color:#111;'> 90B </span>","children":null,"spread":false},{"title":"pyqubo.Array.mul.rst <span style='color:#111;'> 90B </span>","children":null,"spread":false},{"title":"pyqubo.Array.add.rst <span style='color:#111;'> 90B </span>","children":null,"spread":false},{"title":"pyqubo.Array.T.rst <span style='color:#111;'> 86B </span>","children":null,"spread":false},{"title":"contribution.rst <span style='color:#111;'> 33B </span>","children":null,"spread":false},{"title":"test_run.sh <span style='color:#111;'> 434B </span>","children":null,"spread":false},{"title":"......","children":null,"spread":false},{"title":"<span style='color:steelblue;'>文件过多,未全部展示</span>","children":null,"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明