Boost logo

Boost :

Subject: Re: [boost] [units] - learning to use, continued :)
From: Janek Kozicki (janek_listy_at_[hidden])
Date: 2011-11-30 11:25:29


Matthias Schabel said: (by the date of Wed, 30 Nov 2011 07:51:19 -0800)

> > first thing will be to figure out how to declare a type meter^-0.5
> > maybe my previous try that didn't work with boost 1.42 will start to work with 1.48:
> >
> > typedef derived_dimension<length_base_dimension,root<2> >::type quantum_wavefunction_1D;
>
> I tried to send a working version of your code yesterday, but the message was bounced because the attachments were too big; I will resend when I get to the office. For now, your problem here is twofold:
>
> 1) derived_dimension is a convenience typedef for integer powers; you need to use make_dimension_list<>
> 2) once you have defined the dimension, you also need to typedef a unit in the SI system corresponding to your desired length^(-1/2) dimension:
>
> typedef unit<quantum_wavefunction_1D,si::system> quantum_wavefunction_1D_unit

great! Thanks for hint and your effort to make it work. I'm not sure
yet how to use make_dimension_list<> so perhaps better if I wait for
your code, than spend time to figure it out :)

Fact that it is one-dimensional wavefunction is important. Because in 3 dimensional
space quantum wavefunction has dimension of
(length)^(1.5) == square root of volume.

The reasoning is following. Let's say that psi(r) is a wavefunction
(where 'r' are space coordinates). Then it's squared magnitude is
probability. And total probability in whole infinite space
must be 1.0 dimensionless, so:

integral abs(psi(r))^2 dr = 1.0 dimensionless

this is why quantum wavefunction depending on number of dimensions
is 1D: (length)^(-0.5) ; 2D: (length)^(-1.0) ; 3D: (length)^(-1.5)

It would be great if you added this to the directory
`physical_dimensions`. Also for 2D and 3D.

Now I am not sure about naming. I used "1D" name here. If you have
some other convention instead of "1D" already in the naming, then use
that convention.

Another thing to note: this is quantum wavefunction in spatial
representation, it's on *length*.

It's possible to have other representations as well, for example on
*momentum*. Then in 1D it would be (momentum)^0.5

http://en.wikipedia.org/wiki/Momentum_space

There are a dozen of other representations possible. They are not
very popular though.

So I don't know, maybe it would be best if you added 6 wavefunction types:
1D, 2D, 3D for length and for momentum.

I'm not sure about their naming though.

If one says 'wavefunction' it is assumed that it is in spatial coordinates.
If it's in momentum space, then it's said explicitly 'wavefunction in momentum space'

best regards

-- 
Janek Kozicki                               http://janek.kozicki.pl/  |

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk