Defining cluster models

This section explains how to define impurity (or cluster) models through python calls.

Clusters are the building blocks of lattice models. One needs to define them first. This is done through the construction of an object of type cluster_model. For instance:

import pyqcm
CM = pyqcm.cluster_model(4, 0, '2x2_C2v', [[3, 4, 1, 2], [2, 1, 4, 3]])

The constructor cluster_model(Ns, Nb, name, perm, bath_irrep) takes the following arguments:

  1. The number \(N_s\) of physical sites

  2. The number \(N_b\) of bath sites

  3. A name given to the cluster model (‘clus’ by default). Useful if more than one cluster models are necessary.

  4. (optional) A list of permutations of the \(N_o=N_s+N_b\) orbitals that define generators of the symmetries of the cluster.

  5. (optional) A boolean flag that, if true, signals that bath orbitals belong to irreducible representations of the symmetry group of the cluster, instead of being part of permutations of the different orbitals of the cluster-bath system.

In the above example, a four-site cluster is defined, without any bath sites. The positions of the sites are not relevant to the impurity solver, and so are not defined at this stage. However, a plaquette geometry is implicit here, with the following site labels:

_images/2x2.png

Figure 1

The cluster symmetries (permutations) passed to the function thus correspond to reflections with respect to the horizontal and vertical axes, respectively. The cluster symmetries will be used by the ED solver to lighten the exact diagonalization task. Large clusters will take less memory, convergence of the Lanczos method will be faster, and computing the Green function at a given frequency will be more efficient. The different permutations that constitute the generators must commute with each other. They generate an Abelian group with \(g\) elements. Such a group has an equal number \(g\) of irreducible representations, numbered from 0 to \(g-1\).

Defining operators on the cluster

Most operators in the model are best defined on the lattice and their restriction to the cluster is defined automatically, so there is no need to define them explicitly on each cluster of the super unit cell. This is not the case if one wants to use the ED solver as a standalone program without reference to a lattice model. Bath operators, on the other hand, need to be defined explicitly within the cluster model since they do not exist on the lattice model.

The following code defines the cluster and bath operators for the cluster illustrated in the last section, which we reproduce here:

_images/h4-6b.png

Figure 2

Content of the cluster definition file:

from pyqcm import *

no = 10
ns = 4
CM = pyqcm.cluster_model(ns, no-ns, 'clus', [[1, 3, 4, 2, 6, 7, 5, 9, 10, 8]])


CM.new_operator('bt1', 'one-body', [
    (2, 5, 1.0),
    (3, 6, 1.0),
    (4, 7, 1.0),
    (2+no, 5+no, 1.0),
    (3+no, 6+no, 1.0),
    (4+no, 7+no, 1.0)
])

CM.new_operator('bt2', 'one-body', [
    (2, 8, 1.0),
    (3, 9, 1.0),
    (4, 10, 1.0),
    (2+no, 8+no, 1.0),
    (3+no, 9+no, 1.0),
    (4+no, 10+no, 1.0)
])

CM.new_operator('be1', 'one-body', [
    (5, 5, 1.0),
    (6, 6, 1.0),
    (7, 7, 1.0),
    (5+no, 5+no, 1.0),
    (6+no, 6+no, 1.0),
    (7+no, 7+no, 1.0)
])

CM.new_operator('be2', 'one-body', [
    (8, 8, 1.0),
    (9, 9, 1.0),
    (10, 10, 1.0),
    (8+no, 8+no, 1.0),
    (9+no, 9+no, 1.0),
    (10+no, 10+no, 1.0)
])

Note that the symmetry defined here is a rotation by 120 degrees. This generates the group \(C_3\), which has complex representations. pyqcm can only deal with Abelian groups (the correct treatment of non-Abelian symmetries is too complex when computing Green functions for the benefits it would provide). In the above example, a better strategy when no complex operators are present would be to define only a \(C_2\) symmetry based on one of three possible reflections. This would only provide 2 symmetry operations instead of 3, but the representations would be real instead of complex, thus saving more time and memory.

The member function new_operator(name, type, elements) takes the following arguments:

  1. The name of the operator

  2. The type of operator; one of ‘one-body’, ‘anomalous’, ‘interaction’, ‘Hund’, ‘Heisenberg’

  3. An array of real matrix elements. Each element of the array is a 3-tuple giving the labels of the orbitals involved and the value of the matrix element itself. Note that spin-up and spin-down orbital labels are separated by the total number of orbitals on the cluster, here no=10.

If a complex-valued operator is needed, then the function new_cluster_operator_complex() must be used, the only difference being that the actual matrix elements are complex numbers.

Class for defining cluster models

class cluster_model(n_sites, n_bath=0, name='clus', generators=None, bath_irrep=False)

Class that contains the impurity (or cluster) model

Parameters:
  • n_sites (int) – number of physical sites

  • n_bath (int) – number of bath orbitals

  • name (str) – name of the cluster model (important if there are more than one cluster models)

  • generators (list[list[int]]) – permutations that generate the point group

  • bath_irrep (bool) – if True, the elements of ‘generators’ associated to bath orbitals are phases (integers, in multiple of 2*pi/G, where G is the number of group elements)

Variables:
  • name (str) – name of the model

  • n_sites (int) – number of physical sites

  • n_bath (int) – number of bath orbitals

  • generators (list[list[int]]) – symmetry generators

  • is_closed (bool) – True if the model can no longer be modified by adding operators

new_operator(op_name, op_type, elem)

creates a new operator from its matrix elements

Parameters:
  • op_name (str) – name of the operator

  • op_type (str) – type of operator (‘one-body’, ‘anomalous’, ‘interaction’, ‘Hund’, ‘Heisenberg’, ‘X’, ‘Y’, ‘Z’)

  • elem ([(int,int,float)]) – array of matrix elements (list of tuples)

Returns:

None

new_operator_complex(op_name, op_type, elem)

creates a new operator from its complex-valued matrix elements

Parameters:
  • op_name (str) – name of the operator

  • op_type (str) – type of operator (‘one-body’, ‘anomalous’, ‘interaction’, ‘Hund’, ‘Heisenberg’, ‘X’, ‘Y’, ‘Z’)

  • elem ([(int, int, complex)]) – array of matrix elements (list of tuples)

Returns:

None

matrix_elements(op)

returns the type and matrix elements defining a Hermitian operator

Parameters:

op (str) – name of the operator

Returns:

a tuple (typ, elem)

new_model_instance(values, sec, label=0)

Initiates a new instance of the cluster model

Parameters:
  • values ({str,float}) – values of the operators

  • sec (str) – target Hilbert space sectors

  • label (int) – label of model_instance

Returns:

None

Class for defining clusters

When the repeated unit contains more than one cluster, several of them can be based on the same cluster model. This is an important memory saving point, as operators are stored in memory for each cluster model, not for each cluster. Moreover, a cluster model has no notion of geometry of site positions. The latter information is contained in a different class, pyqcm.cluster.

class cluster(X, sites, pos=(0, 0, 0))

Class describing a geometric cluster, part of the repeated unit (or super unit cell)

Parameters:
  • X (cluster_model) – abstract cluster model (or sequence thereof) the current cluster is hosting OR another cluster object of which the current cluster is a replica. If X is a sequence, this sequences defines different systems associated to the same cluster. If X is a cluster object, then this cluster is just a replica of the original cluster and its Green function is simply copied from the original, without solving any new impurity problem.

  • sites (list[list[int]]) – sequence of 3-component integer vectors, the geometric sites of the cluster. If the cluster is a replica, then the sites are different from the original cluster, but the Green function is simply remapped from the original cluster.

  • pos ([int]) – base position of the cluster; all site vectors are added this position (for convenience)

Variables:

index (int) – index of the cluster within the set of clusters forming the repeated unit (starts at 1)