NOVELTY - A thin-film solar cell comprises first and second electrical contacts and a chalcogenide layer of specific quaternary chalcogenide compounds between the first and second electrical contacts. The elements of the compound within the layer have values that result in p-type conductivity at a depth adjacent the first electrical contact and n-type conductivity at a depth adjacent the second electrical contact.    USE - As thin-film solar cell (claimed) for converting sunlight into electric energy and as sustainable source of energy.    ADVANTAGE - The solar cell contains chalcogenide layer comprising parts with different types of conductivity which is formed by using single deposition process. This allows an efficient manufacturing process in which the solar cell is formed in a single deposition tool. The solar cells are intrinsic semiconductors, have lower manufacturing costs, exhibit good light absorption characteristics, and have higher conversion efficiency. The combination of elements in the photovoltaic material can replace the element indium which is becoming scarce, while the quaternary compound has physical and electronic properties of a photovoltaic material, which are similar to those of copper indium sulfide. The solar cell comprising the compound Cu2A'xnB'y1nS4 of the n-type contact layer (NC) can be coherent with the compound Cu2A'xB'y1S4 of the photovoltaic layer (PV), which reduces the mismatch between the lattice of the NC layer and the lattice of the PV layer. As a result the recombination effects at the interface between the NC layer and the PV layer is reduced and the efficiency of the solar cell is increased. Additionally, the use of n- Cu2A'xnB'y1nS4 and p-Cu2A'xB'y1S4 contact layers has the advantage that in particular the copper and sulfur concentration in the p-type contact layer (PC), N-type contact layer (NC) and in the photovoltaic layer (PV) is substantially the same. This reduces the risk of diffusion of elements from one layer to another one of the layers, adversely affect the composition of each PC or NC layer, and also create a composition gradient that can change the electronic functions at the interfaces. Moreover, the substantial absence of Cu and S concentration differences between the contact layers PC, NC and the photovoltaic layer (PV) allow the use of relatively high temperatures during manufacturing since the absence of a concentration gradient for Cu and/or S between the layers reduces the driving force for diffusion (Cu has a high diffusion coefficient, and thus is most prone to diffuse). At the same time a high temperature process may improve the crystallinity of the layers as they form.    DETAILED DESCRIPTION - A thin-film solar cell comprises first and second electrical contacts and a chalcogenide layer of CucA'x(d)B'y1(d)Z's quaternary chalcogenide compounds between the first and second electrical contacts. The element B'is different from element A', and element Z'is one from a group of elements S or Se, where the relative amounts x(d), y1(d) of A'and B'vary as a function of depth (d), within the layer, having values that result in p-type conductivity at a depth adjacent the first electrical contact and values that result in n-type conductivity at a depth adjacent the second electrical contact. The relative amounts x(d), y1(d) having values that correspond to CucA'x(d)B'y1(d)Z's compounds with coherent crystal lattices throughout the layer as a function of the depth.    A'=one of the group of Zn, Mg, Ca, Sr, Ba, Eu, Yb, Mn, Fe, Ag, Ge, Sn or B; or one from the group of Sn, Ce, Yb, Fe, Si, Ge , Ti, Zr, Hf, V, Nb, Ta, Mo, W or Re.    An INDEPENDENT CLAIM is included for manufacturing the thin-film solar cell on a substrate involving forming an chalcogenide layer by depositing CucA'x(d)B'y1(d)Z's compounds; and varying deposition parameters during formation of the chalcogenide layer, to vary the relative amounts x(d), y1(d) of A'and B', respectively, as a function of depth (d), in the chalcogenide layer, under a restriction that combinations of values of the varying relative amounts x(d), y1(d) are those of CucA'x(d)B'y1(d)Z's compounds with coherent respective crystal lattices. The combinations of values of the relative amounts x(d), y1(d) varying between a first combination of values that results in p-type conductivity and a second combination of values that results in n-type conductivity.