question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add `TwoBodyElectronicIntegrals` notation conversion utilities

See original GitHub issue

What is the expected enhancement?

Currently the TwoBodyElectronicIntegrals matrices are expected to be given in chemistry notation. Utility methods to convert to and from the physics notation would be valuable additions to this class.

Analogous to this we may also be interested in utility methods to convert the SO-basis matrices of the one- and two-body electronic integrals between the (currently required) blocked and interleaved spin formats.

@jlapeyre: I know that you previously worked on some utility methods for symmetry detection+conversion. Would you be interested in joining efforts to implement this enhancement?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jlapeyrecommented, Jan 26, 2022

@mrossinek There are some choices in how to arrange this. Here is one scenario.

  • Assume you always want to store the data in chemists’ index order.
  • Detect the index order upon construction and then convert to chemists’ order
  • Give a warning, or not, if the input data is in physicists’ index order.
  • Give a warning, or not, if the input data is in “intermediate” order. I haven’t seen this order used intentionally anywhere. But, it is easy enough to get by mistake. Eg. start with chemists’ order then mistakenly do a physicists’ to chemists’ transformation. The result is “intermediate”. A good option here might be to raise an error if “intermediate” is detected. That is, we require either physicists’ or chemists’. If the user is getting data in the wrong form and can’t control it, then they can do an explicit transformation. I mean, we should not paper over what is very likely a bug earlier in the workflow; but detect it and allow an easy way to get it to work.
0reactions
jlapeyrecommented, Jan 26, 2022

A pattern that I see in Qiskit is to put some more generally useful functions in a file xxx_utils.py. Then call these from class or instance methods. Other people like to put everything inside a class if possible. The problem with the latter is it makes the code unavailable to users who have a workflow that we did not anticipate.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using the Product Rule to Integrate the Product of Two Functions
The Product Rule enables you to integrate the product of two functions. ... Use the Sum Rule to split the integral on the...
Read more >
Multiple integral - Wikipedia
In mathematics (specifically multivariable calculus), a multiple integral is a definite integral of a function of several real variables, for instance, f(x, ...
Read more >
Computational Chemistry 4.12 - Two-Electron Integrals
Physicist's notation for two - electron integrals keeps the two complex conjugates on the left and the spin orbitals on the right of...
Read more >
Converting Reimann Sums into Definite Integrals - YouTube
Please visit my website: http://www.hutchmath.com for notes, v... ... Converting Reimann Sums into Definite Integrals.
Read more >
∫ Integral Calculator Online - with steps
Do not know how to solve the integral, click here. Calculate certain integrals using only the definition and concept of the integral sum....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found