  Inserting nonreciprocal devices at the doorways of Alice and Bob is a widely
recognized countermeasure against quantum hacking attacks in quantum key
distribution (QKD) systems. However, traditional integrated nonreciprocal
devices, which are typically based on magneto-optical effects, face challenges
in compatibility with current semiconductor integration technology. As a
result, earlier chip-based QKD systems were unable to integrate nonreciprocal
components and were vulnerable to injecting-type attacks. Based on the actual
parameters of SOI integration, we employed the inverse design with the direct
binary search algorithm to construct several magnetic-free nonreciprocal
devices, facilitating their integration into chip-based QKD systems while
meeting various chip configuration design requirements. The designed devices
have sizes of only a few square micrometers, yet the quasi-isolator can achieve
an isolation level exceeding 27 dB. To demonstrate their practical utility in
QKD, we employed the designed devices to safeguard the QKD system against
Trojan-horse attacks. The simulation results demonstrate that our proposed
devices effectively secure the BB84 and measure-device-independent QKD systems
against Trojan-horse attacks.

Quantum Physics