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
Error when using 'StronglyEntanglingLayers'.
Apparently fidelity calculation fails, thus histogram receives no update.
ValueError: operands could not be broadcast together with shapes (4,4) (0,4)
Traceback (most recent call last):
File "/home/lc3267/Documents/CodeWorkspace/Quantum-Surrogate-Project/app/pages/3-expressibility-viz.py", line 465, in update_output_probabilities
x_samples, y_samples, z_samples = expr_sampler.sample_hist_state_fidelities(
File "/home/lc3267/Documents/CodeWorkspace/Quantum-Surrogate-Project/app/utils/expressibility.py", line 160, in sample_hist_state_fidelities
fidelities = self.sample_state_fidelities(bf=bf, pf=pf, ad=ad, pd=pd, dp=dp)
File "/home/lc3267/Documents/CodeWorkspace/Quantum-Surrogate-Project/app/utils/expressibility.py", line 146, in sample_state_fidelities
np.sqrt(sqrt_sv1 * sv[self.n_samples :] * sqrt_sv1),
File "/home/lc3267/Documents/CodeWorkspace/Quantum-Surrogate-Project/.venv/lib/python3.10/site-packages/pennylane/numpy/tensor.py", line 155, in __array_ufunc__
res = super().__array_ufunc__(ufunc, method, *args, **kwargs)
ValueError: operands could not be broadcast together with shapes (4,4) (0,4)
The text was updated successfully, but these errors were encountered:
stroblme
changed the title
Calculating Histogram fails when selecting 'StronglyEntanglingLayers'
[BUG] Calculating Histogram fails when selecting 'StronglyEntanglingLayers'
Apr 25, 2024
I think this is somehow related to qml.StronglyEntanglingLayers being not able to batch the weights, when computing the samples for the Expressibility.
Maybe we could have a look into qml.batch_params, but I wasn't able to get this running properly as well...
This bug got fixed through using a custom implementation of the StronglyEntanglingLayers. For verification of this implementation see: cirKITers/qml-essentials#7
Error when using 'StronglyEntanglingLayers'.
Apparently fidelity calculation fails, thus histogram receives no update.
The text was updated successfully, but these errors were encountered: