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

Modifying the way to define operator used in QSys as array instead of function #243

Open TreeratKJ opened 1 year ago

TreeratKJ commented 1 year ago

Now, the operator in QuantumSystem is defined by an operator function, which we cannot define other parameters inside the function.

Goal: To create a qg.QuantumSystem(), the input operator here can be either operator function or array/matrix. For example, these two codes below should be working.

sys1 = qg.QuantumSystem(dimension=2, frequency=1, operator=qg.Jz)
sys2 = qg.QuantumSystem(frequency=1, operator=qg.Jz(j=0.5))