## Tribute to Alan Baker

by: Maple

Hello,

It has come to my attention that Alan Baker has recently passed away, and not being of an institutional affliation it was some what late in me finding out.

But his work was of huge inspiration to me, so I felt as if it should be noted how brilliant this man was, and how much he ought to be missed be the mathematical community at large.

https://en.wikipedia.org/wiki/Alan_Baker_(mathematician)

## A Boggle board

Maple

I've created a worksheet that outputs a boggle board.  I think it could be more efficient than the method I came up with but the idea is there.  The only way I could figure to rotate the letters was to output them to a bmp format then read them back in and use imagetools for rotation.  I used Times Roman font but the font Boggle uses I think is Tunga, Latha or Mangal.

Note - remove the colon in the last line to produce the output.  One other thing I believe, in Tools->Options-> (uncheck)Limit Expression Length to 1000000

Saving the file with the output would have produced a file in the tens of Megabytes and may have caused error loading.

 (1)

 (2)

Setting up the 16 boggle cubes

 (3)

 (4)

 (5)

 (6)

 (7)

## Quantum Teleportation in Dirac notation with...

by: Maple

This is an application of the previous posts
https://www.mapleprimes.com/posts/209057-Procedure-For-Expanding-Tensor-Product

I have a fourth version of the ExpandQop that will expand automaticaly the power of
quantum tensor product. This is just a minor change to the procedure.

Now here is an application for all this that will help understanding a little about
quantum computing. This is the classical concept of quantum teleportation.

You will need to run the above mentionned file and uncomment the save line in the file
before running the example.

