  The development of quantum computers has been advancing rapidly in recent
years. As quantum computers become more widely accessible, potentially
malicious users could try to execute their code on the machines to leak
information from other users, to interfere with or manipulate the results of
other users, or to reverse engineer the underlying quantum computer
architecture and its intellectual property, for example. Among different
security threats, previous work has demonstrated information leakage across the
reset operations, and it then proposed a secure reset operation could be an
enabling technology that allows the sharing of a quantum computer among
different users, or among different quantum programs of the same user. This
work first shows a set of new, extended reset operation attacks that could be
more stealthy by hiding the intention of the attacker's circuit. This work
shows various masking circuits and how attackers can retrieve information from
the execution of a previous shot of a circuit, even if the masking circuit is
used between the reset operation (of the victim, after the shot of the circuit
is executed) and the measurement (of the attacker). Based on the uncovered new
possible attacks, this work proposes a set of heuristic checks that could be
applied at transpile time to check for the existence of malicious circuits that
try to steal information via the attack on the reset operation. Unlike run-time
protection or added secure reset gates, this work proposes a complimentary,
compile-time security solution to the attacks on reset~operation.
