Skip to main content

A task manager for submitting QASM tasks to SpinQ Cloud via MCP

Project description

工作流程

  • 整理调用的逻辑,确认这个工具的可插拔性,可自适应找环境变量,找不到时要求配置 ✅
  • 发布 ✅
  • 测试不同工具的可行性 ✅ cursor vscode cherry-studio
  • 主要处理了: 1. 针对大模型默认measure进行限制报错,2. 针对大模型对qasm特殊符号总是可能做多次转义进行限制,3. 补充了根据id读取task result的功能

安装

  • 依赖python 3.10以上
  • pip install spinqit_task_manager
  • 对应python目录环境变量下会将脚本qasm-submitter 映射到 spinqit_simplified.qasm_submitter:run_server函数中

使用

  • 环境简单的话,直接执行qasm-submitter
  • 环境复杂就看python安装在哪个目录如:
    • 我的conda在/opt/anaconda3/envs/testmcpenv/bin/python
    • 于是可以直接执行/opt/anaconda3/envs/testmcpenv/bin/qasm-submitter

环境测试情况 (创建并提交一个2比特量子线路qasm到云平台,可能的话查看结果)

  • mac python 3.10.16 cherry-studio

    • 配置项:
      • 命令: /opt/anaconda3/envs/testmcpenv/bin/qasm-submitter
      • 环境变量:
        • PYTHONPATH=/opt/anaconda3/envs/testmcpenv/bin/python
        • PRIVATEKEYPATH=/Users/yucheng/.ssh/id_rsa
        • SPINQCLOUDUSERNAME=a492760446
      • alt text
    • 结果
      • alt text
  • vscode cline插件

    • 配置项:
      {
        "mcpServers": {
          "qasm-submitter": {
            "type": "stdio",
            "command": "/opt/anaconda3/envs/testmcpenv/bin/qasm-submitter",
            "env": {
              "PYTHONPATH":"/opt/anaconda3/envs/testmcpenv/bin/python",
              "PRIVATEKEYPATH":"/Users/yucheng/.ssh/id_rsa",
              "SPINQCLOUDUSERNAME":"a492760446"
            }
          }
        }
      }
      
    • 配置方式
      • alt text
    • 结果
      • alt text
  • cursor

    • 配置项
      {
        "mcpServers": {
          "qasm-submitter": {
            "type": "stdio",
            "command": "/opt/anaconda3/envs/testmcpenv/bin/qasm-submitter",
            "env": {
              "PYTHONPATH":"/opt/anaconda3/envs/testmcpenv/bin/python",
              "PRIVATEKEYPATH":"/Users/yucheng/.ssh/id_rsa",
              "SPINQCLOUDUSERNAME":"a492760446"
            }
          }
        }
      }
      
    • 配置方式
      • alt text
    • 结果
      • alt text

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

spinqit_task_manager-0.1.3-py3-none-any.whl (115.0 kB view details)

Uploaded Python 3

File details

Details for the file spinqit_task_manager-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for spinqit_task_manager-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 69ef1d0f18afbdc40bd668ae156e21ed46b7f8b49e496455c17f335ff2557345
MD5 fd8052b82d3984cc9018b78476f6fe98
BLAKE2b-256 5885613200ecaefc83a9eaaa3ccd7377a3c4237a3ed23d585c9867694ee5dcf5

See more details on using hashes here.

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