LL

 > ###################################################################### # NOTICE                                                             # # Author: Louis Lamarche                                             # #         Institute of Research of Hydro-Quebec (IREQ)               # #         Science des données et haute performance                   # #         2018, March 7                                              # #                                                                    # # Function name: ExpandQop (x)                                       # #       Purpose: Compute the tensor product of two quantum           # #                operators in Dirac notations                        # #      Argument: x: a quantum operator                               # #  Improvements: Manage all +, -, *, /, ^, mod  operations           # #                in the argument. Manages multiple tensor products   # #                like A*B*C*F                                        # #       Version: 3                                                   # #                                                                    # #  Copyrigth(c) Hydro-Quebec.                                        # #        Note 1: Permission to use this softwate is granted if you   # #                acknowledge its author and copyright                # #        Note 2: Permission to copy this softwate is granted if you  # #                leave this 21 lines notice intact. Thank you.       # ###################################################################### restart;
 > with(Physics): interface(imaginaryunit=i): Setup(mathematicalnotation=true);
 (1)
 > Setup(unitaryoperators={I,U,X,Y,Z,H,HI,CNOT,CnotI}); Setup(noncommutativeprefix={q,beta,psi});
 (2)
 > Setup(bracketrules= { %Bracket(%Bra(q0), %Ket(q0))=1,                       %Bracket(%Bra(q1), %Ket(q1))=1,                       %Bracket(%Bra(q1), %Ket(q0))=0,                       %Bracket(%Bra(q0), %Ket(q1))=0                     });
 (3)
 > #################################################################################### # Load the procedure and set the required global variables # read "ExpandQop.m": optp:=op(0,Ket(q0)*Ket(q1)): optpx:= op(0,(Ket(q0)+Ket(q1))^2): # ####################################################################################
 > # # Pauli operators # print("Pauli gates"); I:=Ket(q0)*Bra(q0)+Ket(q1)*Bra(q1);        # = sigma[0] X:=Ket(q1)*Bra(q0)+Ket(q0)*Bra(q1);        # = sigma[1] = sigma[x] Y:=-i*Ket(q1)*Bra(q0)+i*Ket(q0)*Bra(q1);   # = sigma[2] = sigma[y] Z:=Ket(q0)*Bra(q0)-Ket(q1)*Bra(q1);        # = sigma[3] = sigma[z]
 (4)
 > ############################## # Defining the Hadamard gate # ############################## print("Hadamard gate"); H:= Ket(q0)*Bra(q0)/sqrt(2)+Ket(q0)*Bra(q1)/sqrt(2)+Ket(q1)*Bra(q0)/sqrt(2)-Ket(q1)*Bra(q1)/sqrt(2);
 (5)
 > # This is usefull to represent a 2 qubits system # A more general approach is needed for a n qubit system. DefineStates:=proc()     Ket(q00):=Ket(q0)*Ket(q0);  Ket(q01):=Ket(q0)*Ket(q1);     Ket(q10):=Ket(q1)*Ket(q0);  Ket(q11):=Ket(q1)*Ket(q1);     Bra(q00):=Dagger(Ket(q00)); Bra(q01):=Dagger(Ket(q01));     Bra(q10):=Dagger(Ket(q10)); Bra(q11):=Dagger(Ket(q11));     return;     end proc: UndefineStates:=proc()     Ket(q00):='Ket(q00)'; Ket(q01):='Ket(q01)';     Ket(q10):='Ket(q10)'; Ket(q11):='Ket(q11)';     Bra(q00):='Bra(q00)'; Bra(q01):='Bra(q01)';     Bra(q10):='Bra(q10)'; Bra(q11):='Bra(q11)';     return;     end proc:
 > #################################### # Defining the CNOT gate (2 qubits) #################################### print("CNOT gate"); CNOT:=Ket(q00)*Bra(q00)+ Ket(q01)*Bra(q01)+ Ket(q11)*Bra(q10)+Ket(q10)*Bra(q11); DefineStates(); 'CNOT'=CNOT;
 (6)
 > ########################### # Defining the Bell states ########################### Ket(beta,x,y)='CNOT.(((H.Ket(x)))*Ket(y))'; Ket(beta00):=CNOT.(Expand((H.Ket(q0)))*Ket(q0)); Ket(beta01):=CNOT.(Expand((H.Ket(q0)))*Ket(q1)); Ket(beta10):=CNOT.(Expand((H.Ket(q1)))*Ket(q0)); Ket(beta11):=CNOT.(Expand((H.Ket(q1)))*Ket(q1));
 (7)
 > ########################################################## # Quantum teleportation # Reference: Quantum Computation and Quantum Information #            10th Anniversary Edition #            Michael A. Nielsen & Isaac L. Chuang #            Cambridge University Press, Cambridge 2010 #            pp 25-28 ########################################################## print("State to be teleported"); Ket(psi) := a*Ket(q0)+b*Ket(q1); print("Step 1: Compute the tensor product of the state to be teleported with ", 'Ket(beta00)'); Ket(psi[0])='Ket(psi)'*'Ket(beta00)'; Ket(psi[0]):=Expand(Ket(psi)*Ket(beta00)); print("This is a 3 qubits state"); ####### print("Step 2: Pass these 3 qubits through a  CNOT*I  operator"); 'CnotI'='CNOT*I'; CnotI:=ExpandQop(Expand(CNOT*I)): # # To see what the CNOTI operator looks like # # print("CNOTI="); # print(op(1,CNOTI)+op(2,CNOTI)+op(3,CNOTI)+op(4,CNOTI)); # print(op(5,CNOTI)+op(6,CNOTI)+op(7,CNOTI)+op(8,CNOTI)); 'Ket(psi[1])'='CnotI.Ket(psi[0])'; Ket(psi[1]):=Expand(CnotI.Ket(psi[0])); ####### print("Step 3: Pass these 3 qubits through an Haldamard*I  operator"); 'HalI'='H*I'; HalI:=ExpandQop(Expand(H*I)): # # To see what the Haldamard*I operator looks like # # print("HalI="); # print(op(1,HalI)+op(2,HalI)+op(3,HalI)+op(4,HalI)); # print(op(5,HalI)+op(6,HalI)+op(7,HalI)+op(8,HalI)); 'Ket(psi[2])'='HalI.Ket(psi[1])'; Ket(psi[2]):=Expand(HalI.Ket(psi[1]));
 (8)
 > UndefineStates(); print("Using contracted names for the first two qubits"); Ket(q00)*Bra(q0)*Bra(q0)='I'; Ket(q01)*Bra(q0)*Bra(q1)='I'; Ket(q10)*Bra(q1)*Bra(q0)='I'; Ket(q11)*Bra(q1)*Bra(q1)='I'; 'Ket(psi[2])'=Ket(q00)*Bra(q0)*Bra(q0).Ket(psi[2])+               Ket(q01)*Bra(q0)*Bra(q1).Ket(psi[2])+               Ket(q10)*Bra(q1)*Bra(q0).Ket(psi[2])+               Ket(q11)*Bra(q1)*Bra(q1).Ket(psi[2]);
 (9)
 > print("Rewriting this result by hand"); 'Ket(psi[2])'=(Ket(q00)*(a*Ket(q0)+b*Ket(q1))+                Ket(q01)*(a*Ket(q0)-b*Ket(q1))+                Ket(q10)*(a*Ket(q1)+b*Ket(q0))+                Ket(q11)*(a*Ket(q1)-b*Ket(q0)))/2;
 (10)
 > DefineStates(); print("If Alice measures 00 Bob does noting"); ''I'.   '2*Bra(q00).Ket(psi[2])'' =  I.   2*Bra(q00).Ket(psi[2]); print("If Alice measures 01 Bob applies the X gate"); ''X'.   '2*Bra(q01).Ket(psi[2])'' =  X.   2*Bra(q01).Ket(psi[2]); print("If Alice measures 10 Bob applies the Z gate"); ''Z'.   '2*Bra(q10).Ket(psi[2])'' =  Z.   2*Bra(q10).Ket(psi[2]); print("If Alice measures 11 Bob applies the X gate and then the Z gate"); ''Z'.'X'. '2*Bra(q11).Ket(psi[2])'' =  Z.X. 2*Bra(q11).Ket(psi[2]);
 (11)
 >

## Procedure for expanding tensor product of quantum...

by: Maple

Version 2 do not enable to expand multiple product like A*A*B*E
Version 3 will now do that.
I just forgot to add this feature.

LL.

 > ###################################################################### # NOTICE                                                             # # Author: Louis Lamarche                                             # #         Institute of Research of Hydro-Quebec (IREQ)               # #         Science des données et haute performance                   # #         2018, March 7                                              # #                                                                    # # Function name: ExpandQop (x)                                       # #       Purpose: Compute the tensor product of two quantum           # #                operators in Dirac notations                        # #      Argument: x: a quantum operator                               # #  Improvements: Manage all +, -, *, /, ^, mod  operations           # #                in the argument. Manages multiple tensor products   # #                like A*B*C*F                                        # #       Version: 3                                                   # #                                                                    # #  Copyrigth(c) Hydro-Quebec.                                        # #        Note 1: Permission to use this softwate is granted if you   # #                acknowledge its author and copyright                # #        Note 2: Permission to copy this softwate is granted if you  # #                leave this 21 lines notice intact. Thank you.       # ###################################################################### restart;
 > with(Physics): interface(imaginaryunit=i): Setup(mathematicalnotation=true);
 (1)
 > Setup(quantumoperators={A,B,C,Cn}); Setup(noncommutativeprefix={a,b,q});
 (2)
 > opexp:= op(0,10^x):            # exponentiation id opnp := op(0,10*x):            # normal product id optp := op(0,Ket(q0)*Ket(q1)): # tensor product id opdiv:= Fraction:            # fraction       id           opsym:= op(0,x):               # symbol         id opint:= op(0,10):              # integer        id opflt:= op(0,10.0):            # float          id opcpx:= op(0,i):               # complex        id opbra:= op(0,Bra(q)):          # bra            id opket:= op(0,Ket(q)):          # ket            id opmod:= op(0, a mod b):        # mod            id ExpandQop:=proc(x)     local nx,ret,j,lkb,cbk,rkb,no,lop,success;     lop:=op(0,x);     no:=nops(x);     if lop = opsym or lop = opint or lop = opflt or        lop = opbra or lop = opket or lop = opcpx then          ret:=x;     else     if lop = opexp then         ret:=x;     else            if lop = opnp then         ret:=1;         for j from 1 to no do             ret:=ret*ExpandQop(op(j,x));         end do;             else     if lop = + then         ret:=0;         for j from 1 to no do             ret:=ret+ExpandQop(op(j,x));         end do;     else     if lop = - then         ret:=0;         for j from 1 to no do             ret:=ret-ExpandQop(op(j,x));         end do;     else     if lop = opdiv then        ret:=1;        for j from 1 to no do            ret:=ret/ExpandQop(op(j,x));        end do;     else     if lop = opmod then        ret:=x;     else     if lop = optp then        if (no > 3 ) then            success:=false;            nx:=x;            while not success do              lkb:=0; cbk:=0; rkb:=0;ret:=1;              for j from 1 to no do                  if (j>1) then                       if(lkb=0) then                           if( type(op(j-1,nx),Ket) and                               type(op(j,nx),Bra) ) then lkb:=j-1; fi;                       else                           if( type(op(j-1,nx),Ket) and                               type(op(j,nx),Bra) ) then rkb:=j;   fi;                       fi;                       if( type(op(j-1,nx),Bra) and type(op(j,nx),Ket) )                                                    then cbk:=j;   fi;                  fi;              end do;              if ( (lkb < cbk) and (cbk
 > # Let A be an operator in a first Hilbert space of dimension n #  using the associated orthonormal ket and bra vectors # # kets1:=Ket(a1)*Ket(a2)*Ket(a3)*Ket(a4)*Ket(a5): A:=kets1*Dagger(kets1); # Let B be an operator in a second Hilbert (Ketspace of dimension m #  using the associated orthonormal ket and bra vectors # # kets2:=Ket(b1)*Ket(b2)*Ket(b3): B:=kets2*Dagger(kets2); # The tensor product of the two operators acts on a n+m third # Hilbert space   unsing the appropriately ordered ket # and bra  vectors of the two preceding spaces. The rule for # building this operator in Dirac notation is as follows, # # print("Maple do not compute the tensor product of operators,"); print("C=A*B gives:"); C:=A*B; print("ExpandQop(C) gives the expected result:"); Cn:=ExpandQop(C);
 (3)
 > kets3:=kets1*kets2; bras3:=Dagger(kets3); print("Matrix elements computed with C appears curious"); 'bras3.C. kets3'="..."; bras3.C.kets3; print("Matrix elements computed with Cn as expected"); 'bras3.Cn.kets3'=bras3.Cn.kets3;
 (4)
 > print("Example"); En:=ExpandQop(10*(1-x+y+z)*i*(1/sqrt(2))*A*B);
 (5)
 > print("Another example"); 'F'='A*B/sqrt(2)+B*A/sqrt(2)'; F:=A*B/sqrt(2)+B*A/sqrt(2): 'op(1,F)'=op(1,F); 'op(2,F)'=op(2,F); 'Fn'='ExpandQop(F)'; Fn:=ExpandQop(F): 'op(1,Fn)'=op(1,Fn); 'op(2,Fn)'=op(2,Fn);
 (6)
 > print("Final example, multiple products"); G:=B*B*B; 'G'=ExpandQop(G);
 (7)
 >

## Automatic handling of collision of tensor indices...

by: Maple

Automatic handling of collision of tensor indices in products

The design of products of tensorial expressions that have contracted indices got enhanced. The idea: repeated indices in certain subexpressions are actually dummies. So suppose  and  are tensors, then in ,  is just a dummy, therefore  is a well defined object. The new design automatically maps input like  into . This significantly simplifies the manipulation of indices when working with products of tensorial expressions: each tensorial expression being multiplied has its repeated indices automatically transformed into different ones when they would collide with the free or repeated indices of the other expressions being multiplied.

This functionality is available within the Physics update distributed at the Maplesoft R&D Physics webpage (but for what you see under Preview that makes use of a new kernel feature of the Maple version under development).

 >
 >
 (1)
 >
 (2)

This shows the automatic handling of collision of indices

 >
 (3)
 >
 (4)
 >

Preview only in the upcomming version under development

Consider now the case of three tensors

 >
 (5)
 >
 (6)

The product above has indeed the index  repeated more than once, therefore none of its occurrences got automatically transformed into contravariant in the output, and Check  detects the problem interrupting with an error  message

 >

However, it is now also possible to indicate, using parenthesis, that the product of two of these tensors actually form a subexpression, so that the following two tensorial expressions are well defined, and the colliding dummy is automatically replaced making that explicit

 >
 (7)
 >
 (8)

This change in design makes concretely simpler the use of indices in that it eliminates the need for manually replacing dummies. For example, consider the tensorial expression for the angular momentum in terms of the coordinates and momentum vectors, in 3 dimensions

 >
 (9)

Define  respectively representing angular and linear momentum

 >
 (10)

Introduce the tensorial expression for

 >
 (11)

The left-hand side has one free index, , while the right-hand side has two dummy indices  and

 >
 (12)

If we want to computewe can now take the square of (11) directly, and the dummy indices on the right-hand side are automatically handled, there is now no need to manually substitute the repeated indices to avoid their collision

 >
 (13)

