Commit 00ab7c8c authored by Philipp Arras's avatar Philipp Arras
Browse files

Add draw_sample to Sandwich operators and change sandwich convention

parent ffeb61cc
Pipeline #26492 failed with stage
in 4 minutes and 18 seconds
......@@ -20,7 +20,7 @@ from .endomorphic_operator import EndomorphicOperator
class SandwichOperator(EndomorphicOperator):
"""Operator which is equivalent to the expression `bun*cheese*bun.adjoint`.
"""Operator which is equivalent to the expression `bun.adjoint*cheese*bun`.
......@@ -34,7 +34,7 @@ class SandwichOperator(EndomorphicOperator):
super(SandwichOperator, self).__init__()
self._bun = bun
self._cheese = cheese
self._op = bun*cheese*bun.adjoint
self._op = bun.adjoint*cheese*bun
def domain(self):
......@@ -48,5 +48,4 @@ class SandwichOperator(EndomorphicOperator):
return self._op.apply(x, mode)
def draw_sample(self):
raise NotImplementedError
return self._bun.adjoint_times(self._cheese.draw_sample())
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