Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement SpinOp.from_polynomial_tensor #667

Closed
mrossinek opened this issue May 25, 2022 · 0 comments · Fixed by #905
Closed

Implement SpinOp.from_polynomial_tensor #667

mrossinek opened this issue May 25, 2022 · 0 comments · Fixed by #905
Assignees
Labels
type: feature request New feature or request
Milestone

Comments

@mrossinek
Copy link
Member

What should we add?

#665 proposes the addition of a PolynomialTensor class to handle coefficient storage.

This issue tracks the implementation of the method which can construct a SpinOp from those coefficients.
Below, I summarize the proposed structure of the PolynomialTensor.data field:

SpinOp

This class could also be used to store coefficients for the construction of SpinOps.

{
  "XYZ": [
    [
      [1, 2],
      [3, 4]
    ], [
      [5, 6],
      [7, 8]
    ]
  ],
  "XX": [
    [1, 2],
    [3, 4]
  ],
}

This would result in terms like this:

  • data["XYZ"][0, 0, 0] -> 1.0 * "X_0 Y_0 Z_0"
  • data["XX"][0, 1] -> 2.0 * "X_0^2"

This is not a construct we currently have in Qiskit Nature, but it may prove to be useful in the future. In any case, supporting it in the PolynomialTensor is trivial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants