bsc-quantic / Tenet.jl

Composable Tensor Network library in Julia
https://bsc-quantic.github.io/Tenet.jl/
Apache License 2.0
17 stars 1 forks source link

Consider treating `State`s and `Operator`s as Functors #87

Closed mofeing closed 8 months ago

mofeing commented 10 months ago

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...

Proposal

function (tn::TensorNetwork{A})(x) where {...}
    ...
end

Things to decide

mofeing commented 8 months ago

Related code moved to Qrochet.jl.