Search

Mathematical Introduction: Vectors

Quantum Computing Basic Concepts cover image

Overview

Secondary School

Mathematics

Quantum Computing

English

Overview

Keywords: vector, linear combination, dot product
Age group: 14-16 years
Required knowledge/skills: algebraic operations
Time frame: 30 minutes

This section is part of Basic Concepts of Quantum Computing – Mathematical Basics written by Natalija Budinski (RS).

Content

What is a vector?
Calculating with vectors – examples
Vectors in quantum computing
Task for students: Quiz

Summary

In this lesson, we summarise basic notions about vectors.

quantencomputingt_teaser_ilustrationen_v01_basic_concepts_skaliert

After this lesson students will

  • understand that vectors are mathematical objects with magnitude and direction;
  • be able to perform vector operations such as addition, scalar multiplication, and dot product;
  • discover how qubits can be represented as vectors in a 2D complex space.

Required materials

  • paper and pencil

What is a vector?


Properties

  • A vector has both a magnitude and a direction.
  • The zero vector has no direction and its magnitude is 0.
  • Equal vectors have the same magnitude and direction.
  • A vector is usually denoted by a letter with an arrow on top like so: v . Other notations are commonly used too, such as v, v, .

Geometrical representation of a vector

Adding two vectors geometrically is done by placing the tail of the second vector at the head of the first vector. The resulting vector starts from the tail of the first vector and ends at the head of the second vector. This method can be applied to any number of vectors.

 

Coordinate representations of a vector

A vector can also be represented in a standard coordinate system. In two dimensions, a vector v can be written as a row vector, v = ( x , y ) , or as a column vector, v = [ x y ] .
In both cases, x and y can be real or complex numbers.

A row vector is just the sideways version of a column vector. To switch between a row vector and a column vector, one uses the so-called transposition operation, denoted by T:
( x , y ) T = [ x y ]

Basic vector operations

Addition

For two vectors u = ( x 1 , y 1 ) and  v = ( x 2 , y 2 )

u + v = ( x 1 , y 1 ) + ( x 2 , y 2 ) = ( x 1 + x 2 , y 1 + y 2 )

Subtraction

For two vectors u = ( x 1 , y 1 ) and  v = ( x 2 , y 2 )

u v = ( x 1 , y 1 ) ( x 2 , y 2 ) = ( x 1 x 2 , y 1 y 2 )

Scalar multiplication

Multiplying a vector by a number (scalar) scales its magnitude without changing its direction (unless the scalar is negative, which also reverses its direction).

For a vector u = ( x 1 , x 2 ) and a scalar k , scalar multiplication yields:

k u = k ( x 1 , x 2 ) = ( k x 1 , k x 2 )

Dot product (also called scalar product)

A way to multiply two vectors to produce a scalar is called dot (or scalar) product. For two vectors u = ( x 1 , y 1 ) and v = ( x 2 , y 2 ) , their dot product is

u v = ( x 1 , y 1 ) ( x 2 , y 2 ) = x 1 x 2 + y 1 y 2

If the dot product of two vectors is zero, u v = 0 , the two vectors are perpendicular.

Magnitude (or norm) of a vector

The magnitude of a vector  u = ( x 1 , y 1 )

u = x 1 2 + y 1 2

The angle θ between the two vectors can be determined as follows:

u v = u v cos θ , thus:

θ = arccos ( u v )

Calculating with vectors – examples

Let u = ( 4 , 3 ) and v = ( 3 , 2 ) .

Calculate u + v 3 u and u .

Solution

u + v = ( 4 , 3 ) + ( 3 , 2 ) = ( 4 3 , 3 + 2 ) = ( 1 , 5 )

3 u = 3 ( 4 , 3 ) = ( 3 4 , 3 3 ) = ( 12 , 9 )

u = 4 2 + 3 2 = 16 + 9 = 25 = 5

Let u = ( 1 , 0 ) and v = ( 2 2 , 2 2 ) .

Calculate u v and the angle θ between the vectors u and v .

Solution

u v = ( 1 , 0 ) ( 2 2 , 2 2 ) = 1 2 2 + 0 2 2 = 2 2

θ = arccos [ ( 1 , 0 ) ( 2 2 , 2 2 ) ] = arccos ( 2 2 ) = arccos ( 0 , 707 ) = 45

Vectors in quantum computing


Formally, the state of a qubit is a unit vector in C 2 , the two-dimensional complex vector space.

A single qubit can be represented by a 2-dimensional complex vector | ψ = α | 0 + β | 1 , where α and β are complex numbers satisfying | α | 2 + | β | 2 = 1 , and | 0 = [ 1 0 ] and | 1 = [ 0 1 ] .

For example, the state  | ψ = 1 2 | 0 + 1 2 | 1 can be represented by the vector  1 2 [ 1 1 ]

or the state  | ψ = 1 2 | 0 + 1 2 i | can be represented by the vector 1 2 [ 1 i ] .

Task for students: Quiz

You can download the quiz for students here:

Below you find the same questions in an interactive format.
Use this link to send the interactive H5P task to your students.

  1. B
  2. B
  3. B
  4. A
Close search