You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This discussion is a little bit older but I had a look into the code again and want to share my thoughts.
If we use choose the mnist option for our dataset, we measure the probability of two wires. This gives us four different values/probabilities for each option: [00, 01, 10, 11]. Likewise, the target is a four dimensional array with two different possibilities: [1, 0, 0, 0] for class 6 and [0, 1, 0, 0].
But this is a problem. We want to measure 00 for class 6 and 01 for class 9. So the value of qubit 0 does not matter at all for our classification - it should be zero in every case. But somehow (I guess for weird quantum reasons :)) we still need to measure it to distinguish 01 from 11 and 00 from 10. This is like saying our output for qubit 1 is only useful if qubit 0 is zero. I'm also not sure if it is a good idea to force a quibt into a specific state (qubit 0 into zero). Due to entanglement it might not be possible that qubit 0 is set to zero and qubit 1 can still be both 0 and 1 depending on the input.
Possible solutions:
We only measure one quibt. 0 means class 6, 1 means class 9. But we run into the same problem using ìris with 3 classes.
Measure/get the expectation value for as many qubits as there are classes. Apply softmax on these values and take this as our circuit output.
Thoughts?
The text was updated successfully, but these errors were encountered:
This discussion is a little bit older but I had a look into the code again and want to share my thoughts.
If we use choose the
mnist
option for our dataset, we measure the probability of two wires. This gives us four different values/probabilities for each option:[00, 01, 10, 11]
. Likewise, the target is a four dimensional array with two different possibilities:[1, 0, 0, 0]
for class6
and[0, 1, 0, 0]
.@nikmetz , @eileen-kuehn Is this correct? If not, stop me here :D
But this is a problem. We want to measure
00
for class6
and01
for class9
. So the value ofqubit 0
does not matter at all for our classification - it should be zero in every case. But somehow (I guess for weird quantum reasons :)) we still need to measure it to distinguish01
from11
and00
from10
. This is like saying our output forqubit 1
is only useful ifqubit 0
is zero. I'm also not sure if it is a good idea to force a quibt into a specific state (qubit 0
into zero). Due to entanglement it might not be possible thatqubit 0
is set to zero andqubit 1
can still be both0
and1
depending on the input.Possible solutions:
We only measure one quibt.
0
means class 6,1
means class 9. But we run into the same problem usingìris
with 3 classes.Measure/get the expectation value for as many qubits as there are classes. Apply softmax on these values and take this as our circuit output.
Thoughts?
The text was updated successfully, but these errors were encountered: