40G still runs widely in spine-leaf networks and between data center halls. These QSFP+ optics are for single-mode fiber: LR4 for 10 km, ER4 for 40 km and ZR4 for 80 km. The LR4 and ER4 have a duplex LC connector, so you use two fibers just like an SFP+.
Use the same type at both ends, so LR4 facing LR4. An ER4 or ZR4 on a short link can overload the receiver; then you need an attenuator. Within the rack, a DAC cable is often cheaper and uses less power. We code every optic for your platform, from Cisco and Juniper to Arista.