Re: Clifford Algebra (Physics, Geometry, Algebra)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Clifford Algebra (Physics, Geometry, Algebra)

Tim Daly
I've given no thought to unifying these three areas or
layering them in any obvious way. I'd be interested in any
thoughts you have on the subject.

For quantum physics I'm working my way through
Nielsen "Quantum Computation and Quantum Information" and
Mermin "Quantum Computer Science"
I want to be able to use the bra-ket notation. The underlying
unitary matrix computations don't seem all that intimidating.
I think this could be a separate package with operators
like a Hadamard gate, etc. I've written a couple programs for
IBM's online quantum computer so I think I understand some
of the issues. I'm looking at quantum simulator code on github
with the thought that the simulator could be embedded in the
underlying lisp so quantum programs could be "run" in Axiom.

I've looked at Kaku's book on Quantum Field Theory but
I'm afraid that relativistic physics is a much longer climb.
Renormalization leaves me with an uncomfortable feeling
and I don't understand a lot of it.

For classical physics I think a reasonable approach might be
the "cookbook" files introduced this summer. The idea is to
create "application notes" (cookbooks) that focus on working
out a particular example, ala "worked out homework problems
using Axiom". The cookbooks are literate programs constructed
at build time.

For Clifford Algebra I'm working my way through 2 books,
Dorst "Geometric Algebra for Computer Science"
Sommer "Geometric Computing with Clifford Algebras"
I have worked in both computer vision and robotics so the
chapters on vision and kinematics are things I'd like to
implement. The scalar/vector/bivector/trivector representation
seems to fit naturally into a record. The calculations amount to
a lot of book-keeping which Axiom could easily automate. I'd
also like to be able to implement the higher tensor products.

I do plan to look at what you've already implemented but first
I want to understand the area enough to be able to implement
the code (see previous emails). Once I think I understand
I'll see what you've already done.

For geometry it falls under "Geometric Algebra". Sommer
Chapter 4 is on "A Universal Model for Conformal Geometries of
Euclidean, Spherical, and Double-Hyperbolic Spaces". I don't think
geometry is a separate subject in this formulation.

So the real question might be "Can I formulate my physics in
matrix and tensors and shift between them". Which leads to the
question "Can I easily convert between matrices and tensors?"
From what I've seen so far this should be possible, provided it is
implemented properly. The CA wedge product is just the basis
vectors times the determinant so you might have to specify the
map between the matrix basis and the tensor basis.

All of which implies I understand (and can implement) the extended tensor algebra. For that I'm working my way through the course:
https://www.youtube.com/watch?v=_pKxbNyjNe8&list=PLRlVmXqzHjUQARA37r4Qw3SHPqVXgqO6c

Tim


_______________________________________________
Axiom-developer mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/axiom-developer
Reply | Threaded
Open this post in threaded view
|

Re: Clifford Algebra (Physics, Geometry, Algebra)

Martin Baker-3
On 08/12/16 18:03, Tim Daly wrote:
> So the real question might be "Can I formulate my physics in
> matrix and tensors and shift between them". Which leads to the
> question "Can I easily convert between matrices and tensors?"
> From what I've seen so far this should be possible, provided it is
> implemented properly. The CA wedge product is just the basis
> vectors times the determinant so you might have to specify the
> map between the matrix basis and the tensor basis.

Although matrix and Clifford algebras are apples and oranges I think
that, in the context of a given geometry and physics it may be
theoretically possible to have an equivalence between them but in
practice I suspect this may be too messy?

As an example lets look at 3D rotations as either 3x3 Matrix or
quaternions (taken to be Clifford algebra with 3D bivector + scalar) in
the context of Euclidean space and classical physics (rotation by 360
degrees taken to be identity).

I think the matrix to Clifford conversion would be something like this
untested code:

matrix2Quat(m:SquareMatrix(3,DoubleFloat)) == Quaternion(DoubleFloat)
   tr:DoubleFloat = elt(m,0,0) + elt(m,1,1) + elt(m,2,2)
   if (tr > 0) then
     S:DoubleFloat = sqrt(tr+1.0) * 2
     qw = 0.25 * S
     qx = (elt(m,2,1) - elt(m,1,2)) / S
     qy = (elt(m,0,2) - elt(m,2,0)) / S
     qz = (elt(m,1,0) - elt(m,0,1)) / S
   else if ((elt(m,0,0) > elt(m,1,1)) and (elt(m,0,0) > elt(m,2,2))) then
     S:DoubleFloat = sqrt(1.0 + elt(m,0,0) - elt(m,1,1) - elt(m,2,2)) * 2
     qw = (elt(m,2,1) - elt(m,1,2)) / S
     qx = 0.25 * S;
     qy = (elt(m,0,1) + elt(m,1,0)) / S
     qz = (elt(m,0,2) + elt(m,2,0)) / S
   else if (elt(m,1,1) > elt(m,2,2)) then
     S:DoubleFloat = sqrt(1.0 + elt(m,1,1) - elt(m,0,0) - elt(m,2,2)) * 2
     qw = (elt(m,0,2) - elt(m,2,0)) / S
     qx = (elt(m,0,1) + elt(m,1,0)) / S
     qy = 0.25 * S
     qz = (elt(m,1,2) + elt(m,2,1)) / S
   else
     S:DoubleFloat = sqrt(1.0 + elt(m,2,2) - elt(m,0,0) - elt(m,1,1)) * 2
     qw = (elt(m,1,0) - elt(m,0,1)) / S
     qx = (elt(m,0,2) + elt(m,2,0)) / S
     qy = (elt(m,1,2) + elt(m,2,1)) / S
     qz = 0.25 * S
   quatern(qx,qy,qz,qw)

The 'if' statements are required to do the translation in a part of the
geometry away from singularities and to avoid root of negative numbers.

This seems quite complicated to me and I suspect (but I don't know) that
any attempt to generalise it may make it more complicated?

Therefore I was thinking more of being able to plug in either matrix or
Clifford but not both.

So I have a physics problem that needs to work with 3D rotations, I
could either plug in the matrix code to do the problem or the Clifford
code. They should give the same answer but the will differ in rounding
errors, ability to scale etc.

Martin

_______________________________________________
Axiom-developer mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/axiom-developer