Cudaq Importing
NVIDIA/skills
A skill your agent uses when porting circuits from another framework (e.g.
Build, simulate, and analyze quantum circuits with MindQuantum.
$ npx skills add mindspore-ai/mindquantum --skill mindquantum -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install mindspore-ai/mindquantum mindquantum --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/mindspore-ai/mindquantum.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/mindquantum .claude/skills/mindquantum && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "mindquantum" agent skill from https://github.com/mindspore-ai/mindquantum/tree/master/skills/mindquantum into .claude/skills/mindquantum/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mindquantum", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/mindspore-ai/mindquantum/tree/master/skills/mindquantumType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add mindspore-ai/mindquantum --skill mindquantum -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install mindspore-ai/mindquantum mindquantum --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mindspore-ai/mindquantum.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/mindquantum .agents/skills/mindquantum && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "mindquantum" agent skill from https://github.com/mindspore-ai/mindquantum/tree/master/skills/mindquantum into .agents/skills/mindquantum/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mindquantum", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add mindspore-ai/mindquantum --skill mindquantum -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install mindspore-ai/mindquantum mindquantum --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mindspore-ai/mindquantum.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/mindquantum .cursor/skills/mindquantum && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "mindquantum" agent skill from https://github.com/mindspore-ai/mindquantum/tree/master/skills/mindquantum into .cursor/skills/mindquantum/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mindquantum", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/mindspore-ai/mindquantum.git --path skills/mindquantum--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add mindspore-ai/mindquantum --skill mindquantum -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install mindspore-ai/mindquantum mindquantum --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mindspore-ai/mindquantum.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/mindquantum .gemini/skills/mindquantum && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "mindquantum" agent skill from https://github.com/mindspore-ai/mindquantum/tree/master/skills/mindquantum into .gemini/skills/mindquantum/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mindquantum", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install mindspore-ai/mindquantum mindquantumInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add mindspore-ai/mindquantum --skill mindquantum -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/mindspore-ai/mindquantum.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/mindquantum .github/skills/mindquantum && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "mindquantum" agent skill from https://github.com/mindspore-ai/mindquantum/tree/master/skills/mindquantum into .github/skills/mindquantum/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mindquantum", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add mindspore-ai/mindquantum --skill mindquantum -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install mindspore-ai/mindquantum mindquantum --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mindspore-ai/mindquantum.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/mindquantum .opencode/skills/mindquantum && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "mindquantum" agent skill from https://github.com/mindspore-ai/mindquantum/tree/master/skills/mindquantum into .opencode/skills/mindquantum/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mindquantum", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
mindquantumBuild, simulate, and analyze quantum circuits with MindQuantum.
Mindquantum is an agent skill from mindspore-ai/mindquantum. Build, simulate, and analyze quantum circuits with MindQuantum. Provides API patterns, simulator selection, circuit construction, operator algebra, and common pitfalls. Use whenever code imports mindquantum, the user mentions MindQuantum, quantum circuits in Python with MindSpore, or asks about quantum simulation, parameterized quantum circuits, quantum gates, Hamiltonians, or quantum computing in the MindQuantum/MindSpore ecosystem.
Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files (for example `reference/circuit-and-gates.md`, `reference/io-and-visualization.md` and `reference/operators-hamiltonian.md`).
It sits in Research & Science, covering Quantum computing. It works with Python and CUDA. The repository describes itself as: MindQuantum is a quantum machine learning library that can be used to build and train different quantum neural networks. The licence is Apache-2.0.
6 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 2a0ca08. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
pippythonFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Mindquantum loads about 2.3k tokens when it runs. Until then it costs about 112 tokens; SKILL.md has 698 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from mindspore-ai/mindquantum at commit 2a0ca08, republished under its Apache-2.0 licence (© mindspore-ai). 698 words, ~2,279 tokens.
.claude/skills/mindquantum/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.MindQuantum is a quantum computing framework in the MindSpore ecosystem. Its core circuit, operator, and simulator APIs can be used without MindSpore; the mindquantum.framework module provides MindSpore integration for hybrid quantum-classical models.
Before writing any MindQuantum code, check whether MindQuantum is installed. If the user hits ModuleNotFoundError: No module named 'mindquantum' or asks to set up their environment, follow this guide.
python -c "import mindquantum; print(mindquantum.__version__)"# Python 3.9-3.12 is required by this package.
pip install mindquantumMindQuantum's core (circuits, gates, operators, simulators) works standalone — no MindSpore required. MindSpore is only needed for the mindquantum.framework module (MQLayer, hybrid training).
| Package | When Needed | Install |
|---|---|---|
| MindSpore | MQLayer hybrid quantum-classical training | pip install mindspore |
| OpenFermion + PySCF | Quantum chemistry (generate_uccsd, molecular data) | pip install openfermion openfermionpyscf |
| PyTorch + CUDA | QAIA gpu-float32 backend | pip install torch (with CUDA) |
| torch-npu | QAIA npu-float32 backend | Follow the torch-npu installation matching the Ascend environment |
# Minimal verification
import mindquantum as mq
from mindquantum.core.circuit import Circuit
from mindquantum.core.gates import H, CNOT
from mindquantum.simulator import Simulator
circ = Circuit().h(0).x(1, 0)
sim = Simulator("mqvector", 2)
sim.apply_circuit(circ)
print(sim.get_qs(ket=True))
# Expected: √2/2¦00⟩ + √2/2¦11⟩Use get_supported_simulator() to check the backends available in the current installation. GPU state-vector backends only appear when the package is built with the required NVIDIA CUDA support; mqvector_cq additionally requires NVIDIA cuQuantum SDK support.
For source builds, follow the repository build scripts and options rather than assuming a platform-specific backend is present.
from mindquantum.core.circuit import Circuit
from mindquantum.core.gates import H, RX, RY, CNOT, Measure
from mindquantum.core.operators import QubitOperator, Hamiltonian
from mindquantum.simulator import Simulator
# Build circuit
circ = Circuit()
circ += H.on(0)
circ += CNOT.on(1, 0) # target=1, control=0
circ += RX("theta").on(0) # parameterized gate
# Simulate
sim = Simulator("mqvector", 2)
sim.apply_circuit(circ, pr={"theta": 0.5})
print(sim.get_qs(ket=True))
# Sample
circ += Measure().on(0)
circ += Measure().on(1)
sim.reset()
result = sim.sampling(circ, pr={"theta": 0.5}, shots=1000)| Module | Purpose | Key Classes |
|---|---|---|
core.circuit | Circuit construction | Circuit, UN, apply, dagger |
core.gates | 50+ quantum gates | H, X, RX, RY, RZ, CNOT, SWAP, U3, FSim, Measure |
core.operators | Operator algebra | QubitOperator, FermionOperator, Hamiltonian, TimeEvolution |
core.parameterresolver | Symbolic parameters | ParameterResolver |
simulator | Simulation backends | Simulator, get_supported_simulator() |
algorithm.nisq | NISQ ansatz catalog | HardwareEfficientAnsatz, UCCAnsatz, QAOAAnsatz, StronglyEntangling |
algorithm.compiler | Circuit decomposition / DAG tools | DAGCircuit, decompose submodule, compiler rules |
algorithm.mapping | Qubit mapping | SABRE, MQSABRE |
algorithm.library | Circuit/state helpers | qft, general_ghz_state, general_w_state |
algorithm.qaia | Quantum-inspired optimization | SimCIM, ASB, BSB, DSB, LQA |
framework | MindSpore integration | MQLayer, MQAnsatzOnlyLayer, MQN2Ops |
io | Import/export | OpenQASM, HiQASM, QCIS |
| Backend | State representation | Memory scaling | Source-documented notes |
|---|---|---|---|
mqvector | Pure state vector | O(2^n) | Supports gates, gradients, and noise-channel workflows through sampling / parameter-shift paths |
mqvector_gpu | Pure state vector | O(2^n) | Same backend family as mqvector; requires CUDA support in the installation |
mqvector_cq | Pure state vector | O(2^n) | cuQuantum-backed state-vector backend when CUDA and cuQuantum support are available |
mqmatrix | Density matrix | O(4^n) | Native mixed-state operations such as entropy, purity, partial trace; no circ_left / simulator_left in get_expectation_with_grad |
mqmps | Matrix product state | O(n chi^2) | Tensor-network backend; approximation depends on bond-dimension settings |
stabilizer | Clifford tableau | O(n^2) | Clifford-gate backend; no parameterized gates or gradient computation |
Simulator(..., dtype=...) accepts MindQuantum dtypes such as mindquantum.complex64 and mindquantum.complex128; if dtype is None, the simulator uses complex128.
Use sim.reset() when you need to return an existing simulator to the zero state.
.on(target, control)X.on(1, 0) # CNOT: target=1, control=0
X.on(0, [1, 2]) # Toffoli: target=0, controls=[1,2]
H.on(0) # Single-qubit gate on qubit 0RX("alpha").on(0) # named parameter
RX({"alpha": 2}).on(0) # scaled: rotation = 2*alpha
RX(1.5).on(0) # fixed value (not trainable)circ1 + circ2 # concatenate
circ * 3 # repeat 3 times
circ.hermitian() # adjoint / inverse
dagger(circ) # same as hermitian()
UN(H, range(5)) # apply H to qubits 0-4This is MindQuantum's key pattern for hybrid quantum-classical models:
encoder = Circuit().rx("x0", 0).ry("x1", 1)
encoder.as_encoder() # marks params as data-encoding (not trainable)
ansatz = Circuit().ry("w0", 0).x(1, 0).ry("w1", 1)
ansatz.as_ansatz() # marks params as trainable (default)
full_circuit = encoder + ansatz| If your task involves... | Use skill |
|---|---|
| VQE, QAOA, QML, gradient-based training, MindSpore MQLayer | mq-variational-training |
| Noise channels, noisy circuits, density matrix, ChannelAdder | mq-noisy-simulation |
| QAIA solvers (SimCIM, SB), Ising/Max-Cut optimization | mq-qaia-solver |
| Compiling to hardware, qubit mapping, gate decomposition | mq-circuit-compiler |
| Molecular Hamiltonians, fermion transforms, UCCSD, mqchem | mq-quantum-chemistry |
Read these on demand when you need deeper API detail:
| File | When to Read |
|---|---|
reference/circuit-and-gates.md | Building circuits, gate catalog, controlled gates, circuit operations |
reference/parameter-resolver.md | ParameterResolver algebra, encoder/ansatz marking, parameter manipulation |
reference/operators-hamiltonian.md | QubitOperator, FermionOperator, Hamiltonian, TimeEvolution, commutator |
reference/simulator-backends.md | Simulator API, state operations, sampling, expectation, gradient ops |
reference/io-and-visualization.md | OpenQASM import/export, SVG rendering, circuit printing |
Endianness: MindQuantum uses little-endian — qubit 0 is the rightmost (least significant) bit in state vectors and measurement results.
get_expectation_with_grad requires encoder+ansatz split: If your circuit has no as_encoder() call, all params are treated as ansatz params. Encoder data must be a 2D array [batch_size, n_encoder_params].
MindSpore context: mindquantum.framework operations are documented as PYNATIVE_MODE only. Use ms.set_device("CPU") with ms.set_context(mode=ms.PYNATIVE_MODE) for CPU examples.
Simulator state persistence: apply_circuit and apply_gate modify the simulator state. Use sim.reset() to return to |0⟩. sampling does not change state, but it samples by applying the provided circuit to the simulator's current state.
Noise via Monte Carlo: When using noise channels with mqvector, each call to sampling runs Monte Carlo trajectories. Results are statistical — use enough shots. For exact noise simulation, use mqmatrix (density matrix) but note O(4ⁿ) memory.
UN requires a list: UN(H, 5) is wrong — use UN(H, range(5)) or UN(H, [0,1,2,3,4]).
© mindspore-ai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 5 other files in skills/mindquantum of mindspore-ai/mindquantum.
Open the folder on GitHubat commit 2a0ca08
Mindquantum next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Mindquantum this skillmindspore-ai/mindquantum | 101 | — | ~2.3k | Automated safety check: Pass | Apache-2.0 | |
| Cudaq ImportingNVIDIA/skills | 3.5k | — | ~1.9k | Automated safety check: Pass | Apache-2.0 | |
| Qiskit 2.x Quantum ML Referenceaiming-lab/AutoResearchClaw | 15k | — | ~4.7k | Automated safety check: Pass | MIT | |
| DiffDock Molecular DockingK-Dense-AI/scientific-agent-skills | 48k | 1 repos | ~3k | Automated safety check: Notes | MIT | |
| Pennylanedavila7/claude-code-templates | 32k | 8 repos | ~1.9k | Automated safety check: Pass | MIT | |
| Light Experiment CodingLight0305/Light-skills | 641 | — | ~2.3k | Automated safety check: Pass | MIT |
NVIDIA/skills
A skill your agent uses when porting circuits from another framework (e.g.
aiming-lab/AutoResearchClaw
Reference patterns for writing qiskit 2.x code for variational quantum machine learning: feature maps, VQC training, VQE for chemistry, MPS circuits and noise models.
K-Dense-AI/scientific-agent-skills
Predicts how small molecules bind to a protein with DiffDock, covering batch docking, pose ranking by confidence and checks on the results; not for binding affinity.
davila7/claude-code-templates
Cross-platform Python library for quantum computing, quantum machine learning, and quantum chemistry.
Light0305/Light-skills
Builds the code for a frozen research experiment test-first, with leakage controls, seed handling and saved evidence so results can be rerun and audited.
K-Dense-AI/scientific-agent-skills
Builds and troubleshoots TorchDrug 0.2.1 workflows for molecular graphs, property prediction, self-supervised pretraining, molecule generation, retrosynthesis, protein representation learning, and…
mindspore-ai/mindquantum
Compile and optimize quantum circuits for hardware execution using MindQuantum's compiler pipeline.
mindspore-ai/mindquantum
Simulate noisy quantum circuits with MindQuantum. An agent skill from mindspore-ai/mindquantum.
mindspore-ai/mindquantum
Solve Ising/QUBO-style combinatorial optimization problems using MindQuantum's Quantum Annealing-Inspired Algorithms (QAIA).
mindspore-ai/mindquantum
Run quantum chemistry simulations with MindQuantum. An agent skill from mindspore-ai/mindquantum.
mindspore-ai/mindquantum
Build and train variational quantum algorithms (VQE, QAOA, QML, QNN) with MindQuantum.
Categories
Build, simulate, and analyze quantum circuits with MindQuantum. Mindquantum is an agent skill from mindspore-ai/mindquantum. Build, simulate, and analyze quantum circuits with MindQuantum.
Mindquantum fits situations like: code imports mindquantum; the user mentions MindQuantum; quantum circuits in Python with MindSpore; asks about quantum simulation.
Run `npx skills add mindspore-ai/mindquantum --skill mindquantum -a claude-code`. Or copy the skill folder (skills/mindquantum in mindspore-ai/mindquantum) into .claude/skills/mindquantum in your project. Claude Code loads it when a task matches its description.
Run `npx skills add mindspore-ai/mindquantum --skill mindquantum -a codex`. Or copy the skill folder (skills/mindquantum in mindspore-ai/mindquantum) into .agents/skills/mindquantum in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mindspore-ai/mindquantum --skill mindquantum -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mindquantum, .gemini/skills/mindquantum, .github/skills/mindquantum and .opencode/skills/mindquantum in your project.
Going by SKILL.md and its folder, Mindquantum needs the command-line tools its instructions call (pip and python). Our summary lists: Python 3.
SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Mindquantum is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.3k tokens (SKILL.md is roughly 9.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Mindquantum: Cudaq Importing (NVIDIA/skills, 3.5k stars), Qiskit 2.x Quantum ML Reference (aiming-lab/AutoResearchClaw, 15k stars), DiffDock Molecular Docking (K-Dense-AI/scientific-agent-skills, 48k stars) and Pennylane (davila7/claude-code-templates, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
mindspore-ai (a GitHub organization) maintains it in mindspore-ai/mindquantum, which has 101 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on September 21, 2026.
Source: mindspore-ai/mindquantum on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.