Beispiel #1
0
	def setsympaulibasis(self,rho=None):
		"""
		Set symmetric Pauli operator basis
		Determine internal symmetries of a state to provide a basis spanning the minimal subspace containing the optimal witness

		rho : array_like
			An array_like object representing a density matrix of the given system.

		As an example use the basis symmetric with respect to the GHZ and W state to calculate the genuine multiparticle negativity of the GHZ state
		>>> from gmntools import gmn
		>>> ghz = [[.5,0,0,0,0,0,0,.5],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[.5,0,0,0,0,0,0,.5]]
		>>> w = [[0,0,0,0,0,0,0,0],[0,1./3.,1./3.,0,1./3.,0,0,0],[0,1./3.,1./3.,0,1./3.,0,0,0],[0,0,0,0,0,0,0,0],[0,1./3.,1./3.,0,1./3.,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0]]
		>>> gmntool = gmn([2,2,2],ghz)

		Determine a basis symmetric with respect to the current density matrix
		>>> gmntool.setsympaulibasis()
		>>> gmntool.gmn()
		0.4999999983690673

		Change to a basis symmetric with respect to the W state. No witness detecting genuine multiparticle entangelement is found within this subspace
		>>> gmntool.setsympaulibasis(w)
		>>> gmntool.gmn()
		-1.7734501447089677e-09
		"""
		if not all([2==i for i in self.__dimsubs]):
			raise TypeError("Memberfuction availible in qubit systems only.")
		if not rho:
			if not self.__rho:
				raise TypeError("Set density matrix before calling Memberfunction or provide density matrix as argument.")
			else:
				self.setoperatorbasis(pauli(self.__nsys).symbasis(self.__rho.matrix))
		else:
			self.setoperatorbasis(pauli(self.__nsys).symbasis(rho))
Beispiel #2
0
	def setpaulibasis(self):
		"""
		Set Pauli operator basis
		Use a operator basis consisting of tensor products of Pauli operators

		Try to find the optimal witness within the operator subspace spanned by pauli operators X,Y,Z and qubit identity matrices (1): 111, XXZ, XZX, ZXX, ZZZ
		>>> from gmntools import gmn
		>>> ghz = [[.5,0,0,0,0,0,0,.5],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[.5,0,0,0,0,0,0,.5]]
		>>> gmntool = gmn([2,2,2],ghz)

		Use a basis of tensor products of Pauli matrices as basis
		>>> gmntool.setpaulibasis()
		>>> gmntool.gmn()
		0.49999999836906783

		Reset to the default operator basis
		>>> gmntool.setoperatorbasis()
		>>> gmntool.gmn()
		0.499999998369068
		"""
		if not all([2==i for i in self.__dimsubs]):
			raise TypeError("Memberfuction availible in qubit systems only.")
		self.setoperatorbasis(pauli(self.__nsys).basis())