  I. This paper is devoted to the problem of error detection with quantum
codes. In the first part we examine possible problem settings for quantum error
detection. Our goal is to derive a functional that describes the probability of
undetected error under natural physical assumptions concerning transmission
with error detection over the depolarizing channel. We discuss possible
transmission protocols with stabilizer and unrestricted quantum codes. The set
of results proved in Part I shows that in all the cases considered the average
probability of undetected error for a given code is essentially given by one
and the same function of its weight enumerators. This enables us to give a
consistent definition of the undetected error event.
