Calculations

Once the Hamiltonian has been set up, we can call any method offered by HQS Qolossal to compute physical quantities of the defined system. Let's see the example of the density of states (DOS) for the 1D chain we have defined in the previous sections:

# ... initialize Hamiltonian

# scale the Hamiltonian to allow for the Chebyshev expansion to work
H.scaleH()

# calculate the density of states
dos, w = H.getDOS(
    NSamples=20,
    Order=200,
    NOmegas=2000
)

In this case, the arguments passed to the function control the number of random samples used for the DOS calculation, the order of the expansion and the number of frequencies at which to calculate the DOS. The above code will produce this following result:

DOS

The wiggles in the result depend on the stochastic nature of the calculation and can be converged to the correct result by adjusting the convergence parameters. Larger systems (for which HQS Qolossal is made) require fewer random samples and, counterintuitively, converge faster to much smoother results thanks to self-averaging properties. In fact, using the same setup, but with a chain of size 20000, an order of the expansion of 1200 and 200 samples for the stochastic evaluation, we obtain the following result: DOS converged