eclipse-qrisp / Qrisp

Qrisp - a framework for high-level programming of Quantum computers
https://www.qrisp.eu/
Eclipse Public License 2.0
83 stars 23 forks source link

Bug: QuantumArray.init_state #63

Open renezander90 opened 2 months ago

renezander90 commented 2 months ago

The following example:

from qrisp import QuantumArray, QuantumFloat
import numpy as np
qtype = QuantumFloat(3)
q_array = QuantumArray(qtype, shape = 3)
q_array.init_state([(np.array([1, 2, 3]), 1), (np.array([1, 2, 2]), 0.5j)])
print(q_array)

yields an error:

AttributeError: 'list' object has no attribute 'qs'