Overview
The absolute basics for beginners
Last updated
The absolute basics for beginners
Last updated
Welcome to the absolute beginner’s guide to QuTIpy! If you have comments or suggestions, please don’t hesitate to !
QuTIpy (Quantum Theory of Information for Python; pronounced /cutiɛ paɪ/
) is an open source Python library that’s used for performing calculations with quantum states, channels and protocols. While there are many quantum information theory toolboxes that allow the user to perform basic operations such as the , new tests are constantly discovered.
To install QuTIpy, we strongly recommend using a scientific Python distribution. If you’re looking for the full instructions for installing QuTIpy on your operating system, see .
If you already have Python, you can install QuTIpy with:
To access QuTIpy and its functions import it in your Python code like this:
We suggest numpy
and cvxpy
to be imported as complimentary packages.
We can start with a Complex Conjugate Transpose as an example for our demonstration.
Let's define an arbitrary matrix. Say X
:
Now that we have our matrix X
defined, we can import the dag
function from our QuTIpy library and use it to find the complex conjugate transpose of our defined matrix.
The output will be the Complex Conjugate Transpose of the array X :
The Bra-Ket notation is a concise and convenient way to describe quantum states.
The ket
function takes the vector space as the first argument, and the ket value as the second argument.
Different states of different sizes can be generated based on the arguments.
Let's jump into another common example, Driac Notation or as an example for our next demonstration.
A Ket is of the form . Mathematically it denotes a , , in an complex , and physically it represents a state of some quantum system. An example of a Ket can be can represent a vector .
A bra is of the form . Mathematically it denotes a , i.e. a that maps each vector in to a number in the complex plane . Letting the linear functional act on a vector is written as .
Lets define a ket v for,
To define using numpy, one need to define the vector space as matrices .
But one can directly define with QuTIpy.
Example: ket( 2, 0 )=
and ket( 2, 1 )=
ket( 2, 1 )=
=
ket( 3, 1 )=
=