We currently have a Python object (ParameterVector) deeply nested inside a core Rust data type (ParameterExpression -> Symbol). Since ParameterVector is frequently used in library circuits, this means we inadvertently have Python objects buried much deeper than we expect, which a) makes us slower than we should be and b) makes it easier to violate panicking contracts in simple Clone operations (e.g. #16053).
We need to make ParameterVector a core Rust object to avoid this in the future.
Chain of PRs to fix this issue:
We currently have a Python object (
ParameterVector) deeply nested inside a core Rust data type (ParameterExpression->Symbol). SinceParameterVectoris frequently used in library circuits, this means we inadvertently have Python objects buried much deeper than we expect, which a) makes us slower than we should be and b) makes it easier to violate panicking contracts in simpleCloneoperations (e.g. #16053).We need to make
ParameterVectora core Rust object to avoid this in the future.Chain of PRs to fix this issue:
uuidpublic onParameterVector#16216ParameterVector(uuid=...)in QPY deserialisation #16221ParameterVectors #16222ParameterVectorto Rust #16228