Explore chapters and articles related to this topic
p†q: a tool for prototyping many-body methods for quantum chemistry
Published in Molecular Physics, 2021
Nicholas C. Rubin, A. Eugene DePrince
An important part of computer algebra systems is the potential to translate equations into usable code. pq comes with a front-end parser that produces code for residual equations in a NumPy einsum convention. Appropriate summation limits, occupied or virtual indices, are enforced using NumPy array slicing. Using the NumPy einsum format allows a user to implement the generated code with any of a variety of einsum backends. For example, tensor contraction engines in Tensorflow [97], Jax [98], or Dask [99] can be used to implement coupled cluster iterations on a variety of different hardware platforms.