Skip to content

Functions for finite size systems: Low level functions: Problems with exact derivative

kchabuda edited this page Jul 17, 2021 · 1 revision

Table of Contents

fin_FoM_FoMD_optbd

fin_FoM_FoMD_optbd(n,d,bc,ch,chp,cini=None,a0ini=None,imprecision=10**-2,bdlmax=100,alwaysbdlmax=False,lherm=True,bdpsimax=100,alwaysbdpsimax=False)

Iterative optimization of FoM/FoMD over SLD MPO and initial wave function MPS and also check of convergence in bond dimensions. Function for finite size systems.

Parameters:

  n: number of sites in TN
  d: dimension of local Hilbert space (dimension of physical index)
  bc: boundary conditions, 'O' for OBC, 'P' for PBC
  ch: MPO for quantum channel, expected list of length n of ndarrays of a shape (bd,bd,d**2,d**2) for OBC (bd can vary between sites), or ndarray of a shape (bd,bd,d**2,d**2,n) for PBC
  chp: MPO for generalized derivative of quantum channel, expected list of length n of ndarrays of a shape (bd,bd,d**2,d**2) for OBC (bd can vary between sites), or ndarray of a shape (bd,bd,d**2,d**2,n) for PBC
  cini: initial MPO for SLD, expected list of length n of ndarrays of a shape (bd,bd,d,d) for OBC (bd can vary between sites), or ndarray of a shape (bd,bd,d,d,n) for PBC
  a0ini: initial MPS for initial wave function, expected list of length n of ndarrays of a shape (bd,bd,d) for OBC (bd can vary between sites), or ndarray of a shape (bd,bd,d,n) for PBC
  imprecision: expected imprecision of the end results, default value is 10**-2
  bdlmax: maximal value of bd for SLD MPO, default value is 100
  alwaysbdlmax: boolean value, True if maximal value of bd for SLD MPO have to be reached, otherwise False (default value)
  lherm: boolean value, True (default value) when Hermitian gauge is imposed on SLD MPO, otherwise False
  bdpsimax: maximal value of bd for initial wave function MPS, default value is 100
  alwaysbdpsimax: boolean value, True if maximal value of bd for initial wave function MPS have to be reached, otherwise False (default value)

Returns:

  result: optimal value of FoM/FoMD
  resultm: matrix describing FoM/FoMD in function of bd of respectively SLD MPO [rows] and initial wave function MPS [columns]
  c: optimal MPO for SLD
  a0: optimal MPS for initial wave function

fin_FoM_optbd

fin_FoM_optbd(n,d,bc,a,b,cini=None,imprecision=10**-2,bdlmax=100,alwaysbdlmax=False,lherm=True)

Optimization of FoM over SLD MPO and also check of convergence in bond dimension. Function for finite size systems.

Parameters:

  n: number of sites in TN
  d: dimension of local Hilbert space (dimension of physical index)
  bc: boundary conditions, 'O' for OBC, 'P' for PBC
  a: MPO for density matrix, expected list of length n of ndarrays of a shape (bd,bd,d,d) for OBC (bd can vary between sites), or ndarray of a shape (bd,bd,d,d,n) for PBC
  b: MPO for generalized derivative of density matrix, expected list of length n of ndarrays of a shape (bd,bd,d,d) for OBC (bd can vary between sites), or ndarray of a shape (bd,bd,d,d,n) for PBC
  cini: initial MPO for SLD, expected list of length n of ndarrays of a shape (bd,bd,d,d) for OBC (bd can vary between sites), or ndarray of a shape (bd,bd,d,d,n) for PBC
  imprecision: expected imprecision of the end results, default value is 10**-2
  bdlmax: maximal value of bd for SLD MPO, default value is 100
  alwaysbdlmax: boolean value, True if maximal value of bd for SLD MPO have to be reached, otherwise False (default value)
  lherm: boolean value, True (default value) when Hermitian gauge is imposed on SLD MPO, otherwise False

Returns:

  result: optimal value of FoM
  resultv: vector describing FoM in function of bd of SLD MPO
  c: optimal MPO for SLD

fin_FoMD_optbd

fin_FoMD_optbd(n,d,bc,c2d,cpd,a0ini=None,imprecision=10**-2,bdpsimax=100,alwaysbdpsimax=False)

