Token导航 LogoToken导航

Agent Skill · 研究检索

qutip(qutip 搜索)

qutip 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

qutip 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,674 个 Skill 里排第 63,254。

总安装 318周安装 13GitHub Stars 9下载 103核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:qutip(qutip 搜索)
来源仓库:https://github.com/tondevrel/scientific-agent-skills
仓库路径:skills/qutip
安装命令:
npx skills add https://github.com/tondevrel/scientific-agent-skills --skill qutip
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/tondevrel/scientific-agent-skills --skill qutip

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

qutip 用于查找、检索和筛选相关信息。适用于 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果的任务。通过 npx skills add 命令从指定 GitHub 仓库安装,需结合原始 README 确认具体用法。

安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。当前无底部简介内容,可参考来源仓库获取更多使用细节。

来源仓库内路径:skills/qutip

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/tondevrel/scientific-agent-skills --skill quti…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

qutip 怎么安装?

在终端执行 npx skills add https://github.com/tondevrel/scientific-agent-skills --skill qutip。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

qutip 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

qutip 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

qutip 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

qutip 用的人多吗?

公开数据是累计安装 318 次,近一周安装 13 次,下载 103 次,GitHub 9 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

qutip 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
qutip

qutip 搜索 · 本页

3189需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

QuTiP - Quantum Dynamics

QuTiP is designed to be a flexible and efficient framework for quantum mechanics. It allows for easy creation of quantum objects and provides powerful solvers to track their evolution in both closed and open environments.

When to Use

  • Simulating the time evolution of a quantum system (Schrödinger or Master equation)
  • Calculating steady states of open quantum systems (e.g., a cavity under drive and dissipation)
  • Analyzing entanglement, Wigner functions, and quantum correlations
  • Studying light-matter interactions (Jaynes-Cummings model, Rabi oscillations)
  • Pulse sequence optimization and quantum control
  • Calculating spectrums and multi-time correlation functions
  • Parallelizing quantum simulations across multiple CPUs

Reference Documentation

Official docs: https://qutip.org/docs/latest/ Tutorials: https://qutip.org/tutorials.html Search patterns: qutip.Qobj, qutip.mesolve, qutip.wigner, qutip.expect, qutip.basis

Core Principles

The Qobj (Quantum Object)

The central data structure. A Qobj can represent a state (ket or bra), an operator, or a superoperator. It automatically handles dimensions and validates operations (e.g., preventing the addition of a ket and an operator).

Composite Systems

QuTiP uses the Kronecker product (tensor) to represent systems composed of multiple sub-systems (e.g., a qubit coupled to a resonator).

Solver Workflow

  1. Define the Hamiltonian (H)
  2. Define collapse operators (C_n) for dissipation
  3. Set initial state (ρ₀)
  4. Define time sequence (t)
  5. Run the solver (mesolve, sesolve, etc.)

Quick Reference

Installation

pip install qutip

Standard Imports

import qutip as qt
import numpy as np
import matplotlib.pyplot as plt

Basic Pattern - Rabi Oscillations

import qutip as qt
import numpy as np

# 1. Define Hamiltonian: H = h_bar * omega * sigma_x / 2
omega = 1.0 * 2 * np.pi
H = 0.5 * omega * qt.sigmax()

# 2. Initial state: Spin down (|1>)
psi0 = qt.basis(2, 1)

# 3. Time points
times = np.linspace(0.0, 10.0, 100)

# 4. Solve Schrödinger Equation
result = qt.sesolve(H, psi0, times, [qt.sigmaz()])

# 5. Get expectation values
sz_expt = result.expect[0]

Critical Rules

✅ DO

  • Use basis(N, i) - Use built-in functions to create states instead of manual arrays
  • Check Qobj Dimensions - Always verify .dims when working with composite systems to ensure tensor products are correct
  • Use expect() - Let solvers calculate expectation values directly to save memory and time
  • Specify c_ops for Open Systems - Use mesolve with collapse operators to model decoherence
  • Vectorize Hamiltonians - If your Hamiltonian is time-dependent, use the [H0, [H1, 'sin(w*t)']] list format for speed
  • Visualize with Wigner - Use qt.wigner(state, xvec, yvec) for a deep look into the quantum nature of the state

❌ DON'T

  • Extract data manually - Avoid state.data.toarray() unless absolutely necessary; QuTiP's Qobj is optimized for sparse math
  • Ignore solver warnings - Numerical instabilities often mean the time step is too large or the Hilbert space is truncated too early
  • Mix Hilbert Spaces - Don't perform operations between objects with different dimensions without proper tensor products
  • Forget Truncation - For infinite systems (like oscillators), ensure the Fock space size (N) is large enough for convergence

Anti-Patterns (NEVER)

import qutip as qt

# ❌ BAD: Creating states using raw numpy arrays (no metadata)
psi = qt.Qobj([[1], [0]])

# ✅ GOOD: Use built-in constructors
psi = qt.basis(2, 0) # Ket |0>

# ❌ BAD: Manual Kronecker product
H_total = np.kron(H_atom, np.eye(N_cav))

# ✅ GOOD: Use qt.tensor
H_total = qt.tensor(H_atom, qt.qeye(N_cav))

# ❌ BAD: Calculating expectation values in a Python loop
# (Extremely slow and memory intensive)

# ✅ GOOD: Pass operators to the solver
result = qt.mesolve(H, psi0, times, c_ops, [qt.sigmaz(), qt.sigmax()])

Quantum Objects (qt.Qobj)

Creation and Properties

# Kets and Bras
psi = qt.basis(5, 0) # Ket |0> in 5-level system
bra = psi.dag()      # Adjoint (Bra)

# Operators
a = qt.destroy(10) # Annihilation operator (size 10)
n = a.dag() * a    # Number operator
sz = qt.sigmaz()   # Pauli Z

# Properties
print(psi.type)    # 'ket'
print(sz.dims)     # [[2], [2]]
print(n.eigenstates()) # Get eigenvalues and vectors

Composite Systems (Tensors)

# Qubit (2) + Cavity (10)
sz = qt.sigmaz()
a = qt.destroy(10)

# Operator acting on qubit only
sz_total = qt.tensor(sz, qt.qeye(10))

# Interaction term: sigma_x * (a + a_dag)
H_int = qt.tensor(qt.sigmax(), a + a.dag())

Dynamics Solvers (qt.mesolve, qt.sesolve)

Master Equation (Open Systems)

# Parameters
kappa = 0.1 # Cavity decay rate
H = qt.tensor(qt.sigmax(), qt.qeye(10)) # Hamiltonian
c_ops = [np.sqrt(kappa) * qt.tensor(qt.qeye(2), a)] # Decay list
psi0 = qt.tensor(qt.basis(2, 0), qt.basis(10, 0))
times = np.linspace(0, 50, 200)

# Solve
result = qt.mesolve(H, psi0, times, c_ops, [qt.tensor(qt.sigmaz(), qt.qeye(10))])

# Access expectation values
exp_z = result.expect[0]

Time-Dependent Hamiltonians

# Using string-based syntax (fastest)
H0 = qt.sigmax()
H1 = qt.sigmaz()
args = {'w': 0.5}
H_t = [H0, [H1, 'sin(w * t)']]

result = qt.sesolve(H_t, qt.basis(2, 0), times, args=args)

Steady State and Correlation

# Steady state of a driven-dissipative system
rho_ss = qt.steadystate(H, c_ops)

# Expectation value in steady state
avg_n = qt.expect(a.dag() * a, rho_ss)

# Emission Spectrum
w_list = np.linspace(0, 10, 100)
spec = qt.spectrum(H, w_list, c_ops, a.dag(), a)

Visualization

Wigner and Bloch Sphere

# Wigner function for a Cat state
cat = (qt.coherent(20, 2) + qt.coherent(20, -2)).unit()
xvec = np.linspace(-5, 5, 100)
W = qt.wigner(cat, xvec, xvec)

# Bloch Sphere
b = qt.Bloch()
b.add_states(qt.basis(2, 0))
b.add_states((qt.basis(2,0) + qt.basis(2,1)).unit())
# b.show()

