Closed KetpuntoG closed 1 month ago
This code is not working
import pennylane as qml a = 0.3 angles = [.1,.2,.3,.4,.5] print(qml.matrix(qml.qsvt(a, angles, wires = [0], convention = "Wx")))
local variable global_phase referenced before assignment
It breaks when the length of the angles is 4d + 1 for any d
No response
Name: PennyLane Version: 0.38.0.dev0 Summary: PennyLane is a cross-platform Python library for quantum computing, quantum machine learning, and quantum chemistry. Train a quantum computer the same way as a neural network. Home-page: https://github.com/PennyLaneAI/pennylane Author: Author-email: License: Apache License 2.0 Location: /usr/local/lib/python3.10/dist-packages Requires: appdirs, autograd, autoray, cachetools, networkx, numpy, packaging, pennylane-lightning, requests, rustworkx, scipy, semantic-version, toml, typing-extensions Required-by: PennyLane-Catalyst, PennyLane_Lightning Platform info: Linux-6.1.85+-x86_64-with-glibc2.35 Python version: 3.10.12 Numpy version: 1.25.2 Scipy version: 1.11.4 Installed devices: - default.clifford (PennyLane-0.38.0.dev0) - default.gaussian (PennyLane-0.38.0.dev0) - default.mixed (PennyLane-0.38.0.dev0) - default.qubit (PennyLane-0.38.0.dev0) - default.qubit.autograd (PennyLane-0.38.0.dev0) - default.qubit.jax (PennyLane-0.38.0.dev0) - default.qubit.legacy (PennyLane-0.38.0.dev0) - default.qubit.tf (PennyLane-0.38.0.dev0) - default.qubit.torch (PennyLane-0.38.0.dev0) - default.qutrit (PennyLane-0.38.0.dev0) - default.qutrit.mixed (PennyLane-0.38.0.dev0) - default.tensor (PennyLane-0.38.0.dev0) - null.qubit (PennyLane-0.38.0.dev0) - lightning.qubit (PennyLane_Lightning-0.37.0) - nvidia.custatevec (PennyLane-Catalyst-0.7.0) - nvidia.cutensornet (PennyLane-Catalyst-0.7.0) - oqc.cloud (PennyLane-Catalyst-0.7.0) - softwareq.qpp (PennyLane-Catalyst-0.7.0)
Same issue here
Expected behavior
This code is not working
Actual behavior
local variable global_phase referenced before assignment
Additional information
It breaks when the length of the angles is 4d + 1 for any d
Source code
No response
Tracebacks
No response
System information
Existing GitHub issues