Open Gopal-Dahale opened 2 years ago
Hard to say the best solution without seeing the exact code causing you trouble. But based on the error I would guess you are doing some disallowed symbol operations and that it could probably be done in a custom layer. I recommend https://github.com/tensorflow/quantum/issues/565 which had the same problem/error
Any updates on this or should it be closed?
I created a parameterized circuit using Cirq for Amplitude Encoding as described in Supervised Learning with Quantum Computers. The parameter is an arithmetic expression involving multiple operations like division and squaring. Below is the formula used. This value is used inside the $Ry$ gate.
$$\beta{j}^{g}=2 \arcsin \left(\frac{\sqrt{\sum{l=1}^{2 g-1}\left|A{(2 j-1) 2^{g-1}+l}\right|^{2}}}{\sqrt{\sum{l=1}^{2 g}\left|A_{(j-1) 2^{g}+l}\right|^{2}}}\right).$$
Using the circuit in the
tfq.layers.ControlledPQC
gives the following error.Any hack for this?