qrisp.QuantumFloat.add_sign#

QuantumFloat.add_sign()[source]#

Turns an unsigned QuantumFloat into its signed version.

Raises:
Exception

Tried to add sign to signed QuantumFloat.

Examples

>>> from qrisp import QuantumFloat
>>> qf = QuantumFloat(4)
>>> qf.signed
False
>>> qf.add_sign()
>>> qf.signed
True