Optimization of FoMD over initial wave function MPS and also check of convergence in bond dimension. Function for finite size systems.

Parameters:

  n: number of sites in TN
  d: dimension of local Hilbert space (dimension of physical index)
  bc: boundary conditions, 'O' for OBC, 'P' for PBC
  c2d: MPO for square of dual of SLD, expected list of length n of ndarrays of a shape (bd,bd,d,d) for OBC (bd can vary between sites), or ndarray of a shape (bd,bd,d,d,n) for PBC
  cpd: MPO for dual of generalized derivative of SLD, expected list of length n of ndarrays of a shape (bd,bd,d,d) for OBC (bd can vary between sites), or ndarray of a shape (bd,bd,d,d,n) for PBC
  a0ini: initial MPS for initial wave function, expected list of length n of ndarrays of a shape (bd,bd,d) for OBC (bd can vary between sites), or ndarray of a shape (bd,bd,d,n) for PBC
  imprecision: expected imprecision of the end results, default value is 10**-2
  bdpsimax: maximal value of bd for initial wave function MPS, default value is 100
  alwaysbdpsimax: boolean value, True if maximal value of bd for initial wave function MPS have to be reached, otherwise False (default value)

Returns:

  result: optimal value of FoMD
  resultv: vector describing FoMD in function of bd of initial wave function MPS
  a0: optimal MPS for initial wave function

fin_FoM_FoMD_optm

fin_FoM_FoMD_optm(n,d,bc,c,a0,ch,chp,imprecision=10**-2,lherm=True)

Iterative optimization of FoM/FoMD over SLD MPO and initial wave function MPS. Function for finite size systems.

Parameters:

  n: number of sites in TN
  d: dimension of local Hilbert space (dimension of physical index)
  bc: boundary conditions, 'O' for OBC, 'P' for PBC
  c: MPO for SLD, expected list of length n of ndarrays of a shape (bd,bd,d,d) for OBC (bd can vary between sites), or ndarray of a shape (bd,bd,d,d,n) for PBC
  a0: MPS for initial wave function, expected list of length n of ndarrays of a shape (bd,bd,d) for OBC (bd can vary between sites), or ndarray of a shape (bd,bd,d,n) for PBC
  ch: MPO for quantum channel, expected list of length n of ndarrays of a shape (bd,bd,d**2,d**2) for OBC (bd can vary between sites), or ndarray of a shape (bd,bd,d**2,d**2,n) for PBC
  chp: MPO for generalized derivative of quantum channel, expected list of length n of ndarrays of a shape (bd,bd,d**2,d**2) for OBC (bd can vary between sites), or ndarray of a shape (bd,bd,d**2,d**2,n) for PBC
  imprecision: expected imprecision of the end results, default value is 10**-2
  lherm: boolean value, True (default value) when Hermitian gauge is imposed on SLD MPO, otherwise False

Returns:

  fval: optimal value of FoM/FoMD
  c: optimal MPO for SLD
  a0: optimal MPS for initial wave function

fin_FoM_OBC_optm

fin_FoM_OBC_optm(a,b,c,imprecision=10**-2,lherm=True)

Optimization of FoM over MPO for SLD. Function for finite size systems with OBC.

Parameters:

  a: MPO for density matrix, expected list of length n of ndarrays of a shape (bd,bd,d,d) (bd can vary between sites)
  b: MPO for generalized derivative of density matrix, expected list of length n of ndarrays of a shape (bd,bd,d,d) (bd can vary between sites)
  c: MPO for SLD, expected list of length n of ndarrays of a shape (bd,bd,d,d) (bd can vary between sites)
  imprecision: expected imprecision of the end results, default value is 10**-2
  lherm: boolean value, True (default value) when Hermitian gauge is imposed on SLD MPO, otherwise False

Returns:

  fomval: optimal value of FoM
  c: optimal MPO for SLD

fin_FoM_PBC_optm

fin_FoM_PBC_optm(a,b,c,imprecision=10**-2,lherm=True)

Optimization of FoM over MPO for SLD. Function for finite size systems with PBC.

