CirQuS-UTS / QuanGuru

QuanGuru (pronounced Kangaroo) is a Python library for numerical modelling of quantum systems. It is still under-development, and it consists of tools for numerical simulations of Quantum systems.
BSD 3-Clause "New" or "Revised" License
5 stars 7 forks source link

Creating random Hamiltonian #234

Open TreeratKJ opened 1 year ago

TreeratKJ commented 1 year ago

What feature should we add?

Context To create a quantum system contains random Hamiltonians with its elements are randomly generated from a normal(Gaussian) distribution (can add another distribution in the future)

Suggested Implementation

  1. Create a randomH function in qg.QuantumToolbox.operators with the input parameters: dimension: int - dimension of Hilbert space sparse: bool - if True, return sparse matrix mean: int - mean of the distribution SD: int - standard deviation of the distribution normalise: bool - if True, return normalised matrix symmetric: bool - if True, return symmetry matrix seedNum: int - specify the seed for random function

    • If setting seedNum=None, the function will generate random matrix and we can know the seedNum of the output matrix such that we are able to reproduce this random matrix.
    • If creating new random operator with the same seedNum, it will return the same matrix.
  2. Create a randSys class in qg.classes.Qsystem which is using randomH operator Also, we are able to know the seedNum of the randomH operator

Problem

Benefits from this implementation

github-actions[bot] commented 1 year ago

Branch 234-Creating_random_Hamiltonian created!