The repeated indices on the right-hand side are now

 >
 (14)
 >

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

## Procedure for expanding tensor product of quantum...

by: Maple

Here is a major upgrade of the procedure I submitted in february.

https://www.mapleprimes.com/posts/209030-Procedure-For-Computing-The-Tensor-Product

There is a line after the procedure to save it in the file "ExpandQop.m"
In future post I will use it in order to minimize the size of the examples.

Louis Lamarche

 > ###################################################################### # NOTICE                                                             # # Author: Louis Lamarche                                             # #         Institute of Research of Hydro-Quebec (IREQ)               # #         Science des données et haute performance                   # #         2018, March 7                                              # #                                                                    # # Function name: ExpandQop (x)                                       # #       Purpose: Compute the tensor product of two quantum           # #                operators in Dirac notations                        # #      Argument: x: a quantum operator                               # #  Improvements: Manage all +, -, *, /, ^, mod  operations           # #                in the argument                                     # #       Version: 2                                                   # #                                                                    # #  Copyrigth(c) Hydro-Quebec.                                        # #        Note 1: Permission to use this softwate is granted if you   # #                acknowledge its author and copyright                # #        Note 2: Permission to copy this softwate is granted if you  # #                leave this 21 lines notice intact. Thank you.       # ###################################################################### restart;
 > with(Physics): interface(imaginaryunit=i): Setup(mathematicalnotation=true);
 (1)
 > Setup(quantumoperators={A,B,C,Cn}); Setup(noncommutativeprefix={a,b,q});
 (2)
 > opexp:= op(0,10^x):            # exponentiation id opnp := op(0,10*x):            # normal product id optp := op(0,Ket(q0)*Ket(q1)): # tensor product id opdiv:= Fraction:            # fraction       id           opsym:= op(0,x):               # symbol         id opint:= op(0,10):              # integer        id opflt:= op(0,10.0):            # float          id opcpx:= op(0,i):               # complex        id opbra:= op(0,Bra(q)):          # bra            id opket:= op(0,Ket(q)):          # ket            id opmod:= op(0, a mod b):        # mod            id ExpandQop:=proc(x)     local ret,j,lkb,cbk,rkb,no,lop;     lkb:=0; cbk:=0; rkb:=0;     lop:=op(0,x);     no:=nops(x);     if lop = opsym or lop = opint or lop = opflt or        lop = opbra or lop = opket or lop = opcpx then          ret:=x;     else     if lop = opexp then         ret:=x;     else            if lop = opnp then         ret:=1;         for j from 1 to no do             ret:=ret*ExpandQop(op(j,x));         end do;             else     if lop = + then         ret:=0;         for j from 1 to no do             ret:=ret+ExpandQop(op(j,x));         end do;     else     if lop = - then         ret:=0;         for j from 1 to no do             ret:=ret-ExpandQop(op(j,x));         end do;     else     if lop = opdiv then        ret:=1;        for j from 1 to no do            ret:=ret/ExpandQop(op(j,x));        end do;     else     if lop = opmod then        ret:=x;     else     if lop = optp then         ret:=1;        if (no > 3 ) then            for j from 1 to no do                if (j>1) then                     if(lkb=0) then                         if( type(op(j-1,x),Ket) and                             type(op(j,x),Bra) ) then lkb:=j-1; fi;                     else                         if( type(op(j-1,x),Ket) and                             type(op(j,x),Bra) ) then rkb:=j;   fi;                     fi;                     if( type(op(j-1,x),Bra) and type(op(j,x),Ket) )                                                 then cbk:=j;   fi;                fi;            end do;            if ( (lkb < cbk) and (cbk
 > # Let A be an operator in a first Hilbert space of dimension n #  using the associated orthonormal ket and bra vectors # # kets1:=Ket(a1)*Ket(a2)*Ket(a3)*Ket(a4)*Ket(a5): A:=kets1*Dagger(kets1); # Let B be an operator in a second Hilbert (Ketspace of dimension m #  using the associated orthonormal ket and bra vectors # # kets2:=Ket(b1)*Ket(b2)*Ket(b3): B:=kets2*Dagger(kets2); # The tensor product of the two operators acts on a n+m third # Hilbert space   unsing the appropriately ordered ket # and bra  vectors of the two preceding spaces. The rule for # building this operator in Dirac notation is as follows, # # print("Maple do not compute the tensor product of operators,"); print("C=A*B gives:"); C:=A*B; print("ExpandQop(C) gives the expected result:"); Cn:=ExpandQop(C);
 (3)
 > kets3:=kets1*kets2; bras3:=Dagger(kets3); print("Matrix elements computed with C appears curious"); 'bras3.C. kets3'="..."; bras3.C.kets3; print("Matrix elements computed with Cn as expected"); 'bras3.Cn.kets3'=bras3.Cn.kets3;
 (4)
 > print("Example"); En:=ExpandQop(10*(1-x+y+z)*i*(1/sqrt(2))*A*B);
 (5)
 > print("Another example"); 'F'='A*B/sqrt(2)+B*A/sqrt(2)'; F:=A*B/sqrt(2)+B*A/sqrt(2): 'op(1,F)'=op(1,F); 'op(2,F)'=op(2,F); 'Fn'='ExpandQop(F)'; Fn:=ExpandQop(F): 'op(1,Fn)'=op(1,Fn); 'op(2,Fn)'=op(2,Fn);
 (6)
 >

## Maple 2017 Training Session

by: Maple

--- Prolog.ue ---

The best things in life come free of charge.

Happiness, love, and wisdom of expertise are first few that hit my mind.

As a business economist, I keep my eyes keenly open to opportunities for growth; such as Maple 2017 training session.

It was a Saturday afternoon in Waterloo, ON, this chilly Feburary which was blessed by snowstorm warning.

--- Encountering with Maple ---

I was aware of Maple for many years back when my academic career began.

In fact, Maple was available in the lab computers at university.

But I did not know what to do with it.

Nor did I use any mathematics softwares until recently, but I had this thought : one day I could learn.

The motivation for this learn how to use it' did not occur to me for a long time (14 years!!).

Things changed this year when I enrolled to an Electrical Engineering program at Lassonde.

Mind you, I have already been using various types of languages and tools such as: Python, C, Java, OpenOfficeSuites, Stata, SAS, Latex just to mention a few.

These stuffs also run on multiple platforms which I am sure you have heard of if you're reading this post; Windows, OSX and Linux. And Maple supports all these major operating systems.

--- Why do I like Maple ---

During the first week of school, Dr. Smith would ask us to purchase and practice using MATLAB because it had a relatively easy learning curve for beginners like python and we were going to use it for labs.

Furthermore, students get a huge discount (i.e. $1500 to$50) for these softwares.

Then, the professor also added; "Maple is also a great tool to use, but we won't use it for this class".

ME: ' Why not ? '

The curiosity inside me gave in and I decided to try both!

After all, my laziness in taking derivatives by hand or the possibility of making mistake would disappear if I can verify results using software.

That's it...!

Being able to check correct answer was already worth more than $50. I can not emphasize this point enough; For people in the industry being paid for their time, or students like me who got a busy schedule can not afford to waste any time. (i.e. need to minimize homework effort & frustration, while maximizing the educational attainment & final grades) Right? Time is money. Don't we all just want more spare time for things we care? Googling through many ambiguous Yahoo Answers or online forums like Stackoverflow replies are often misleading and time consuming. I have spent years (estimated 3000+ hours) going through those wildly inaccurate webpages hoping for some clearly written information with sub-optimal outcome. Diverting many hours of study time is not something a first year S.T.E.M. students can afford. --- Maple Training --- Now you know about my relationships with Maple; Let me describe how the training session went. I will begin with the sad news first, =( First of all, there was no coffee available when I arrived. It arrived only after lunch. Although it was a free event aside other best things in life, this was only a material factor I didn't enjoy at the site. Still a large portion of Canadians start their work with a zolt of caffeine in my defence. Secondly, there was a kind of assumption which expected attendee were familiar with software behavior. A handful of people were having trouble opening example file, perhaps because of their browser setting or link to preferred software by OS. Not being able to follow the tutorials as the presenter demonstrated various facets of software substantially diminished the efficacy of training session for those who could not be on the same page. These minor annoyances were the only drawbacks I experinced from the event. Here comes the happy side, =) 1. The staffs were considerate enough to provide vegetarion options for inclusive lunch as well as answering all my curious, at times orthogonal questions regarding Maplesoft company. 2. Highly respectable professionals were presenting themselves; That is, Prof. Illias Kotsireas, Dr. Erik Postma and Dr. Jürgen Gerhard. I can not appreciate enough of their contribution for the training in an eloquent and humble manners. To put it other way, leading of the presentation was well structured and planned out. In the beginning, Prof. Kotsireas presented Introduction to Maple' which included terminology and basic behaviors of Maple (i.e. commands and features) with simple examples you can quickly digest. Furthermore, Maple has internal function to interface with Latex! No more typing hours of$\$s and many frac{}{}, \delta_{} to publish. In order for me to study all this would have been two-weeks kind of commitment in which he summarized in a couple of hours time. Short-cut keys that are often used by his project was pretty interesting, which will improve work efficiency.

