Overview
The absolute basics for beginners
QuTIpy: the absolute basics for beginners
Welcome to the absolute beginner’s guide to QuTIpy! If you have comments or suggestions, please don’t hesitate to reach out!
Welcome to QuTIpy!
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 partial transposition, new tests are constantly discovered.
Installing QuTIpy
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 Installing QuTIpy.
If you already have Python, you can install QuTIpy with:
How to import
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.
Starting with an example code
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 :
Bra-Ket Notation
Let's jump into another common example, Driac Notation or Bra-Ket Notation as an example for our next demonstration.
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.
Last updated