{ "metadata": { "name": "sympy_quantum_computing" }, "nbformat": 2, "worksheets": [ { "cells": [ { "cell_type": "markdown", "source": [ "# Basic Symbolic Quantum Mechanics with [SymPy](http://sympy.org)", "", "We first load the IPython extensions that enable LaTeX-based mathematical printing ", "of SymPy objects, and then import the quantum computing libraries from SymPy." ] }, { "cell_type": "code", "collapsed": true, "input": [ "%load_ext sympyprinting" ], "language": "python", "outputs": [], "prompt_number": 1 }, { "cell_type": "code", "collapsed": true, "input": [ "from sympy import sqrt, symbols, Rational", "from sympy import expand, Eq, Symbol, simplify, exp, sin", "from sympy.physics.quantum import *", "from sympy.physics.quantum.qubit import *", "from sympy.physics.quantum.gate import *", "from sympy.physics.quantum.grover import *", "from sympy.physics.quantum.qft import QFT, IQFT, Fourier", "from sympy.physics.quantum.circuitplot import circuit_plot" ], "language": "python", "outputs": [], "prompt_number": 2 }, { "cell_type": "markdown", "source": [ "