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
operators-transformsUse PennyLane operations, templates, observables, op math, decompositions, compile pipelines, transforms, and custom-operator validation.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this sub-skill when a task asks which operation/template to use, how to compose observables, how to inspect operator matrices/eigenvalues, how to decompose or compile a circuit, or how to add/validate custom operators.
references/api-reference.md: verified signatures and API groups for operations, templates, op math, and transforms.references/workflows.md: recipes for operator composition, template shape checks, decomposition/compile, and custom operators.references/troubleshooting.md: shape, wire, differentiability, decomposition, and custom-operator failures.scripts/operator_validation.py: tiny custom operator plus assert_valid check.scripts/decompose_smoke.py: safe decomposition/compile smoke.qp.RX, qp.RY, qp.RZ, qp.CNOT, qp.Hadamard, qp.PauliX/Y/Z, and measurement observables through circuits/devices.qp.AngleEmbedding, qp.AmplitudeEmbedding, qp.StronglyEntanglingLayers, state-preparation templates, subroutines, and tensor-network templates when a workflow needs reusable ansatz structure.qp.sum, qp.prod, qp.s_prod, qp.pow, qp.adjoint, qp.ctrl, qp.cond, qp.exp, qp.dot, qp.commutator, and qp.pauli_decompose to compose or analyze operators.qp.matrix, qp.eigvals, qp.generator, qp.is_unitary, qp.is_hermitian, qp.is_commuting, qp.equal, qp.assert_equal, qp.simplify, and qp.map_wires.qp.transform for custom tape transforms; use packaged transforms such as qp.compile, qp.decompose, batching transforms, qp.defer_measurements, dynamic-one-shot, Clifford+T decomposition, and pattern matching.pennylane.ops.functions.assert_valid(op).../circuits-devices/SKILL.md.../gradients-interfaces/SKILL.md.../applications-qchem-resource/SKILL.md, but the resulting qubit operators can be inspected here.../repo-development/SKILL.md.import pennylane as qp
op = 0.5 * qp.PauliZ(0) + qp.PauliX(1) @ qp.PauliZ(2)
print(qp.simplify(op))
print(qp.matrix(qp.RX(0.2, wires=0)))
@qp.qnode(qp.device("default.qubit", wires=3))
def circuit(x):
qp.AngleEmbedding(x, wires=range(3), rotation="Y")
qp.StronglyEntanglingLayers(qp.numpy.zeros((1, 3, 3)), wires=range(3))
return qp.expval(op)
print(qp.draw(qp.compile(circuit))(qp.numpy.array([0.1, 0.2, 0.3])))
For a useful answer, include expected parameter shapes, wire conventions, transform level (user, device, or gradient) when drawing/compiling, and a validation step such as assert_valid, qp.matrix, qp.draw, or focused tests for source changes.