Ejemplo n.º 1
0
 def test_hamiltonian_iw1d(self):
     grid_params = dict(n_x=32, n_e=2, x_min=-20, x_max=20)
     pot_params = dict(c_x=0, l_x=5)
     hamiltonian = Hamiltonian(grid_params=grid_params,
                               pot_params=pot_params)
     hamiltonian.solve()
     assert True
Ejemplo n.º 2
0
 def test_hamiltonian_iw1d(self):
     grid_params = dict(n_x=32, n_e=2, x_min=-20, x_max=20)
     sampler = InfiniteWell1DSampler(**grid_params)
     pot_params = sampler.sample_params()
     hamiltonian = Hamiltonian(grid_params=grid_params,
                               pot_params=pot_params)
     hamiltonian.solve()
     assert True
Ejemplo n.º 3
0
 def test_well2d(self):
     grid_params = dict(n_x=32,
                        n_y=32,
                        n_e=1,
                        x_min=-20,
                        x_max=20,
                        y_min=-20,
                        y_max=20)
     pot_params = dict(c_x=0, c_y=0, l_x=5, l_y=5)
     h = Hamiltonian(grid_params=grid_params, pot_params=pot_params)
     h.solve()
     assert True
Ejemplo n.º 4
0
 def test_coul2d(self):
     grid_params = dict(n_x=32,
                        n_y=32,
                        n_e=1,
                        x_min=-20,
                        x_max=20,
                        y_min=-20,
                        y_max=20)
     pot_params = dict(z=1, c_x=0, c_y=0, alpha=10**-9)
     h = Hamiltonian(grid_params=grid_params, pot_params=pot_params)
     h.solve()
     assert True
Ejemplo n.º 5
0
 def test_rand2d(self):
     grid_params = dict(n_x=32,
                        n_y=32,
                        n_e=1,
                        x_min=-20,
                        x_max=20,
                        y_min=-20,
                        y_max=20)
     pot_params = dict(k=2, r=20, sig1=3, sig2=5, p=2)
     h = Hamiltonian(grid_params=grid_params, pot_params=pot_params)
     h.solve()
     assert True
Ejemplo n.º 6
0
 def test_hamiltonian_rand2d(self):
     grid_params = dict(n_x=32,
                        n_y=32,
                        n_e=1,
                        x_min=-20,
                        x_max=20,
                        y_min=-20,
                        y_max=20)
     pot_params = dict(k=5, r=40, sig1=8, sig2=13, p=2)
     hamiltonian = Hamiltonian(grid_params=grid_params,
                               pot_params=pot_params)
     hamiltonian.solve()
     assert True
Ejemplo n.º 7
0
 def test_hamiltonian_sho2d(self):
     grid_params = dict(n_x=32,
                        n_y=32,
                        n_e=1,
                        x_min=-20,
                        x_max=20,
                        y_min=-20,
                        y_max=20)
     pot_params = dict(c_x=0, c_y=0, k_x=2, k_y=2)
     hamiltonian = Hamiltonian(grid_params=grid_params,
                               pot_params=pot_params)
     hamiltonian.solve()
     assert True
Ejemplo n.º 8
0
 def test_hamiltonian_coul2d(self):
     grid_params = dict(n_x=32,
                        n_y=32,
                        n_e=1,
                        x_min=-20,
                        x_max=20,
                        y_min=-20,
                        y_max=20)
     sampler = Coulomb2DSampler(**grid_params)
     pot_params = sampler.sample_params()
     hamiltonian = Hamiltonian(grid_params=grid_params,
                               pot_params=pot_params)
     hamiltonian.solve()
     assert True
Ejemplo n.º 9
0
 def test_hamiltonian_dig2d(self):
     grid_params = dict(n_x=32,
                        n_y=32,
                        n_e=1,
                        x_min=-20,
                        x_max=20,
                        y_min=-20,
                        y_max=20)
     sampler = DoubleInvertedGaussian2DSampler(**grid_params)
     pot_params = sampler.sample_params()
     hamiltonian = Hamiltonian(grid_params=grid_params,
                               pot_params=pot_params)
     hamiltonian.solve()
     assert True
Ejemplo n.º 10
0
 def test_hamiltonian_sho2d(self):
     grid_params = dict(n_x=32,
                        n_y=32,
                        n_e=1,
                        x_min=-20,
                        x_max=20,
                        y_min=-20,
                        y_max=20)
     sampler = SimpleHarmonicOscillator2DSampler(**grid_params)
     pot_params = sampler.sample_params()
     hamiltonian = Hamiltonian(grid_params=grid_params,
                               pot_params=pot_params)
     hamiltonian.solve()
     assert True
Ejemplo n.º 11
0
 def test_sho2d(self):
     grid_params = dict(n_x=32,
                        n_y=32,
                        n_e=1,
                        x_min=-20,
                        x_max=20,
                        y_min=-20,
                        y_max=20)
     pot_params = dict(c_x=0, c_y=0, k_x=1, k_y=1)
     Hamiltonian(grid_params=grid_params, pot_params=pot_params)
     assert True
Ejemplo n.º 12
0
 def test_dig2d(self):
     grid_params = dict(n_x=32,
                        n_y=32,
                        n_e=1,
                        x_min=-20,
                        x_max=20,
                        y_min=-20,
                        y_max=20)
     pot_params = dict(a1=2,
                       a2=2,
                       c_x1=-2,
                       c_x2=2,
                       c_y1=-2,
                       c_y2=2,
                       k_x1=2,
                       k_x2=2,
                       k_y1=2,
                       k_y2=2)
     h = Hamiltonian(grid_params=grid_params, pot_params=pot_params)
     h.solve()
     assert True
Ejemplo n.º 13
0
 def test_well1d(self):
     grid_params = dict(n_x=32, n_e=2, x_min=-20, x_max=20)
     pot_params = dict(c_x=0, l_x=5)
     Hamiltonian(grid_params=grid_params, pot_params=pot_params)
     assert True