executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
noise-experimentsConstruct and validate PyQuil noise channels, readout corrections, Pauli observables, and experiment settings while keeping model construction separate from backend execution.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this sub-skill when the task involves any of the following:
PauliTerm/PauliSum algebra, grouping, exponentiation, or observable bases.ExperimentSetting, Experiment, calibration, readout symmetrization, or
ExperimentResult interpretation.QuantumComputer without claiming that a QVM,
QPU, QCS, or other service was reached.Program, gates, declarations, measurements, or
Quil text belongs in program-authoring.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.
pyquil.noise.KrausModel and pyquil.noise.NoiseModel as the
supported public, legacy Kraus/QVM surface in 4.18.0. A model contains
definitions; it is not evidence that any backend executed them.n qubits each operator is
(2**n, 2**n) and a trace-preserving map satisfies
sum(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 with k2
first and k1 second. append_kraus_to_gate post-multiplies a gate by each
Kraus operator (K @ U).apply_noise_model(program, model) returns a new transformed Program with
definitions and PRAGMA ADD-KRAUS/READOUT-POVM headers. Inspect its Quil;
do not call this transformation a run or a physical calibration.READOUT-POVM/estimate_assignment_probs conditional matrix is laid out as
[[p00, 1-p11], [1-p00, p11]] (observed rows, prepared columns), while the
legacy NoiseModel.assignment_probs produced 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.0 -> +1 and 1 -> -1; an n-bit joint expectation is the
product over selected columns.Experiment defaults to exhaustive symmetrization and plus-eigenstate
calibration. These increase backend work. Explicitly choose shots, the
symmetrization level, and calibration policy for reproducibility.QuantumComputer.run_experiment compiles and executes through its
configured backend and rejects grouped settings (len(settings) > 1).
pyquil.operator_estimation.measure_observables remains importable and can
process grouped settings, but still needs a usable QuantumComputer and
backend. Stop at the service boundary if those are unavailable.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.
Before handing an operating plan to another agent, record:
NoiseModel.assignment_probs versus POVM/calibration matrix), axis/qubit
ordering, correction conditioning, shot count, and any negative or
out-of-range corrected probabilities;Program as an
executed experiment.