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 report: ConditionEnvironment in python 3.12 #55

Closed renezander90 closed 2 months ago

renezander90 commented 3 months ago

The following code, when executed in a python environment with python=3.12 and the Qrisp version from the main branch on GitHub,

from qrisp import QuantumChar, QuantumFloat, h, multi_measurement

q_ch = QuantumChar()
qf = QuantumFloat(3, signed = True)

h(q_ch[0])

with q_ch == "a":
    qf += 2

produces a bug:

AttributeError: 'NoneType' object has no attribute 'deallocated_qubits'

A similar bug occurs for the ControlEnvironment in this setting.

positr0nium commented 2 months ago

Fixed by the amazing @Nik-Stein in https://github.com/eclipse-qrisp/Qrisp/pull/34