SparsePauliOp.paulis setter does not propagate dimension info #10384
Labels
bug
Something isn't working
mod: quantum info
Related to the Quantum Info module (States & Operators)
Environment
What is happening?
Setting the
paulis
attribute (it has a@setter
) on aSparsePauliOp
instance does not update theBaseOperator
shape attributes.How can we reproduce the issue?
What should happen?
The above snippet produces the output
whereas it should produce
if changing the dimension is allowed, or raise an exception if it's not allowed.
Any suggestions?
I haven't looked closely, but it's possible that just updating
_op_shape
will be sufficient to fix the bug.The text was updated successfully, but these errors were encountered: