What mode are you using in CircInspect?
Expected behavior
When a helper function contains conditional logic and no quantum operations are executed (i.e., the condition is not met), the helper function should not appear in the circuit visualization.
Specifically, if a helper function does not modify the circuit in any way for a given execution path, it should be omitted from the rendered circuit.
Actual behavior
The helper function is still shown in the circuit visualization even when the conditional branch is not taken and the function performs no operations on the circuit.

Code used for testing
import pennylane as qml
dev = qml.device("default.qubit", wires=2)
@qml.qnode(device=dev)
def my_circuit():
qml.Hadamard(wires=0)
qml.CNOT([0,1])
helper(1)
return qml.probs()
def helper(a):
if a == 0:
qml.PauliX(0)
# Execute a QNode to render a circuit in the righthand pane
my_circuit()
System information
OS: Windows 11 Home
Browser: Google Chrome 143.0.7499.170
What mode are you using in CircInspect?
Expected behavior
When a helper function contains conditional logic and no quantum operations are executed (i.e., the condition is not met), the helper function should not appear in the circuit visualization.
Specifically, if a helper function does not modify the circuit in any way for a given execution path, it should be omitted from the rendered circuit.
Actual behavior
The helper function is still shown in the circuit visualization even when the conditional branch is not taken and the function performs no operations on the circuit.
Code used for testing
System information
OS: Windows 11 Home
Browser: Google Chrome 143.0.7499.170