Implementing an operator with an absolute value #1668
-
Hi! This may be a very trivial question, but I am trying to implement an operator which has an absolute value in it and I don't know how to do so. The exact operator is very complicated to write down here, but the general picture is as follows:
So basically, I need to act with these Any help would be tremendously appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
How is the absolute value of an operator defined exactly? |
Beta Was this translation helpful? Give feedback.
I see, so if I understand correctly, in a sense, you have a 'standard' operator$$\hat{V}$$ , and you want to define a new operator $$\tilde V $$ which is defined such that
Is that correct?
In that case... I'm afraid you won't be able to use built-in netket operators, as they only support standard operator addition and multiplication (by other operators or scalars).
You can hack your way through this, though it won't be trivial.
You need to modify
_get_conn_padded
, which returns matrix elements and connected elements, such that the matrix elements are the absolute value.If
V
had only a single term and was not a s…