  We address the reflection optimization problem for a reconfigurable
intelligent surface (RIS), where the RIS elements feature a set of
non-uniformly spaced discrete phase shifts. This is motivated by the actual
behavior of practical RIS elements, where it is shown that a uniform phase
shift assumption is not realistic. A problem is formulated to find the optimal
refection amplitudes and reflection phase shifts of the RIS elements such that
the channel capacity of the target user is maximized. We first prove that in
the optimal configuration, each RIS element is either turned off or operates at
maximum amplitude. We then develop a method that finds the optimal reflection
amplitudes and phases with complexity linear in the number of RIS elements.
Some new and interesting insight into the reflection optimization problem is
also provided.
