Efficient heralding of photonic qubits with applications to device-independent quantum key distribution | Synapse