noise-experiments
Construct and validate PyQuil noise channels, readout corrections, Pauli observables, and experiment settings while keeping model construction separate from backend execution.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- noise-experiments
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Construct and validate PyQuil noise channels, readout corrections, Pauli observables, and experiment settings while keeping model construction separate from backend execution.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/noise-models.md11.8 KB
- 参考文档references/pauli-and-experiment-api.md11.5 KB
- 参考文档references/troubleshooting.md10.6 KB
- 参考文档references/workflows.md8.6 KB
- 脚本scripts/noise_model_smoke.py6.8 KB
03 SKILL.md 正文
Noise experiments
Use this sub-skill when the task involves any of the following:
- Kraus gate noise, assignment/readout matrices, decoherence, or noise pragmas.
PauliTerm/PauliSumalgebra, grouping, exponentiation, or observable bases.ExperimentSetting,Experiment, calibration, readout symmetrization, orExperimentResultinterpretation.- Preparing an experiment for a
QuantumComputerwithout claiming that a QVM, QPU, QCS, or other service was reached.
Route before acting
- Constructing or inspecting a
Program, gates, declarations, measurements, or Quil text belongs in program-authoring. - Compiling, submitting jobs, configuring QVM/QPU/QCS clients, or consuming raw QAM results belongs in compile-execute.
- Statevector/density-matrix simulation and numerical simulator internals belong in simulation.
- Processor topology and ISA construction belongs in processor-isa.
Read noise-models.md for API selection, shapes, channel formulas, and the legacy/new boundary. Read pauli-and-experiment-api.md for exact object contracts. Read workflows.md before composing a model or experiment. Use troubleshooting.md when a validation or execution boundary fails.
Core operating rules
- Treat
pyquil.noise.KrausModelandpyquil.noise.NoiseModelas the supported public, legacy Kraus/QVM surface in 4.18.0. A model contains definitions; it is not evidence that any backend executed them. - Build a map with square complex operators. For
nqubits each operator is(2**n, 2**n)and a trace-preserving map satisfiessum(K.conj().T @ K) = eye(2**n). Check this before attaching pragmas. tensor_kraus_maps(k1, k2)combines independent maps on different qubits;combine_kraus_maps(k1, k2)composes maps on the same qubits withk2first andk1second.append_kraus_to_gatepost-multiplies a gate by each Kraus operator (K @ U).apply_noise_model(program, model)returns a new transformedProgramwith definitions andPRAGMA ADD-KRAUS/READOUT-POVMheaders. Inspect its Quil; do not call this transformation a run or a physical calibration.- Keep the two legacy readout representations distinct. A
READOUT-POVM/estimate_assignment_probsconditional matrix is laid out as[[p00, 1-p11], [1-p00, p11]](observed rows, prepared columns), while the legacyNoiseModel.assignment_probsproduced by decoherence helpers stores[[p00, 1-p00], [1-p11, p11]]and the header reconstructs the POVM from its diagonals. The probability tensor has one length-2 axis per measured bit in the same order as the shot columns. - Pauli coefficients used for measured expectations must be real. Bits map to
eigenvalues as
0 -> +1and1 -> -1; ann-bit joint expectation is the product over selected columns. Experimentdefaults to exhaustive symmetrization and plus-eigenstate calibration. These increase backend work. Explicitly chooseshots, the symmetrization level, and calibration policy for reproducibility.- In 4.18.0
QuantumComputer.run_experimentcompiles and executes through its configured backend and rejects grouped settings (len(settings) > 1).pyquil.operator_estimation.measure_observablesremains importable and can process grouped settings, but still needs a usableQuantumComputerand backend. Stop at the service boundary if those are unavailable.
Minimal local validation
For a service-free smoke check, run the bundled helper when you need to validate Kraus completeness, readout tensor correction, and transformed Quil:
python scripts/noise_model_smoke.py --help
python scripts/noise_model_smoke.py
The helper uses tiny deterministic arrays and a two-qubit Program; it never
starts a service, reads credentials, compiles, submits, or downloads anything.
Its successful output proves construction/transformation only. For a detailed
manual workflow, use workflows.md.
Handoff checklist
Before handing an operating plan to another agent, record:
- model family (legacy public Kraus versus private/new quax channel), channel dimensions, completeness/CP-TP checks, and qubit/operand ordering;
- supported gate/parameter matches and whether noise was applied once or twice;
- which legacy readout representation is in use (internal
NoiseModel.assignment_probsversus POVM/calibration matrix), axis/qubit ordering, correction conditioning, shot count, and any negative or out-of-range corrected probabilities; - Pauli settings, grouping method, compatible preparation/measurement bases, symmetrization level and trial expansion, calibration denominator, and result uncertainty;
- exact next execution owner and missing QVM/QPU/QCS/compiler credentials or
services. Never report a constructed model or generated
Programas an executed experiment.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).