The purpose of this paper is to introduce techniques of obtaining optimal ways to determine a [Formula: see text]-level quantum state or distinguish such states. It entails designing constrained elementary measurements extracted from maximal abelian subsets of a unitary basis [Formula: see text] for the operator algebra [Formula: see text] of a Hilbert space [Formula: see text] of finite dimension [Formula: see text] or, after choosing an orthonormal basis for [Formula: see text], for the ⋆-algebra [Formula: see text] of complex matrices of order [Formula: see text]. Illustrations are given for the techniques. It is shown that the Schwinger basis [Formula: see text] of unitary operators can give for [Formula: see text], a product of primes [Formula: see text] and [Formula: see text], the ideal number [Formula: see text] of rank one projectors that have a few quantum mechanical overlaps (or, for that matter, a few angles between the corresponding unit vectors). Finally, we give a combination of the tensor product and constrained elementary measurement techniques to deal with all [Formula: see text], though with more overlaps or angles depending on the factorization of [Formula: see text] as a product of primes or their powers like [Formula: see text] with [Formula: see text], all primes, [Formula: see text] for [Formula: see text], or other types. A comparison is drawn for different forms of unitary bases for the Hilbert space factors of the tensor product like [Formula: see text] or [Formula: see text], where [Formula: see text] is the Galois field of size [Formula: see text] and [Formula: see text] is the ring of integers modulo [Formula: see text]. Even though as Hilbert spaces they are isomorphic, but quantum mechanical system-wise, these tensor products are different. In the process, we also study the equivalence relation on unitary bases defined by R. F. Werner [J. Phys. A: Math. Gen. 34 (2001) 7081–7094], connect it to local operations on maximally entangled vectors bases, find an invariant for equivalence classes in terms of certain commuting systems, called fan representations, and, relate it to mutually unbiased bases and Hadamard matrices. Illustrations are given in the context of Latin squares and projective representations as well.