Section 1
Working with Python in Colab Open your Google Account here https://colab.research.google.com
(Refer the video for additional functionalities of Colab https://www.youtube.com/watch?v=rNgswRZ2C1Y) Students can refer to https://www.pythonpool.com/python-vector/ or any other website to learn how to use vectors in Python. β’ Import NumPy and math package.
β β
β’ Create variables by considering a = 1/ 2 and b = 1/ 2
β’ Create a vector or One-dimensional array using variables a and b.
β’ Check whether the vector is normalized or not. Vector is normalized if a2 + b2 = 1 in this particular case.
β’ Find the length of a vector.
Section 2
Vector in Python Create a new notebook and add the following functionalities in the Colab notebook:
β’ Create a vector and read the elements of the vector from the keyboard.
β’ Write a function that will check whether the function is normalized or not.
β’ Write a function to find the dot and cross product of two vectors (A and B) using NumPy.
β’ Write a function to find a unit vector corresponding to vector A.
Section 3
Matrices in Python Create a new notebook and add the following functionalities in the Colab notebook using NumPy:
β’ Read a matrix from the Keyboard.
β’ Find the transpose of a matrix.
β’ Find the Determinant of a matrix ( Using linalg.det in NumPy).
β’ Find Rank of a matrix ( Using linalg.matrixrank in numpy).
β’ Find Trace of the matrix
β’ Find Eigenvalue and Eigenvectors of a square matrix (Use linalg.eig).
β’ Find the Inverse of a matrix.
1
Section 4
Complex Number in Python Refer to https://realpython.com/python-complex-numbers/using-pythoncomplex-numbers-as-2d-vectors or any other site to read how to use complex numbers in python. for Create a new notebook and add the following functionalities in the Colab notebook:
β’ Read a complex number from the keyboard.
β’ Find the complex conjugate of the complex number.
β’ Addition, subtraction, multiplication, and divisions of complex numbers.
β’ understands the concept of a complex number as a 2D vector.
β’ Find the length or magnitude of a complex number.
Section 5
Account Creation on IBM Q Experience Create your login id https://quantum-computing.ibm.com/
β’ After Login, go through the interface with the following two options:
β Launch Composer: working with IBM composer (Drag and drop Options).
β Working with IBM Qiskit (refer to https://qiskit.org/textbook/content/ch-ex/)
2
[SOLVED] Quantum-Computing Lab 1
29.99 $
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
Securely Powered by:
- Lab1-a3uamw.zip




