1.4 KiB
1.4 KiB
Learning Qiskit
Sample Code & Getting Started
Step 1: Open up terminal and check for python 3.7+ or install python by following instructions.
#check which version of python you have
python -V
Step 2: Then install anaconda
brew cask install anaconda
(you can check if it has finished installing by running "jupyter notebook" in the terminal)
Visit here(MacOS) or here(Linux & Windows) if you are running into any issues.
Step 3:
Topics:
Visualization:
All visualizations found here
%matplotlib inline
import matplotlib,pyplot as plt
import numpy as np
from qutip import *
//Hinton
rho = rand_dm(5)
hinto(rho);
//Sphereplot
theta = np.linspace(0, np.pi, 90)
phi = np.linspace(0, 2 * np.pi, 60)
sphereplot(theta, phi, orbital(theta, phi, basis(3, 0)));
//Matrix_histogram
matrix_histogram(rho.full().real);
matrix_histogram_complex(rho.full());
b = Bloch()
b.add_vectors(expect(H.unit(), e_ops))
b.add_points(result.expect, meth='1')
b.make_sphere()
Here's a list of all languages that are available for quantum programming: