**Abstract**

A *s*uperconducting *qu*antum *i*nterference *d*evice (SQUID) is the most sensitive magnetic flux sensor currently known. The SQUID can be seen as a flux to voltage converter, and it can generally be used to sense any quantity that can be transduced into a magnetic flux, such as electrical current, voltage, position, etc. The extreme sensitivity of the SQUID is utilized in many different fields of applications, including biomagnetism, materials science, metrology, astronomy and geophysics. The heart of a squid magnetometer is a tunnel junction between two superconductors called a Josephson junction. Understanding the work of these devices rests fundamentally on the BCS theory of superconductivity. In this chapter, we introduce the notion of local potential and confinement in superconductivity. We show how BCS ground state is formed from interaction of wave packets confined to these local potential wells. The starting point of the BCS theory of superconductivity is a phonon-mediated secondorder term that describes scattering of electron pair at Fermi surface with momentum *ki,* � *ki* and energy 2ℏ*ω<sup>i</sup>* to *kj,* � *kj* with energy 2ℏ*ωj*. The transition amplitude is <sup>M</sup> ¼ � *<sup>d</sup>*<sup>2</sup> *ωd* ð Þ *<sup>ω</sup>i*�*ω<sup>j</sup>* 2 �*ω*<sup>2</sup> *d* , where *d* is the phonon scattering rate and *ω<sup>d</sup>* is the Debye frequency. However, in the presence of offset *ω<sup>i</sup>* � *ωj*, there is also a present transition between states *ki,* � *ki* and *kj,* � *ki* of sizable amplitude much larger than M. How are we justified in neglecting this term and only retaining M? In this chapter, we show all this is justified if we consider phonon-mediated transition between wave packets of finite width instead of electron waves. These wave packets are in their local potentials and interact with other wave packets in the same well to form a local BCS state we also call BCS molecule. Finally, we apply the formalism of superconductivity in finite size wave packets to high *Tc* in cuprates. The copper electrons in narrow dband live as packets to minimize the repulsion energy. The phonon-mediated coupling between wave packets (of width Debye energy) is proportional to the number of k-states in a packet, which becomes large in narrow d-band (10 times s-band); hence, d-wave *Tc* is larger (10 times s-wave). At increased doping, packet size increases beyond the Debye energy, and phonon-mediated coupling develops a repulsive part, destroying superconductivity at large doping levels.

**Keywords:** local potentials, superconductivity, phonons, Josephson junctions, squids
