Please Read: Make It Easier to Help You

This community is for technical support and discussion of the ITensor Software, and official packages based on ITensor.

We highly recommend using the Julia version of ITensor. It has the same or better performance compared to the C++ version, many more features, and is much more actively developed.

To make your question as successful as possible, here are some guidelines:

  • If you are reporting a bug or something is not working as expected, please provide a minimal working example code that reproduces your issue. This will make it much easier for us to help you with your issue and result in a faster and more helpful response. Please see the section below called “Instructions on reporting issues” for further details.
  • Please search first to see if a similar question has been asked.
  • If you have a new question, start a new post instead of asking it in an old thread. That way we can keep track of which questions have been addressed more easily and keep discussion threads more focused.
  • Format your code and equations, which will make it much easier for us to help you. See the instructions on the bottom of this post if you need help with that.
  • If you are reporting an error, please post the entire error message. Even if it is long, it is helpful for us to see the error message so we can help you faster.
  • If you are having trouble running DMRG, where you think DMRG is giving an unexpected answer or not converging properly, please first look at the DMRG FAQs in the documentation. That should address most questions about DMRG convergence. Please keep in mind that this forum is not meant for asking questions about physics results, but instead is meant to answer questions about functionality of the ITensor software libraries (such as how to use a certain function, compute a certain quantity, report bugs, suggest new features, etc.).
  • Please post your question in the correct category:

Instructions on reporting issues

  • If you are reporting a bug or something is not working as expected, please provide a minimal working example code that reproduces your issue.
  • Please refrain from posting very long, complicated codes with many functions unless requested. Doing so makes it much harder for us to help you, and will mean it will take longer for us to respond to your post.
  • Please do not attach a screenshot of your code, it makes it much more difficult for us to help you since then we cannot easily run your code to reproduce your issue. Instead, copy the text of your code directly into your post and format it properly so that we can easily read it.
  • Please report the version of ITensor that you are using.
    • If you are using the Julia version of ITensor, please show the output of the commands versioninfo() and using Pkg; Pkg.status("ITensors"), along with the versions of any other relevant Julia packages.
    • If you are using the C++ version of ITensor, please specify the version of C++ ITensor you are using.
  • Please try investigating the issue yourself before posting a question. If you are unsure what a line of code does, or whether a tensor has a certain property, try printing it out! Almost everything in ITensor is printable, using either the @show macro in Julia or the println function in Julia or C++ (or the Print or PrintData functions in C++). The printouts can show you what indices an ITensor has, and you can also print the norm of an ITensor, etc.
  • For physics-related questions involves a Hamiltonian, please state clearly and precisely what this Hamiltonian is, either by writing it out in LaTeX notation (see how to do this below), or by providing a link to a paper with the equation number.

Formatting equations and code

This forum offers both code formatting and math (\LaTeX) formatting.

To use code formatting, use single backticks (`) for inline code formatting, or triple backticks (```) for multi-line code formatting. Here are some examples:

  • Writing `f(x,y) = x+y` gives the output f(x,y) = x+y.
  • Writing
    ```
    for i=1:5
    println(i)
    end
    ```
    gives the output
    for i=1:5
       println(i)
    end
    

To use LaTeX math formatting use either single dollar signs ($) for inline math formatting or double dollar signs ($$) for multi-line math formatting. Here are some examples:

  • Writing $f(x) = e^{i x}$ gives the output f(x) = e^{i x}.
  • Writing
    $$
    \int_a^b \frac{x + x^2}{\cos(x)} dx
    $$
    gives the output
    \int_a^b \frac{x + x^2}{\cos(x)} dx

Note that as you are writing your post, there should be a preview window on the right hand side of your screen which will allow you to see a formatted preview of your post to see if the formatting is correct.

1 Like