After a brief lunch, which was supplied more than enough for all, Dr. Erik Postma delivered a critical component of simluation. That is, Random Number Generation'. Again, he showed us some software-related tricks such as Text mode' vs. Math mode'.  The default RNG embedded in the software allows reproducible results unless we set seed and randomize further. Main part of the presentation was regarding Optimization of solution through simulation'. He iteratively improved efficiency of test model, which I will not go in depth here. However, visually and quantitatively showing the output was engaging the attendees and Maple has modularized this process (method available for all the users!!).

Finally, we got some coffee break that allowed to me to push through all the way to the end. I believe if we had some coffee earlier less attendees would have left.

The last part of the training was presented by Dr. Jürgen Gerhard. In this part, we were using various applications of Maple in solving different types of problems. We tackled combinatorics of Fibonacci sequence by formula manipulation. In this particular example he showed us how to optimize logic of a function that made a huge impact in processing time and memory usage. Followed by graph theory example, damped harmonic oscillator, 2 DOF chaotic system, optimization and lastly proof of orthocentre by coding. I will save the examples for you to enjoy in future sessions.

The way they went through examples were super easy to follow. This can only be done with profound understanding of the subject and a lot of prior effort in preparing the presentation.

I appreciate much efforts put together by whom organized this event, allocating their own precious weekend time and allowing many to gain opportunity to learn directly from the person in the house.

--- Epilogue ---

My hope for Maple usage lies in enhancing education outcome for first year students, especially in the field of Science and Economics. This is a free opportunity for economic empowerment which is uncaptured.

Engineering students are already pretty good at problem solving, and will figure things out as I witnessed my colleagues have.

However, students of natural sciences and B.A. programs tend to skimp on utilizing tools due to lack of exposure.

Furthermore, I am supporting their development of SaaS, software as service, which delivers modules like gRPC does.

Also, I hope the optimization package from prior version written by Dr. Postma will become available to public sometime.

Here's a BIG thank you to staffs once again, and forgive me for any grammatical errors from rushed writing. I tried to incorporate as much observation as possible gathered from the event.

To contact me, my email is hyonwoo.kee (at) gmail.com;

## Minimize the number of tensor components according...

by: Maple

Minimize the number of tensor components according to its symmetries
(and relabel, redefine or count the number of independent tensor components)

The nice development described below is work in collaboration with Pascal Szriftgiser from Laboratoire PhLAM, Université Lille 1, France, used in the Mapleprimes post Magnetic traps in cold-atom physics

A new keyword in Define  and Setup : minimizetensorcomponents, allows for automatically minimizing the number of tensor components taking into account the tensor symmetries. For example, if a tensor with two indices in a 4D spacetime is defined as antisymmetric using Define with this new keyword, the number of different tensor components will be exactly 6, and the elements of the diagonal are automatically set equal to 0. After setting this keyword to true with Setup , all subsequent definitions of tensors automatically minimize the number of components while using this keyword with Define  makes this minimization only happen with the tensors being defined in the call to Define .

Related to this new functionality, 4 new Library routines were added: MinimizeTensorComponents, NumberOfIndependentTensorComponents, RelabelTensorComponents and RedefineTensorComponents

Example:

 >

Define an antisymmetric tensor with two indices

 >
 (1.1)

Although the system knows that  is antisymmetric, you need to use Simplify to apply the (anti)symmetry

 >
 (1.2)

 >
 (1.3)

so by default the components of  do not automatically reflect the (anti)symmetry; likewise

 >
 (1.4)
 >
 (1.5)

and computing the array form of we do not see the elements of the diagonal equal to zero nor the lower-left triangle equal to the upper-right triangle but for a different sign:

 >
 (1.6)

