The problem addressed is to design a detector which is maximally sensitive to specific quantum states. Here we concentrate on quantum state detection using the worst-case a posteriori probability of detection as the design criterion. This objective is equivalent to asking the question: if the detector declares that a specific state is present, what is the probability of that state actually being present? We show that maximizing this worst-case probability (maximizing the smallest possible value of this probability) is a quasiconvex optimization over the matrices of the POVM (positive operator valued measure) which characterize the measurement apparatus. We also show that with a given POVM, the optimization is quasiconvex in the matrix which characterizes the Kraus operator sum representation (OSR) in a fixed basis. We use Lagrange Duality Theory to establish the optimality conditions for both deterministic and randomized detection. We also examine the special case of detecting a single pure state. Numerical aspects of using convex optimization for quantum state detection are also discussed.