Practical Workflows

1. Jaynes-Cummings Model (Qubit-Cavity)

def simulate_jc(g, kappa, n_max, times):
    # Operators
    a = qt.tensor(qt.qeye(2), qt.destroy(n_max))
    sm = qt.tensor(qt.destroy(2), qt.qeye(n_max))

    # Hamiltonian
    H = g * (sm.dag() * a + sm * a.dag())

    # Dissipation
    c_ops = [np.sqrt(kappa) * a]

    # Initial: Excited atom, 0 photons
    psi0 = qt.tensor(qt.basis(2, 0), qt.basis(n_max, 0))

    res = qt.mesolve(H, psi0, times, c_ops, [sm.dag()*sm, a.dag()*a])
    return res.expect

2. Quantum State Tomography Analysis

def fidelity_check(state_ideal, state_measured):
    """Calculates fidelity between two quantum states."""
    # Works for both kets and density matrices
    return qt.fidelity(state_ideal, state_measured)

3. Calculating G2 Correlation Function

def calculate_g2(H, c_ops, a_op, times):
    """Second-order correlation function g2(tau)."""
    # Use built-in correlation function
    g2_tau = qt.correlation_2op_1t(H, None, times, c_ops, a_op.dag(), a_op)
    # Normalize by steady state intensity
    rho_ss = qt.steadystate(H, c_ops)
    n_ss = qt.expect(a_op.dag() * a_op, rho_ss)
    return np.real(g2_tau) / (n_ss**2)

Performance Optimization

Sparse vs Dense

QuTiP uses Scipy sparse matrices by default. For very small systems (N < 4), converting to dense might be faster, but for most N > 10, sparse is mandatory.

Parallel Map

Use qt.parallel_map for parameter sweeps.

def task(omega):
    H = 0.5 * omega * qt.sigmax()
    return qt.mesolve(H, psi0, times, c_ops, [qt.sigmaz()]).expect[0]

omegas = np.linspace(0, 10, 20)
results = qt.parallel_map(task, omegas)

Common Pitfalls and Solutions

The "Dimensions Mismatch" Error

When tensoring systems, the order must be consistent.

# ❌ Problem: H is (2x10) but Op is (10x2)
# ✅ Solution: Check dims and ensure consistent order in tensor()
print(H.dims) # [[2, 10], [2, 10]]

Insufficient Fock Space

If your photon number distribution hits the upper limit of your N, your results are invalid.

# ✅ Solution: Check populations
occ = qt.expect(qt.destroy(N).dag() * qt.destroy(N), final_state)
# If occ > 0.8 * N, increase N.

Hermitian Hamiltonian

Solvers assume H is Hermitian. If your time-dependent code results in a non-Hermitian H, sesolve will produce unphysical states (norm ≠ 1).

# ✅ Solution: Check norm
if not np.allclose(result.states[-1].norm(), 1.0):
    print("Warning: Norm not preserved!")

Best Practices

  1. Always use built-in constructors (basis, coherent, etc.) instead of manual array creation
  2. Verify dimensions with .dims before performing tensor products
  3. Pass operators to solvers for expectation values rather than calculating them manually
  4. Use appropriate Fock space truncation (N) - check that populations don't saturate
  5. For time-dependent Hamiltonians, use the string-based format for best performance
  6. Monitor solver warnings - they often indicate numerical issues
  7. Use sparse matrices (default) for systems with N > 10
  8. Check state normalization after time evolution, especially for custom solvers
  9. Use parallel_map for parameter sweeps to leverage multiple CPUs
  10. Visualize quantum states with Wigner functions and Bloch spheres for deeper insight

QuTiP is the standard tool for exploring the non-intuitive world of quantum dynamics. It bridges the gap between theoretical equations and numerical experimentation, providing physicists with a high-performance lab in a Python script.

平台分布

Codex

39.72%
按下载量换算41

Claude

28.87%
按下载量换算30

Cursor

19.53%
按下载量换算20

Gemini CLI

9.19%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills