Fine!  I believe the Hadamard transform is used in quantum computing
simulation. In my brief attempt at QC,  I see the Hadamard Gate involves
(1% %:2) * 1 1,: 1 _1  (!)

But just before we wave bye-bye,  here's a sort of unification of
where I/we've got to,  at least as far as the transform matrices
are concerned.

I think a Kronecker product is best left as defined;  let's modify its
inputs instead if normalisation is required.

Both normalisation and ordering may be tackled with a single adverb.

So, now,

uHM =: (,~ cH)       NB. unnormalised, Miller ordering
uHW =: (,  cH)       NB. unnormalised, Wiki ordering
nHM =: 1 & (,~ cH)   NB.   normalised, Miller ordering
nHW =: 1 & (,  cH)   NB.   normalised, Wiki ordering

cH =: 1 : 0
0 (u cH) y
:
norm  =. 2 ^ - -: x
ones  =. ,: norm * 1 _1
comma =. u
n     =. y
h     =. ones comma~ | ones
n2    =. 1
while. n > n2 =. +: n2 do.
   h =. (h kp |ones) comma (=i. n2) kp ones
end.
)

   (nHM; uHW) 4  NB. applying two of these 4
+-------------------------------------+----------+
|0.707107 _0.707107        0         0|1  1  1  1|
|       0         0 0.707107 _0.707107|1  1 _1 _1|
|     0.5       0.5     _0.5      _0.5|1 _1  0  0|
|     0.5       0.5      0.5       0.5|0  0  1 _1|
+-------------------------------------+----------+

Enough!?

Mike





On 09/01/2018 02:06, Raul Miller wrote:
Actually, I was thinking of moving on to other wavelets, Like,
forinstance, the Hadamard transform, whose normalized matrix was

Kp=: (%%:2) * ,/@:(,./"3)@:(*/)
H1=: 1 1,:1 _1
Hm=: H1&Kp@]^:[&(,.%:2)

That said, I still haven't figured out a use for these things...

Thanks,



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to