A method generates constant modulus multi-dimensional modulations for coherent optical communications by first projecting points in a constellation of the code onto a Poincare sphere or its higher-dimensional hyper-sphere. By using meta-heuristic procedures, nonlinear programming and gradient search methods, constellation points in the hyper-sphere are optimized in certain criteria, such as maximizing the minimum Euclidean distance, minimizing the union bound, minimizing the bit-error rate, minimizing the required signal-to-noise ratio, maximizing the nonlinear fiber reach, maximizing the phase noise tolerance, and maximizing the mutual information. Some methods use parametric unitary space-time block codes such as Grassmannian packing, and filter impulse response as well as unitary rotation over adjacent code blocks to generate near-constant modulus waveform, not only at the symbol timing, but also over the entire time.