示例#1
0
def test_create_boson():
    basis0 = bosehubbard.Basis(5, 0)
    basis1 = bosehubbard.Basis(5, 1)

    state0 = np.zeros((basis0.len, ))
    state0[0] = 1

    state1 = util.create(0, state0, basis0, basis1)

    assert (np.isclose(np.abs(state1[0]), 1))
示例#2
0
def test_create_boson_annihilate_boson():
    basis4 = bosehubbard.Basis(5, 4)
    basis5 = bosehubbard.Basis(5, 5)

    state5 = np.random.rand(basis5.len, )

    state4 = util.annihilate(0, state5, basis5, basis4)
    nstate5 = util.create(0, state4, basis4, basis5)

    assert (np.allclose(basis5.vs[:, 0] * state5, nstate5))
	def create_tax_codes(self):
		try :			
			data = utilities.create(TAX_CODES, CREATE, self)
			utilities.log_req_res(data, self)
		except:
			utilities.get_error_message(self)
	def create_account_codes(self):
		try :			
			data = utilities.create(ACCOUNT_CODES, CREATE, self)
			utilities.log_req_res(data, self)
		except:
			utilities.get_error_message(self)
	def create_purchase_orders(self):
		try :			
			data = utilities.create(PURCHASE_ORDERS, CREATE, self)
			utilities.log_req_res(data, self)
		except:
			utilities.get_error_message(self)
	def create_supplier_invoices(self):
		try :			
			data = utilities.create(SUPPLIER_INVOICES, CREATE, self)
			utilities.log_req_res(data, self)
		except:
			utilities.get_error_message(self)
	def create_customer_invoices(self):
		try :			
			data = utilities.create(CUSTOMER_INVOICES, CREATE, self)
			utilities.log_req_res(data, self)
		except:
			utilities.get_error_message(self)
	def create_assets(self):
		try :			
			data = utilities.create(ASSETS, CREATE, self)
			utilities.log_req_res(data, self)
		except:
			utilities.get_error_message(self)
	def create_jobs(self):
		try :			
			data = utilities.create(JOBS, CREATE, self)
			utilities.log_req_res(data, self)
		except:
			utilities.get_error_message(self)
示例#10
0
	def create_opportunities(self):
		try :			
			data = utilities.create(OPPORTUNITIES, CREATE, self)
			utilities.log_req_res(data, self)
		except:
			utilities.get_error_message(self)
示例#11
0
	def create_contacts(self):
		try :			
			data = utilities.create(CONTACTS, CREATE, self)
			utilities.log_req_res(data, self)
		except:
			utilities.get_error_message(self)