Devices using ternary or multinary compounds