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

Implement trace methods for `QuantumTensorNetwork` #110

Closed mofeing closed 8 months ago

mofeing commented 9 months ago

LinearAlgebra.tr is the Julia function for the trace operator. Specialized methods must be defined for QuantumTensorNetwork.

If the quantum tensor network is a Property (i.e. a closed TN, its contraction returns a scalar number), then it should act as the identity and do nothing.

If it's a State, it should error.

If it's an Operator, then it should connect the input and output indices.

mofeing commented 8 months ago

Related code moved to Qrochet.jl.

mofeing commented 7 months ago

Triggering TagBot for merged registry pull request: https://github.com/bsc-quantic/Registry/pull/100

mofeing commented 7 months ago

Triggering TagBot for merged registry pull request: https://github.com/bsc-quantic/Registry/pull/105