What problem does it solve? Preparing an arbitrary complex quantum state on a register requires a precise decomposition into elementary gates, and hand-deriving the amplitude and phase rotation angles, Gray-code ordering, and bit-reversal conventions is error-prone. This Skill explains, runs, debugs, and reimplements the UnitaryLab Möttönen state-preparation algorithm with its exact repository contract. ## Core Features & Use Cases - Deterministic state preparation: Run MottonenAlgorithm from unitarylab_algorithms to normalize, pad, and prepare a complex amplitude vector with a phase-invariant error check. - Algorithm explanation and debugging: Diagnose probability, phase, endianness, global-phase, padding, and angle-count errors using the documented Gray-code ladder and bit-reversal conventions. - Manual reimplementation: Build the circuit from elementary RY, RZ, and CX gates using the provided minimal implementation that derives angles directly from amplitudes and phases. - Use Case: Given a target vector like [1, 1j, 1, -1j]/2 on 2 qubits, generate the preparation circuit, verify status == "ok", and confirm fidelity above 1 - 1e-12. ## Quick Start Ask the assistant to run the Möttönen state preparation on your complex amplitude vector with a specified number of target qubits and report the status, total error, and fidelity.