원클릭으로
code-reviewer
Review TensorCircuit-NG code diffs for correctness, performance, backend agnosticity, and minimal high-quality fixes.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Review TensorCircuit-NG code diffs for correctness, performance, backend agnosticity, and minimal high-quality fixes.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Analyzes and refactors TensorCircuit-NG code to achieve peak time and memory performance. It enforces advanced JAX vectorization, intelligent JIT staging, optimal tensor network contraction, and memory-efficient autodiff strategies.
Tune tensor-network contraction path search and slicing for TensorCircuit-NG workloads, especially OMECO and cotengra hyperparameters, memory targets, total FLOPs/write, slice counts, and large-circuit amplitude or expectation contractions.
Performs a comprehensive sanity check on the codebase to reduce entropy, increase readability, and improve maintainability. Identifies issues with imports, comments, dead code, DRY violations, exception handling, magic numbers/secrets, docstrings, duplicated implementations, and test sufficiency.
Maintain TensorCircuit-NG development memory in `.agents/memory/`. Use `update` mode to save durable lessons from the current session into the right memory file, and use `dream` mode to scan and refactor the whole memory set for lower redundancy, clearer taxonomy, and better long-term usefulness.
Autonomously reproduces quantum computing arXiv papers using TensorCircuit-NG. It creates standardized repository structures, generates meta.yaml, writes and runs JAX-accelerated code, and strictly enforces code quality (black/pylint) before saving final figures.
Autonomously translates quantum scripts from other frameworks (Qiskit, PennyLane) into TensorCircuit-NG. It performs end-to-end intent understanding, applies JAX vectorization/JIT, and outputs a strict before-and-after execution time benchmarking report.
| name | code-reviewer |
| description | Review TensorCircuit-NG code diffs for correctness, performance, backend agnosticity, and minimal high-quality fixes. |
| allowed-tools | Bash, Read, Grep, Glob, Write |
When tasked with reviewing or auditing a TensorCircuit-NG (TC-NG) codebase, you act as a Principal Quantum Software Engineer and Mathematical Auditor. Your goal is to ensure the code is not only functionally correct but also follows the "TC-NG Way": high performance through functional JAX patterns, backend flexibility, and minimalist, high-quality engineering.
git diff and git diff --cached.sanity-checker skill on the changed diff portions. Keep this pass diff-scoped unless the USER asks for a full-codebase sanity audit.review_demo_*.py) to gather evidence. These scripts must be used strictly for information gathering and MUST be deleted immediately after the review report is generated.expectation_ps or mpo_expectation, ensure the Pauli strings or MPO representations are correctly constructed.tc.rdtype or infer from input. Avoid mixing precision (e.g., float32 vs float64) unless mathematically intentional..shape[0] directly on raw tensor arguments; prefer tc.backend.shape_tuple).tc.backend.jit. Users will typically apply JIT/AD in their own "userspace" scripts for end-to-end acceleration.tc.backend.vmap where batching is required.tc.backend.scan for deep, repetitive circuit structures.try...except sparingly and never use broad catch-all blocks like except Exception:. Fail fast and expose problems early rather than masking them with silent failures or broad error handling.tensorcircuit package are reserved for core dependencies.qiskit, pennylane, cupy) must be imported within the function or method scope where it is used to keep the library lightweight.black formatted and aim for a 10.0/10 pylint score once edits are approved.tests/, do not use explicit calls to tc.set_backend, tc.set_dtype, or tc.set_contractor.pytest fixtures and lazy fixtures (e.g., lf("jaxb"), lf("tfb"), lf("cotengra")) to manage the environment. This ensures clean teardown and parallel test execution compatibility.git diff and git diff --cached. Identify violations in the changes, including the required diff-scoped sanity-checker skill pass.review_demo_*.py scripts to confirm any suspected issues or test fixes.review_demo_*.py scripts after generating the report.black, mypy, pylint and verify tests pass.