用于与d波云资源交互的最小客户端。

dwave-cloud-client的Python项目详细描述


Last version on PyPILinux/Mac build statusWindows build statusCoverage reportDocumentation Status

D-Wave云客户端

d-wave云客户端是用于 与d波采样器api(sapi)服务器通信。

SAPI是一个应用程序层,用于提供资源发现、权限和 以及d波系统量子退火资源的调度。 这个包为该层提供了一个最小的python接口 影响交互和工作流的质量。

示例

此示例基于本地 系统自动检测到默认配置文件并对随机ising问题进行采样 适合解算器的图形。

importrandomfromdwave.cloudimportClient# Connect using the default or environment connection informationwithClient.from_config()asclient:# Load the default solversolver=client.get_solver()# Build a random Ising model to exactly fit the graph the solver supportslinear={index:random.choice([-1,1])forindexinsolver.nodes}quad={key:random.choice([-1,1])forkeyinsolver.undirected_edges}# Send the problem for sampling, include solver-specific parameter 'num_reads'computation=solver.sample_ising(linear,quad,num_reads=100)# Print the first sample out of a hundredprint(computation.samples[0])

安装

与python 2和3兼容:

pip install dwave-cloud-client

从源安装(在github的dwavesystems/dwave-cloud-clientrepo中提供):

pip install -r requirements.txt
python setup.py install

许可证

在apache许可证2.0下发布。请参阅LICENSE文件。

贡献

请参阅CONTRIBUTING.rst文件。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Github操作在生成期间未识别机密值   java根据给定的索引号选择适当的字符。开关语句   java如何在我的项目中使用SCA mvn插件在Fortify SCA扫描中仅包含一个文件夹?   java SwingWorker无法完成   使用KeyBindings Java在按住键时摆动停止暂停   java如何从sqlite数据库获取数据   java如何使用windows批处理文件逐个启动spring引导jar文件?   在Java中,字典是在构造函数中初始化映射的更好方法   用于在Java中创建2D形状的swing高级API   JavaSwing:制作一个可滚动的JPanel列表   引用泛型类中枚举成员的c#语法   java Doc4j:由于元素类型不同,比较两个文档失败   java如何优化绘制这些标记?