A general quantum difference calculus