I am a student working on event reconstruction software in a high-energy physics experiment.
The framework we use is C+±based, called Wire-Cell Toolkit.
So far, our development team has been using a U-Net model for semantic segmentation in signal processing.
The classical U-Net (PyTorch) can be exported via torch.jit.trace() into TorchScript and then successfully loaded in C++.
Now, I am experimenting with a hybrid quantum–classical model (U-Net + PennyLane QNode) as a prototype within the same C++ framework.
However, when I try to export the hybrid model using the same approach (torch.jit.trace()), the process fails.
The error arises because PennyLane’s QNode depends on qml.math.is_abstract, which is not TorchScript compatible.
So my question is: What are the possible strategies or ideas for deploying a PennyLane–PyTorch hybrid model inside a C++ framework, given that TorchScript export is not compatible with PennyLane QNodes?