What problem does it solve? Preparing an arbitrary target quantum state on a quantum circuit requires choosing a gate sequence and its parameters; this Skill fits the angles of a fixed Pauli-word rotation ansatz so the emitted circuit reproduces a given target state vector within a requested error tolerance. ## Core Features & Use Cases - Variational State Preparation: Fits one rotation angle per Pauli word using deterministic multi-start L-BFGS-B optimization of the infidelity objective with parameter-shift gradients. - Circuit Emission and Validation: Emits the flattened Pauli-rotation circuit, extracts the prepared state from its dense matrix, and reports a global-phase-invariant L2 error with an ok/failed status. - Debugging and Reimplementation Guidance: Documents the exact ansatz ordering, optimizer settings, return contract, and a minimal manual implementation decomposing rotations into H, P, CX, RZ, and S gates. - Use Case: Given a one-qubit target state like [1, 1j]/sqrt(2), run PauliAlgorithm to obtain fitted weights, the prepared state, and a total error below 1e-6 for use in downstream quantum algorithm workflows. ## Quick Start Ask the assistant to run the Pauli state-preparation algorithm on a normalized one-qubit target vector with target_qubits=1 and target_error=1e-6, then report the status, fitted weights, and total error.