Square Matrix to Column Vector Multiplication

18 Dec 2013

Maths, Quantum Computing


In quantum computing, gate type operations are performed via matrix multiplication. A basis state, which is a column vector (2 x 1 matrix) is applied to a gate, which is normally a square matrix with a size of 2 x 2.

Performing these calculations might seem a little confusing at first if you're not familiar with matrix multiplication, however there is a way you can break the operation into other operations to make it simpler to deal with.

Let A = a 2 x 2 matrix, and B = a 2 x 1 (column vector) matrix. Remember that rows are always notated before columns.

We can rewrite A as:

{{ a, b }, { c, d }}

And we can rewrite B as:

{{ e }, { f }}

Now we can write AB as:

{{ a, b }, { c, d }} * {{ e }, { f }} = {{ g }, { h }}

The method for calculating g and f is:

g = (a * e) + (b * f)
h = (c * e) + (d * f)

The method can be applied in four steps. Note the pattern of each step.

Step 1

{{ a, b }, { c, d }} * {{ e }, { f }}

Step 2

{{ a, b }, { c, d }} * {{ e }, { f }}

Step 3

{{ a, b }, { c, d }} * {{ e }, { f }}

Step 4

{{ a, b }, { c, d }} * {{ e }, { f }}

The final result AB itself is a column vector which we can write as:

{{ g, h }}

Or:

{ g, h }T

 

Copyright © 2024 carlbelle.com