# dipole moment operator dipoles = [9.2374e-11 * mb.E0, 9.2374e-11 * math.sqrt(2) * mb.E0, 0] u = mb.qm_operator([0, 0, 0], dipoles) # relaxation superoperator rate = 1e10 rates = [[0, rate, rate], [rate, 0, rate], [rate, rate, 0]] relax_sop = mb.qm_lindblad_relaxation(rates) # initial density matrix rho_init = mb.qm_operator([1, 0, 0]) # quantum mechanical description qm = mb.qm_description(6e24, H, u, relax_sop) mat_ar = mb.material("AR_Song", qm) mb.material.add_to_library(mat_ar) # Song setup dev = mb.device("Song") dev.add_region(mb.region("Active region (single point)", mat_ar, 0, 0)) # scenario ic_d = mb.ic_density_const(rho_init) ic_e = mb.ic_field_const(0.0) ic_m = mb.ic_field_const(0.0) sce = mb.scenario("Basic", 1, 80e-15, ic_d, ic_e, ic_m, 10000) sce.add_record(mb.record("e", 0.0, 0.0)) sce.add_record(mb.record("d11", mb.record.density, 1, 1, 0.0, 0.0)) sce.add_record(mb.record("d22", mb.record.density, 2, 2, 0.0, 0.0)) sce.add_record(mb.record("d33", mb.record.density, 3, 3, 0.0, 0.0))
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA import mbsolve.lib as mb import mbsolve.solvercpu import mbsolve.writerhdf5 import math import time # vacuum mat_vac = mb.material("Vacuum") mb.material.add_to_library(mat_vac) # Ziolkowski active region material qm = mb.qm_desc_2lvl(1e24, 2 * math.pi * 2e14, 6.24e-11, 1.0e10, 1.0e10, -1.0) mat_ar = mb.material("AR_Ziolkowski", qm) mb.material.add_to_library(mat_ar) # Ziolkowski setup dev = mb.device("Ziolkowski") dev.add_region(mb.region("Vacuum left", mat_vac, 0, 7.5e-6)) dev.add_region(mb.region("Active region", mat_ar, 7.5e-6, 142.5e-6)) dev.add_region(mb.region("Vacuum right", mat_vac, 142.5e-6, 150e-6)) # initial density matrix rho_init = mb.qm_operator([1, 0])