Theory of nth-order linear general quantum difference equations