Parameters:

  a: MPO for density matrix, expected ndarray of a shape (bd,bd,d,d,n)
  b: MPO for generalized derivative of density matrix, expected ndarray of a shape (bd,bd,d,d,n)
  c: MPO for SLD, expected ndarray of a shape (bd,bd,d,d,n)
  imprecision: expected imprecision of the end results, default value is 10**-2
  lherm: boolean value, True (default value) when Hermitian gauge is imposed on SLD MPO, otherwise False

Returns:

  fomval: optimal value of FoM
  c: optimal MPO for SLD

fin_FoMD_OBC_optm

fin_FoMD_OBC_optm(c2d,cpd,a0,imprecision=10**-2)

Optimization of FoMD over MPS for initial wave function. Function for finite size systems with OBC.

Parameters:

  c2d: MPO for square of dual of SLD, expected list of length n of ndarrays of a shape (bd,bd,d,d) (bd can vary between sites)
  cpd: MPO for dual of generalized derivative of SLD, expected list of length n of ndarrays of a shape (bd,bd,d,d) (bd can vary between sites)
  a0: MPS for initial wave function, expected list of length n of ndarrays of a shape (bd,bd,d,d) (bd can vary between sites)
  imprecision: expected imprecision of the end results, default value is 10**-2

Returns:

  fomdval: optimal value of FoMD
  a0: optimal MPS for initial wave function

fin_FoMD_PBC_optm

fin_FoMD_PBC_optm(c2d,cpd,a0,imprecision=10**-2)

Optimization of FoMD over MPS for initial wave function. Function for finite size systems with PBC.

Parameters:

  c2d: MPO for square of dual of SLD, expected ndarray of a shape (bd,bd,d,d,n)
  cpd: MPO for dual of generalized derivative of SLD, expected ndarray of a shape (bd,bd,d,d,n)
  a0: MPS for initial wave function, expected ndarray of a shape (bd,bd,d,n)
  imprecision: expected imprecision of the end results, default value is 10**-2

Returns:

  fomdval: optimal value of FoMD
  a0: optimal MPS for initial wave function

fin_FoM_OBC_val

fin_FoM_OBC_val(a,b,c)

Calculate the value of FoM. Function for finite size systems with OBC.

Parameters:

  a: MPO for density matrix, expected list of length n of ndarrays of a shape (bd,bd,d,d) (bd can vary between sites)
  b: MPO for generalized derivative of density matrix, expected list of length n of ndarrays of a shape (bd,bd,d,d) (bd can vary between sites)
  c: MPO for SLD, expected list of length n of ndarrays of a shape (bd,bd,d,d) (bd can vary between sites)

Returns:

  fomval: value of FoM

fin_FoM_PBC_val

fin_FoM_PBC_val(a,b,c)

Calculate the value of FoM. Function for finite size systems with PBC.

Parameters:

  a: MPO for a density matrix, expected ndarray of a shape (bd,bd,d,d,n)
  b: MPO for generalized derivative of a density matrix, expected ndarray of a shape (bd,bd,d,d,n)
  c: MPO for the SLD, expected ndarray of a shape (bd,bd,d,d,n)

Returns:

  fomval: value of FoM

fin_FoMD_OBC_val

fin_FoMD_OBC_val(c2d,cpd,a0)

Calculate value of FoMD. Function for finite size systems with OBC.

Parameters:

  c2d: MPO for square of dual of SLD, expected list of length n of ndarrays of a shape (bd,bd,d,d) (bd can vary between sites)
  cpd: MPO for dual of generalized derivative of SLD, expected list of length n of ndarrays of a shape (bd,bd,d,d) (bd can vary between sites)
  a0: MPS for initial wave function, expected list of length n of ndarrays of a shape (bd,bd,d,d) (bd can vary between sites)

Returns:

  fomdval: value of FoMD

fin_FoMD_PBC_val

fin_FoMD_PBC_val(c2d,cpd,a0)

Calculate the value of FoMD. Function for finite size systems with PBC.

Parameters:

  c2d: MPO for square of dual of the SLD, expected ndarray of a shape (bd,bd,d,d,n)
  cpd: MPO for dual of generalized derivative of the SLD, expected ndarray of a shape (bd,bd,d,d,n)
  a0: MPS for the initial wave function, expected ndarray of a shape (bd,bd,d,n)

Returns:

  fomdval: value of FoMD