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.2-py3-none-any.whl (115.0 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for spinqit_task_manager-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b59ab8ff16ce97183c74caf2a8f041c5fe718260e690d5686b9f8d02af306d7a
MD5 d24cca2c658da88e06149f0311559b76
BLAKE2b-256 b06178716d69cbc59d3abe75ba876789683933454899a35f2af69f490f21b2b7

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