A Josephson junction comprising a junction barrier layer sandwiched between two superconducting layers, whereby at least one protective layer is in contact with at least one of the two superconducting layers, and whereby the at least one protective layer is superconductive, or induced into superconductivity at superconducting temperatures by proximity to the at least one of the two superconducting layers, wherein at superconducting temperatures the protective layer conducts a current without resistance between the first and second superconducting layers without switching, and acts to decrease a density of defects in the Josephson junction due to impurities diffusible in at least one of the two superconducting layers at room temperature.