Translate the fraud detector in Strawberry fields to PennyLane

Hi there, I am traying to translate the code in this link https://github.com/XanaduAI/quantum-neural-networks/blob/master/fraud_detection/fraud_detection.py written with Strawberry Fields to Pennylane.

Is there any way to do it following the tutorials in the PennyLane site?

Hi @abignu, this sounds like a nice task and also shouldn’t be too hard to do.

The best tutorial to follow in PennyLane is this one: https://pennylane.ai/qml/app/quantum_neural_net.html
This tutorial constructs a single mode photonic quantum neural network. You’d need to extend this to the two mode QNN used in the fraud detection model.

As the fraud detection model is a hybrid, you can use the TensorFlow interface when defining your qnode: https://pennylane.readthedocs.io/en/stable/introduction/interfaces/tf.html.

One thing to be aware of is that the fraud detection code is designed for TensorFlow version 1.3 but the TF interface in PennyLane requires a newer TF version of at least 1.12.

Let me know how it goes and I’ll be happy to help if you get stuck!
Thanks
Tom

Hi @Tom_Bromley thanks for the quick reply. I will check the links you have passed me. If I have any issue I will let you know.

Thanks in advance