We propose a full-quantum method for generating a cosine wave, which encodes a continuous cosine function cos(2π(x−x0)/P) directly into the prob- ability amplitudes of a quantum state using controlled interference between a single ancillary qubit and a set of work qubits. Unlike existing quantum co- sine transforms (QCT) or function evaluation circuits, our circuit completely avoids any classical cosine computation and requires neither a full quantum Fourier transform module nor a large number of ancillary qubits. On a 12- qubit statevector simulator, the unnormalized quantum amplitudes maintain a strictly constant ratio to the classical cosine values for all basis states (mean 0.015625 = 1/64, standard deviation 4.78e10−17), and the peak positions coincide with theoretical predictions within machine precision. This compact interference structure provides a low-resource building block for quantum state preparation, quantum feature maps, and quantum signal processing.
Huang Feiyue (Thu,) studied this question.