Question: Using Threads with Physics:-`.`

An elementary example of successful using Threads:

restart; with(Threads); Nc := 5; cont := proc (a, b) return a+b end proc; task := proc (U, i, j) local k; if i = j then return U(i) else k := floor((1/2)*j-(1/2)*i)+i; Threads:-Task:-Continue(cont, Task = [task, U, i, k], Task = [task, U, k+1, j]) end if end proc

5

(1)

ap1 := proc (k) options operator, arrow; sin(evalf(k)) end proc:

0.217383476e-1

(2)

Physics:-`.` failed the test of using with Threads. Is Threads supported in Physics package?  Maple becomes closed while trying to run the last command: w2:=...

with(Physics); Physics:-Setup(anticommutativeprefix = psi); ap2 := proc (k) Creation(psi, k, notation = explicit) end proc; phi2 := Ket(psi, seq(0, i = 1 .. Nc)); U2 := proc (i) options operator, arrow; ap2(i).phi2 end proc; w2 := Threads:-Task:-Start(task, U2, Nc)

 

NULL

Threads.mw

Please Wait...