You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 7, 2021. It is now read-only.
The compose method of the OperatorBase requires the composed operators to have the same size.
This might not always be the case. We should allow passing indices in compose to be able to compose operators
of different sizes, much like in QuantumCircuit.compose.
One possible solution would be to add Pauli I operators to pad the smaller operator.
The text was updated successfully, but these errors were encountered:
Just noting that it's worth considering how this squares with the existing permute function in the circuit ops. One option could be for the core path to be op1 @ op2.permute(indices) rather than (or alongside) op1.compose(op2, indices=indices). permute is a bit more general as it is valuable for other things as well.
This is more general than QuantumCircuit.compose.
QuantumCircuit.compose can pad and permute only 'other' circuit, if 'self' is smaller, it raises exception.
Or maybe we don't want to change the interface of compose, since 1) and 2) provide required functionality?
If you are OK with that, I would start the implementation of 1) and 2).
What is the expected behavior?
The
compose
method of theOperatorBase
requires the composed operators to have the same size.This might not always be the case. We should allow passing indices in
compose
to be able to compose operatorsof different sizes, much like in
QuantumCircuit.compose
.One possible solution would be to add Pauli
I
operators to pad the smaller operator.The text was updated successfully, but these errors were encountered: