We consider the problem of optimization of an effective trapping potential in a nanostructure with a quasi-one-dimensional geometry. The optimization is performed to achieve certain target optical properties of the system. We formulate and solve the optimization problem for a nanostructure that serves either as a single molecule detector or as a "quantum disguise" for a single molecule.The rapid advance in fabrication techniques makes it possible to control the composition and geometry of nanostructured systems and materials on atomic scales [1]. One of the most interesting and challenging problems in modern nanoscience is how to utilize these fabrication capabilities to control the interaction of electromagnetic fields with nanostructured media. A successful solution to this problem would make possible the design of, for example, high energy density storage applications, or multifunctional nanophotonic materials with predefined prop-There is, in general, a complex relationship between the effective electron trapping potential in a nanostructure and the nanostructure's optical properties. One can usually solve this problem for a chosen geometry and structure of the system, thus for a given trapping potential. However, the inverse problem to find an optimal geometry of the nanostructure to attain desired optical properties seems much more complicated. In particular, the matter-field interaction becomes complex in the quantum limit of very small nanostructures, containing only a few electrons. Quantum mechanical corrections and the non-locality of the electromagnetic response become significant for system sizes comparable to a typical electron wavelength. This condition may be satisfied for such small objects as quantum dots, or for the next generation of microchips [3]. For example, for the semiconductor GaAs with a doping level of 10 18 cm −3 and effective electron mass m * e = 0.07 × m e , the Fermi wavelength λ F ≈ 20nm is on the length scale currently available in microchip design. Thus, the problem has both fundamental and applied significance, and there is a strong demand for methods to efficiently explore the optimal design of quantum nanoscale devices.A systematic approach to the theoretical analysis of optimal design of potentials in quantum scattering in semiconductor nanodevices was first developed in [4]. Twelve years later, an optimal design problem with similar objectives was considered in [5]. In [6] a simple tightbinding model was considered in two dimensions with the aim of fitting a target density of states, and as a result, also describing the basic response properties of the system. Another interesting example of inverse band structure engineering was considered for nitrogen impurities in GaP [7].One of the potential applications of optimal design of nanostructures is to the engineering of efficient single molecule detectors. Single molecule sensing by means of optical excitation is receiving increasing attention [8]. In this work we will demonstrate that with the help of quantum design it is ...