Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
00ab7c8c
Commit
00ab7c8c
authored
Mar 27, 2018
by
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty4/operators/sandwich_operator.py
View file @
00ab7c8c
...
...
@@ -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`.
Parameters
----------
...
...
@@ -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
@
property
def
domain
(
self
):
...
...
@@ -48,5 +48,4 @@ class SandwichOperator(EndomorphicOperator):
return
self
.
_op
.
apply
(
x
,
mode
)
def
draw_sample
(
self
):
# TBW
raise
NotImplementedError
return
self
.
_bun
.
adjoint_times
(
self
.
_cheese
.
draw_sample
())
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment