You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to the "directionality" of quantum tensor networks, it might be beneficial to consider adding support to "call" tensor network states and operators, turning them into functors.
Quantum Operators are... (you guessed it) operators, so they are functions that map functions to functions. Quantum States are complex-valued functions but its duals are functionals that map States to complex numbers. This is exactly the behavior seen in Tensor Networks (and QM), where...
An operator $U$ acting on a function $\ket{\psi}$ leads to a function $\ket{\psi'}$$$U \ket{\psi} = \ket{\psi'}$$
A functional $\bra{\psi}$ acting on an operator $U$ leads to a functional $\bra{\psi'}$$$\bra{\psi} U = \bra{\psi'}$$
An operator $U$ acting on another operator $V$ leads to third operator $W$$$U V = W$$
A functional $\bra{\psi}$ acting on a function $\ket{\phi}$ leads to a scalar $\alpha$$$\braket{\psi \mid \phi} = \alpha$$
Proposal
function (tn::TensorNetwork{A})(x) where {...}
...end
Things to decide
What is the behavior for Propertys (i.e. TNs with no open physical indices)? IMO the most intuitive thing would be to perform scalar multiplication ⇒ outer product in TN
Can dynamic dispatch be avoided? Plug type should be sufficient but it's unclear how to do type dispatch on it.
Maybe @generated functions?
Maybe refactor Quantum to account this information?
The text was updated successfully, but these errors were encountered:
Due to the "directionality" of quantum tensor networks, it might be beneficial to consider adding support to "call" tensor network states and operators, turning them into functors.
Quantum
Operator
s are... (you guessed it) operators, so they are functions that map functions to functions. QuantumState
s are complex-valued functions but its duals are functionals that mapState
s to complex numbers. This is exactly the behavior seen in Tensor Networks (and QM), where...Proposal
Things to decide
Property
s (i.e. TNs with no open physical indices)? IMO the most intuitive thing would be to perform scalar multiplication ⇒ outer product in TNPlug
type should be sufficient but it's unclear how to do type dispatch on it.@generated
functions?Quantum
to account this information?The text was updated successfully, but these errors were encountered: