Closed antalszava closed 3 years ago
Merging #589 (f416ea0) into master (df29b08) will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #589 +/- ##
=======================================
Coverage 98.42% 98.42%
=======================================
Files 75 75
Lines 8608 8608
=======================================
Hits 8472 8472
Misses 136 136
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update df29b08...f416ea0. Read the comment docs.
Context
When increasing the number of modes in the
examples/quantum_neural_network.py
file containing the QNN tutorial (e.g., havingmodes=2), the gradient contains
nanvalues and the optimization will continue using tensors filled with
nan` values.Changes
For computing the fidelity of the difference between the measured ket and the target state, a safe absolute value function is being used. This function allows ensuring that the gradient for getting the absolute value at the
0.0
point will return0.0
.Related issues
Closes #588