Noncommutative analysis and quantum physics I. States and ensembles