Commit e10e2759 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

symmetric->self_adjoint

parent 7967f2d5
......@@ -105,10 +105,10 @@ class DiagonalOperator(EndomorphicOperator):
return self._implemented
@property
def symmetric(self):
if self._symmetric is None:
self._symmetric = (self._diagonal.val.imag == 0).all()
return self._symmetric
def self_adjoint(self):
if self._self_adjoint is None:
self._self_adjoint = (self._diagonal.val.imag == 0).all()
return self._self_adjoint
@property
def unitary(self):
......@@ -155,8 +155,8 @@ class DiagonalOperator(EndomorphicOperator):
# Otherwise, inplace weightening would change the external field
f.weight(inplace=copy, power=-1)
# Reset the symmetric property:
self._symmetric = None
# Reset the self_adjoint property:
self._self_adjoint = None
# Reset the unitarity property
self._unitary = None
......
......@@ -26,7 +26,7 @@ class EndomorphicOperator(LinearOperator):
# ---Overwritten properties and methods---
def inverse_times(self, x, spaces=None):
if self.symmetric and self.unitary:
if self.self_adjoint and self.unitary:
return self.times(x, spaces)
else:
return super(EndomorphicOperator, self).inverse_times(
......@@ -34,7 +34,7 @@ class EndomorphicOperator(LinearOperator):
spaces=spaces)
def adjoint_times(self, x, spaces=None):
if self.symmetric:
if self.self_adjoint:
return self.times(x, spaces)
else:
return super(EndomorphicOperator, self).adjoint_times(
......@@ -42,7 +42,7 @@ class EndomorphicOperator(LinearOperator):
spaces=spaces)
def adjoint_inverse_times(self, x, spaces=None):
if self.symmetric:
if self.self_adjoint:
return self.inverse_times(x, spaces)
else:
return super(EndomorphicOperator, self).adjoint_inverse_times(
......@@ -50,7 +50,7 @@ class EndomorphicOperator(LinearOperator):
spaces=spaces)
def inverse_adjoint_times(self, x, spaces=None):
if self.symmetric:
if self.self_adjoint:
return self.inverse_times(x, spaces)
else:
return super(EndomorphicOperator, self).inverse_adjoint_times(
......@@ -66,5 +66,5 @@ class EndomorphicOperator(LinearOperator):
# ---Added properties and methods---
@abc.abstractproperty
def symmetric(self):
def self_adjoint(self):
raise NotImplementedError
......@@ -112,5 +112,5 @@ class ProjectionOperator(EndomorphicOperator):
return self._unitary
@property
def symmetric(self):
def self_adjoint(self):
return True
......@@ -79,7 +79,7 @@ class PropagatorOperator(InvertibleOperatorMixin, EndomorphicOperator):
return True
@property
def symmetric(self):
def self_adjoint(self):
return True
@property
......
......@@ -58,7 +58,7 @@ class SmoothingOperator(EndomorphicOperator):
return True
@property
def symmetric(self):
def self_adjoint(self):
return True
@property
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment