Possible to create a QNN like classical one?

Hi Tom

Trying to run the program fraud_detction.py. The error message comes out " is “AttributeError: module ‘tensorflow’ has no attribute ‘placeholder’”. I solved it by putting " import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()“. This problem then doesn’t come out anymore but another problem come out " from .circuit import Circuit …trawberryfields\backends\tfbackend\circuit.py”, line 304 “alpha = self._maybe_batch(alpha)” IndentationError: expected an indented block. How to solve this? Thanks

Do you mean I set either classification = tf.placeholder(shape=[batch_size, 2,2], dtype=tf.int32) OR classification = tf.placeholder(shape=[batch_size, 4], dtype=tf.int32) which gives prob = tf.abs(ket[i, classification[i, 0, 0], classification[i, 0, 1], classification[i, 1, 0],[i, 1,1]]) ** 2 OR prob = tf.abs(ket[i, classification[i, 0], classification[0, 1], classification[i, 02],[i,3]]) ** 2? Following that I just need to take out the one-hot part, the probaility I get will be the prediction values, am I right? This {classification: one_hot_input} also has to take it off ?

Thanks