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
The VibrationalOp.from_polynomial_tensor implementation currently is a bit more restrictive than it needs to be. This is mostly due to initial design restrictions when the new VibrationalIntegrals class was constructed. Below is an example:
fromqiskit_nature.second_q.operatorsimportVibrationalOp, VibrationalIntegralsd= {
(0, 1, 2): 2.0,
}
ints=VibrationalIntegrals.from_raw_integrals(d)
op=VibrationalOp.from_polynomial_tensor(ints)
print(op)
# Vibrational Operator# number modes=1, number modals=[3], number terms=1# 2.0 * ( +_0_1 -_0_2 )
However, currently there is no way of generating the following VibrationalOp from a PolynomialTensor,
because there is an implicit assumption that the mode index is identical within each pair of creation and annihilation terms:
op=VibrationalOp({"+_0_1 -_1_2": 1.0})
With the introduction of the Tensor class (#1033) and the refactored way of handling the label_template (#1060), it should be possible to also improve the implementation of VibrationalOp.from_polynomial_tensor to be less restrictive.
This would be especially useful for the implementation of #46 and other extensions that might be based on the VibrationalOp.
The text was updated successfully, but these errors were encountered:
What should we add?
The
VibrationalOp.from_polynomial_tensor
implementation currently is a bit more restrictive than it needs to be. This is mostly due to initial design restrictions when the newVibrationalIntegrals
class was constructed. Below is an example:However, currently there is no way of generating the following
VibrationalOp
from aPolynomialTensor
,because there is an implicit assumption that the mode index is identical within each pair of creation and annihilation terms:
With the introduction of the
Tensor
class (#1033) and the refactored way of handling thelabel_template
(#1060), it should be possible to also improve the implementation ofVibrationalOp.from_polynomial_tensor
to be less restrictive.This would be especially useful for the implementation of #46 and other extensions that might be based on the
VibrationalOp
.The text was updated successfully, but these errors were encountered: