Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define (::ITensor / ::ITensor) #695

Closed
mtfishman opened this issue Jun 25, 2021 · 0 comments
Closed

Define (::ITensor / ::ITensor) #695

mtfishman opened this issue Jun 25, 2021 · 0 comments

Comments

@mtfishman
Copy link
Member

Define (::ITensor / ::ITensor) for the case when the second ITensor is a scalar:

julia> ITensor(2) / ITensor(3)
ERROR: MethodError: no method matching /(::ITensor, ::ITensor)
Closest candidates are:
  /(::KrylovKit.RecursiveVec, ::Any) at /home/mfishman/.julia/packages/KrylovKit/YPiz7/src/recursivevec.jl:33
  /(::KrylovKit.InnerProductVec, ::Any) at /home/mfishman/.julia/packages/KrylovKit/YPiz7/src/innerproductvec.jl:13
  /(::ITensor, ::Number) at /home/mfishman/.julia/dev/ITensors/src/itensor.jl:1578
Stacktrace:
 [1] top-level scope
   @ REPL[160]:1

julia> i = Index(2)
(dim=2|id=135)

julia> randomITensor(i) / 2
ITensor ord=1 (dim=2|id=135)
ITensors.NDTensors.Dense{Float64, Vector{Float64}}

julia> randomITensor(i) / ITensor(2)
ERROR: MethodError: no method matching /(::ITensor, ::ITensor)
Closest candidates are:
  /(::KrylovKit.RecursiveVec, ::Any) at /home/mfishman/.julia/packages/KrylovKit/YPiz7/src/recursivevec.jl:33
  /(::KrylovKit.InnerProductVec, ::Any) at /home/mfishman/.julia/packages/KrylovKit/YPiz7/src/innerproductvec.jl:13
  /(::ITensor, ::Number) at /home/mfishman/.julia/dev/ITensors/src/itensor.jl:1578
Stacktrace:
 [1] top-level scope
   @ REPL[164]:1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant