Hi, I was going through this paper : ArXiv 1806.06871 and the respective code and I was wondering why this (see below) happens.
Here the Dgate
and the Kgate
are applied to q[0]
and that’s confusing to me as, if you notice, in both the paper and here , the two mode layer
requires for the Dgate
and the Kgate
to be applied to both q[0]
and q[1]
.
If anyone can clarify this, it would be really helpful. If this is a mistake, as I think it is, I’ll be happy to submit a PR changing it.
P.S Sorry for not posting links to the paper and the lines, I’m allowed only 2 links
Edit: I understand that the Dgate
and the Kgate
have been applied in the qnn_layer
function but is there a reason they aren’t applied in the input layer?
Hi @RohitMidha23, it’s great that you’re taking a look at the fraud detection code and thanks for bringing this up!
You’re right, this is a typo and we originally envisaged the Dgate
and Kgate
to act on both q[0]
and q[1]
for the input layer of the QNN. However, the code in its current form matches the results in our paper and we therefore would prefer not to change the repo for now.
For your local version, feel free to change line 156
and 159
of the code so that q[0]
goes to q[1]
.
Thanks, and let me know if anything else comes up!
Tom
2 Likes
Hey,
I guess the same extends in the prediction file, testing.py
too.
I noticed a few other small errors, I’ll post them here in a bit.
Also, out of curiosity, do you guys accept interns for XanaduAI?
Thanks,
Rohit
Thanks @RohitMidha23! Regarding interns - we are not seeking out new applicants at the moment, but things could always change in future.
Cheers,
Tom