Skip to main content 홈 크리에이터 legendtkl agentic-skill-router skill-033
skill-033 Quantum mechanics simulations and analysis using QuTiP (Quantum Toolbox in Python). Use when working with quantum systems including: (1) quantum states (kets, bras, density matrices), (2) quantum operators and gates, (3) time evolution and dynamics (Schrödinger, master equations, Monte Carlo), (4) open quantum systems with dissipation, (5) quantum measurements and entanglement, (6) visualization (Bloch sphere, Wigner functions), (7) steady states and correlation functions, or (8) advanced methods (Floquet theory, HEOM, stochastic solvers). Handles both closed and open quantum systems across various domains including quantum optics, quantum computing, and condensed matter physics.
설치로 이동 Skills Marketplace 커뮤니티가 만든 AI 스킬을 발견하고 탐색하세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/legendtkl/agentic-skill-router --skill skill-033명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
Zip 다운로드 다운로드 중... First use any clearly matching enabled local/user Agent Skill. If none matches, prefer this router for skill-shaped requests involving a named tool, API, service, CLI, platform, file format, dataset, or domain workflow, including when a generic built-in skill such as browser, Chrome, or web search also seems applicable; use built-ins directly only when explicitly requested or when the task is primarily live browsing, logged-in page operation, clicking, screenshotting, or current webpage inspection. Also use directly to audit, slim, disable, restore, or route locally installed Agent Skills across supported hosts. Examples include Vercel, Netlify, Cloudflare, Render, Playwright, Sentry, Linear, GitHub, OpenAI APIs, PDF, DOCX, PPTX, and spreadsheets.
name skill-033 description Quantum mechanics simulations and analysis using QuTiP (Quantum Toolbox in Python). Use when working with quantum systems including: (1) quantum states (kets, bras, density matrices), (2) quantum operators and gates, (3) time evolution and dynamics (Schrödinger, master equations, Monte Carlo), (4) open quantum systems with dissipation, (5) quantum measurements and entanglement, (6) visualization (Bloch sphere, Wigner functions), (7) steady states and correlation functions, or (8) advanced methods (Floquet theory, HEOM, stochastic solvers). Handles both closed and open quantum systems across various domains including quantum optics, quantum computing, and condensed matter physics.
QuTiP: Quantum Toolbox in Python
Overview
QuTiP provides comprehensive tools for simulating and analyzing quantum mechanical systems. It handles both closed (unitary) and open (dissipative) quantum systems with multiple solvers optimized for different scenarios.
Installation
uv pip install qutip
Optional packages for additional functionality:
uv pip install qutip-qip
uv pip install qutip-qtrl
Quick Start
from qutip import *
import numpy as np
import matplotlib.pyplot as plt
psi = basis(2 , 0 )
H = sigmaz()
tlist = np.linspace( , , )
result = sesolve(H, psi, tlist, e_ops=[sigmaz()])
plt.plot(tlist, result.expect[ ])
plt.xlabel( )
plt.ylabel( )
plt.show()
0
10
100
0
'Time'
'⟨σz⟩'
Core Capabilities
1. Quantum Objects and States Create and manipulate quantum states and operators:
psi = basis(N, n)
psi = coherent(N, alpha)
rho = thermal_dm(N, n_avg)
a = destroy(N)
H = num(N)
sx, sy, sz = sigmax(), sigmay(), sigmaz()
psi_AB = tensor(psi_A, psi_B)
See references/core_concepts.md for comprehensive coverage of quantum objects, states, operators, and tensor products.
2. Time Evolution and Dynamics Multiple solvers for different scenarios:
result = sesolve(H, psi0, tlist, e_ops=[num(N)])
c_ops = [np.sqrt(0.1 ) * destroy(N)]
result = mesolve(H, psi0, tlist, c_ops, e_ops=[num(N)])
result = mcsolve(H, psi0, tlist, c_ops, ntraj=500 , e_ops=[num(N)])
sesolve: Pure states, unitary evolution
mesolve: Mixed states, dissipation, general open systems
mcsolve: Quantum jumps, photon counting, individual trajectories
brmesolve: Weak system-bath coupling
fmmesolve: Time-periodic Hamiltonians (Floquet)
See references/time_evolution.md for detailed solver documentation, time-dependent Hamiltonians, and advanced options.
3. Analysis and Measurement Compute physical quantities:
n_avg = expect(num(N), psi)
S = entropy_vn(rho)
C = concurrence(rho)
F = fidelity(psi1, psi2)
D = tracedist(rho1, rho2)
corr = correlation_2op_1t(H, rho0, taulist, c_ops, A, B)
w, S = spectrum_correlation_fft(taulist, corr)
rho_ss = steadystate(H, c_ops)
See references/analysis.md for entropy, fidelity, measurements, correlation functions, and steady state calculations.
4. Visualization Visualize quantum states and dynamics:
b = Bloch()
b.add_states(psi)
b.show()
xvec = np.linspace(-5 , 5 , 200 )
W = wigner(psi, xvec, xvec)
plt.contourf(xvec, xvec, W, 100 , cmap='RdBu' )
plot_fock_distribution(psi)
hinton(rho)
matrix_histogram(H.full())
See references/visualization.md for Bloch sphere animations, Wigner functions, Q-functions, and matrix visualizations.
5. Advanced Methods Specialized techniques for complex scenarios:
T = 2 * np.pi / w_drive
f_modes, f_energies = floquet_modes(H, T, args)
result = fmmesolve(H, psi0, tlist, c_ops, T=T, args=args)
from qutip.nonmarkov.heom import HEOMSolver, BosonicBath
bath = BosonicBath(Q, ck_real, vk_real)
hsolver = HEOMSolver(H_sys, [bath], max_depth=5 )
result = hsolver.run(rho0, tlist)
psi = dicke(N, j, m)
Jz = jspin(N, 'z' )
See references/advanced.md for Floquet theory, HEOM, permutational invariance, stochastic solvers, superoperators, and performance optimization.
Common Workflows
Simulating a Damped Harmonic Oscillator
N = 20
omega = 1.0
kappa = 0.1
H = omega * num(N)
c_ops = [np.sqrt(kappa) * destroy(N)]
psi0 = coherent(N, 3.0 )
tlist = np.linspace(0 , 50 , 200 )
result = mesolve(H, psi0, tlist, c_ops, e_ops=[num(N)])
plt.plot(tlist, result.expect[0 ])
plt.xlabel('Time' )
plt.ylabel('⟨n⟩' )
plt.title('Photon Number Decay' )
plt.show()
Two-Qubit Entanglement Dynamics
psi0 = bell_state('00' )
gamma = 0.1
c_ops = [
np.sqrt(gamma) * tensor(sigmaz(), qeye(2 )),
np.sqrt(gamma) * tensor(qeye(2 ), sigmaz())
]
def compute_concurrence (t, psi ):
rho = ket2dm(psi) if psi.isket else psi
return concurrence(rho)
tlist = np.linspace(0 , 10 , 100 )
result = mesolve(qeye([2 , 2 ]), psi0, tlist, c_ops)
C_t = [concurrence(state.proj()) for state in result.states]
plt.plot(tlist, C_t)
plt.xlabel('Time' )
plt.ylabel('Concurrence' )
plt.title('Entanglement Decay' )
plt.show()
Jaynes-Cummings Model
N = 10
wc = 1.0
wa = 1.0
g = 0.05
a = tensor(destroy(N), qeye(2 ))
sm = tensor(qeye(N), sigmam())
H = wc * a.dag() * a + wa * sm.dag() * sm + g * (a.dag() * sm + a * sm.dag())
psi0 = tensor(coherent(N, 2 ), basis(2 , 0 ))
kappa = 0.1
gamma = 0.05
c_ops = [np.sqrt(kappa) * a, np.sqrt(gamma) * sm]
n_cav = a.dag() * a
n_atom = sm.dag() * sm
tlist = np.linspace(0 , 50 , 200 )
result = mesolve(H, psi0, tlist, c_ops, e_ops=[n_cav, n_atom])
fig, axes = plt.subplots(2 , 1 , figsize=(8 , 6 ), sharex=True )
axes[0 ].plot(tlist, result.expect[0 ])
axes[0 ].set_ylabel('⟨n_cavity⟩' )
axes[1 ].plot(tlist, result.expect[1 ])
axes[1 ].set_ylabel('⟨n_atom⟩' )
axes[1 ].set_xlabel('Time' )
plt.tight_layout()
plt.show()
Tips for Efficient Simulations
Truncate Hilbert spaces : Use smallest dimension that captures dynamics
Choose appropriate solver : sesolve for pure states is faster than mesolve
Time-dependent terms : String format (e.g., 'cos(w*t)') is fastest
Store only needed data : Use e_ops instead of storing all states
Adjust tolerances : Balance accuracy with computation time via Options
Parallel trajectories : mcsolve automatically uses multiple CPUs
Check convergence : Vary ntraj, Hilbert space size, and tolerances
Troubleshooting Memory issues : Reduce Hilbert space dimension, use store_final_state option, or consider Krylov methods
Slow simulations : Use string-based time-dependence, increase tolerances slightly, or try method='bdf' for stiff problems
Numerical instabilities : Decrease time steps (nsteps option), increase tolerances, or check Hamiltonian/operators are properly defined
Import errors : Ensure QuTiP is installed correctly; quantum gates require qutip-qip package
References This skill includes detailed reference documentation:
references/core_concepts.md : Quantum objects, states, operators, tensor products, composite systems
references/time_evolution.md : All solvers (sesolve, mesolve, mcsolve, brmesolve, etc.), time-dependent Hamiltonians, solver options
references/visualization.md : Bloch sphere, Wigner functions, Q-functions, Fock distributions, matrix plots
references/analysis.md : Expectation values, entropy, fidelity, entanglement measures, correlation functions, steady states
references/advanced.md : Floquet theory, HEOM, permutational invariance, stochastic methods, superoperators, performance tips
External Resources