We prove new lower bounds for locally decodable codes and private information retrieval. We show that a 2-query LDC encoding nbit strings over an ℓ-bit alphabet, where the decoder only uses b bits of each queried position, needs code length m = exp Ω n 2b b i=0 (ℓ i) . Similarly, a 2-server PIR scheme with an n-bit database and t-bit queries, where the user only needs b bits from each of the two ℓ-bit answers, unknown to the servers, satisfies t = Ω n 2b b i=0 (ℓ i) . This implies that several known PIR schemes are close to optimal. Our results generalize those of Goldreich et al. [8], who proved roughly the same bounds for linear LDCs and PIRs. Like earlier work by Kerenidis and de Wolf [12], our classical bounds are proved using quantum computational techniques. In particular, we give a tight analysis of how well a 2-input function can be computed from a quantum superposition of both inputs.