qrisp.QuantumArray.set_shape#

QuantumArray.set_shape(shape)[source]#

Method to specify a shape for arrays which have been created without one.

Parameters
shapetuple

Desired shape.

Raises
Exception

QuantumArray already has a shape.