{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "e7315a5c-fe9d-49aa-81d8-9b9a6e7446d4", "metadata": {}, "outputs": [], "source": [ "import discretisedfield as df\n", "import numpy as np" ] }, { "cell_type": "code", "execution_count": 7, "id": "443ede93-1fb9-4f0d-b2cc-a796c2a2d50a", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "array([[1.+0.j, 0.+0.j],\n", " [0.+0.j, 0.+0.j]])" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "p = [1, 1, 0, 0]\n", "\n", "mu = 0.5 * np.array([[p[0] + p[1], p[2] - 1j * p[3]], [p[2] + 1j * p[3], p[0] - p[1]]])\n", "mu" ] }, { "cell_type": "code", "execution_count": 8, "id": "e3ab22cb-f422-428a-9904-8dbf8b646bfb", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "array([[1.+0.j, 0.+0.j],\n", " [0.+0.j, 0.+0.j]])" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "np.dot(mu, mu)" ] }, { "cell_type": "code", "execution_count": null, "id": "b39b3352-aa2d-4a83-9cc1-c88f099555fb", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.13" } }, "nbformat": 4, "nbformat_minor": 5 }