MPO_new

The main exported function is MPO_new which takes an OpSum and transforms it into a MPO. This algorithm has three constraints:

  1. The operator must be expressed as a sum of products of single site operators. For example a CNOT could not appear in the sum since it is a two site operator.

  2. When dealing with Fermionic systems the parity of each term in the sum must be even. That is the combined number of creation and annihilation operators in each term in the sum must be even. It should be possible to relax this constraint.

  3. Each term in the sum of products representation can only have a single operator acting on a site. For example a term such as $\mathbf{X}^{(1)} \mathbf{X}^{(1)}$ is not allowed. However, there is a pre-processing utility that can automatically replace $\mathbf{X}^{(1)} \mathbf{X}^{(1)}$ with $\mathbf{I}^{(1)}$.

ITensorMPOConstruction.MPO_newFunction
MPO_new(ValType, os::OpIDSum, sites; basis_op_cache_vec=nothing,
  check_for_errors=true, output_level=0, kwargs...) -> MPO

Construct an MPO from a OpIDSum.

Before construction, os can optionally be rewritten into the basis defined by basis_op_cache_vec, and basic consistency checks can be run with check_for_errors=true.

Keyword arguments:

  • basis_op_cache_vec=nothing: A list of operators to use as a basis for each site. The operators on each site are expressed as one of these basis operators. If nothing a basis is inferred from the input and no basis transformation occurs.
  • check_for_errors=true: Check the input OpSum for errors, this can be expensive for larger problems.
  • tol=1: A multiplicative modifier to the default tolerance used in the SPQR, see SPQR user guide Section 2.3. The value of the default tolerance depends on the input matrix, which means a different tolerance is used for each decomposition. In the cases we have examined, the default tolerance works great for producing accurate MPOs.
  • absolute_tol=false: If true, override the default adaptive tolerance scheme outlined above, and use the value of tol as the single tolerance for each decomposition.
  • combine_qn_sectors=false: When true, the blocks of the MPO corresponding to the same quantum numbers are merged together into a single block. This can decrease the resulting sparsity.
  • call_back: A function that is called after constructing the MPO tensor at cur_site. Called as call_back(cur_site, H, sites, llinks, cur_graph, op_cache_vec). Primarily used for writing checkpoints to disk for large calculations.
  • output_level=0: Controls progress and timing output.
source
MPO_new(os::OpIDSum, sites; kwargs...) -> MPO

Construct an MPO from os, automatically choosing Float64 or ComplexF64.

source
MPO_new(ValType, os::OpSum, sites; kwargs...) -> MPO

Convert an ITensor OpSum to OpIDSum form and construct an MPO with element type ValType.

source
MPO_new(os::OpSum, sites; kwargs...) -> MPO

Convert an ITensor OpSum to OpIDSum form and construct an MPO, inferring the numeric element type automatically.

source
ITensorMPOConstruction.resume_MPO_constructionFunction
resume_MPO_construction(ValType, n_init, H, sites, llinks, g, op_cache_vec;
  tol=1, absolute_tol=false, combine_qn_sectors=false, call_back=..., output_level=0) -> MPO

Continue MPO construction starting from site n_init using the current graph state g.

This is the low-level driver underlying MPO_new. At each site it factors the current graph with at_site!, builds the local MPO tensor, stores it into H, and advances to the next-site graph. The callback is invoked after each site is completed.

Keyword arguments:

  • tol=1: A multiplicative modifier to the default tolerance used in the SPQR, see SPQR user guide Section 2.3. The value of the default tolerance depends on the input matrix, which means a different tolerance is used for each decomposition. In the cases we have examined, the default tolerance works great for producing accurate MPOs.
  • absolute_tol=false: If true, override the default adaptive tolerance scheme outlined above, and use the value of tol as the single tolerance for each decomposition.
  • combine_qn_sectors=false: When true, the blocks of the MPO corresponding to the same quantum numbers are merged together into a single block. This can decrease the resulting sparsity.
  • call_back: A function that is called after constructing the MPO tensor at cur_site. Called as call_back(cur_site, H, sites, llinks, cur_graph, op_cache_vec). Primarily used for writing checkpoints to disk for large calculations.
  • output_level=0: Controls progress and timing output.
source
ITensorMPOConstruction.block2_nnzFunction
block2_nnz(mpo::MPO) -> Tuple{Int,Int}

Count link-space blocks in mpo that are structural zeros.

When the MPO tensors are viewed as a matrix-op-operators, this returns the total number of entries in the MPO and the total number of structural non-zeros. This can be used to directly compare sparsities with the block2 storage format.

source

A note on truncation:

MPO_new is designed to construct numerically exact MPOs, the tolerance parameter should really only be used to adjust the definition of "numerically exact" and not to perform truncation. If truncation is desired, truncate the resulting MPO with ITensorMPS.truncate. See Haldane-Shastry and truncation for an example.