Bell inequality violation is one of the most widely known manifestations of entanglement in quantum mechanics; indicating that experiments on physically separated quantum mechanical systems cannot be given a local realistic description. However, despite the importance of Bell inequalities, it is not known in general how to determine whether a given entangled state will violate a Bell inequality. This is because one can choose to make many different measurements on a quantum system to test any given Bell inequality and the optimization over measurements is a high-dimensional variational problem. In order to better understand this problem we present algorithms that provide, for a given quantum state, both a lower bound and an upper bound on the maximal expectation value of a Bell operator. Both bounds apply techniques from convex optimization and the methodology for creating upper bounds allows them to be systematically improved. In many cases these bounds determine measurements that would demonstrate violation of the Bell inequality or provide a bound that rules out the possibility of a violation. Examples are given to illustrate how these algorithms can be used to conclude definitively if some quantum states violate a given Bell inequality. |