On the other hand, this new functionality, here called minimizetensorcomponents, makes the symmetries of the tensor be explicitly reflected in its components.

There are three ways to use it. First, one can minimize the number of tensor components of a tensor previously defined. For example

 >
 (1.7)

After this, both (1.2) and (1.3) are automatically equal to 0 without having to use Simplify

 >
 (1.8)
 >
 (1.9)

And the output of TensorArray  in (1.6) becomes equal to (1.7).

NOTE: in addition, after using minimizetensorcomponents in the definition of a tensor, say F, all the keywords implemented for Physics tensors are available for F:

 >
 (1.10)
 >
 (1.11)
 >
 (1.12)
 >
 (1.13)

Alternatively, one can define a tensor, specifying that the symmetries should be taken into account to minimize the number of its components passing the keyword minimizetensorcomponents to Define .

Example:

Define a tensor with the symmetries of the Riemann  tensor, that is, a tensor of 4 indices that is symmetric with respect to interchanging the positions of the 1st and 2nd pair of indices and antisymmetric with respect to interchanging the position of its 1st and 2nd indices, or 3rd and 4th indices, and define it minimizing the number of tensor components

 >
 (1.14)

We now have

 >
 (1.15)
 >
 (1.16)
 • One can always retrieve the symmetry properties in the abstract notation used by the Define command using the new , its output is ordered, first the symmetric then the antisymmetric properties

 >
 (1.17)
 • After making the symmetries explicit (and also before that), it is frequently useful to know the number of independent components of a given tensor. For this purpose you can use the new

 >
 (1.18)

and besides taking into account the symmetries, in the case of the Riemann  tensor, after taking into account the first Bianchi identity this number of components is further reduced to 20.

A third way of using the new minimizetensorcomponents functionality is using Setup , so that, automatically, every subsequent definition of tensors with symmetries is performed minimizing the number of its components using the indicated symmetries

Example:

 >
 (1.19)

So from hereafter you can define tensors taking into account their symmetries explicitly and without having to include the keyword  at each definition

 >
 (1.20)

 >
 (1.21)
 • Two new related functionalities are provided via  and , the first one to have the number of tensor components directly reflected in the names of the components, the second one to redefine only one of these components
 >
 (1.22)

Suppose now we want to make one of these components equal to 1, say

 >
 (1.23)

This nice development is work in collaboration with Pascal Szriftgiser from Laboratoire PhLAM, UMR CNRS 8523, Université Lille 1, F-59655, France.

 >

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

## An example of the kinds of worksheets that i make...

by: Maple

Hello,

I study mainly subjects that fall under umbrella of number theory, but i have specified a little further in the worksheet. This is really a request for assistance, because in as much as i have met so many brilliant people online via social media etc,  I would always love to meet more, and especially ones who are more experienced in this field.

Basically i am too cheap and old to think about going to a good university, so I am trying to get free advice from the people who have probably completed doctorates in the relevant field. Got to be honest I say.

Anyway my contact email is at the top of the attached worksheet.

First thing that stood out to me about the distributions produced in this worksheet is how sparse the number of points is for N=17 relative to all the other values of N.

EXAMPLE_FOR_MAPLE3.mw

MAPLE_EXAMPLE_13.mw

## Quantum informtion

by: Maple

Dear all , I' would like to join a group to produce quantum information tools in Maple

## Procedure for computing the tensor product of...

by: Maple

I wanted to use MAPLE to preform symbolic quantum computations. The role
of quantum operators and their tensor product is very important in simplying
the understating of such new calculus at least for the beginners. For instance,
(using "o" for the tensor product and "." for the scalar product, H being the Hadamard
operator on a qubit, I the identity operator, and CNOT the 2 qubit controled not
operator)
1) generating the Bells states |Bxy> two stages of operators are needed
(CNOT) .  (H o  I)  . |x> o |y>

2) performing quantum teleportation of |psi>
(H o I o I) . (CNOT o I ) . |psi>o |B00>
followed by a measurements on the first two qubits for driving the application of
quantum gates to the third qubit.

All these tensor products of operators can be easily written in MAPLE.

Here is a first version of the ExpandQop procedure that will be usefull the purpose of
expanding correctly the tensor product of two quantum operator expressed in Dirac notation.

I hope this is usefull.

LL

 > ###################################################################### # Author: Louis Lamarche                                             #