Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

. #1

Closed
wants to merge 1 commit into from
Closed

. #1

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 124 additions & 0 deletions test_layer.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Test of generating alternating single qubit and two qubit layers"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"import qiskit\n",
"from qiskit import QuantumCircuit\n",
"import numpy as np\n",
"from utils.layers import alternating_sq_2q_layers"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"c:\\Users\\c5517\\python\\lib\\site-packages\\qiskit\\visualization\\circuit\\matplotlib.py:266: FutureWarning: The default matplotlib drawer scheme will be changed to \"iqp\" in a following release. To silence this warning, specify the current default explicitly as style=\"clifford\", or the new default as style=\"iqp\".\n",
" self._style, def_font_ratio = load_style(self._style)\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAkMAAACoCAYAAADjJerzAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/OQEPoAAAACXBIWXMAAAsTAAALEwEAmpwYAAAr2klEQVR4nO3df1yNd/8H8Fedfqcf1MzU/EiyO8rIj/ysttwRZrbFFFsYLXTPhCF2b3OLpdyx0TIz94by43aPWdz3UBnJMLIwLWqJYpaoVNTp+0dfZ47qdE6dznVdndfz8ejx0Oe6Otera5/rvXfXuc51GdTU1NSAiIiISE8ZCh2Ai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du5sP8m5daul4DdIkNwDU1NQgM+cY3JyGt3AyoqZjM9RMcrkc2w4tx+QRf8eOI6uUlhUW5eCLpMWI2vEmzl45gtSMnQKlrEtV7rL/f6ZMtbwaWddO4em2XQRISKQeVXO5PmKY35pmdu0yGDkF5wEAV26cQ4d2XVs6Yr00zQ0Al6+dQnfHvpAZylo4HVHTsRlqpm+Or8OQXuMR4BWOnMKfUfGwTLHsvUlfYeWMg1g48V/o0+0FePWeIGBSZapyp2bsxJx1AzB3/RAM6jkO9jYdBUxKpJqquXyr+BoWxvsitzATC+N9UViUK4r5rWlmz7+MwW83L2JenBdqauTo2WWwzjM3JTcAHM/8D4b2ekWQvETqEuWzycRE02f0xH87H5fy0rFi2nd1nuQL1H60fsO+uZjgtQDez09U+Vq6fB5SY7mv387GqoTJGO4egACv8AZfp7U/VwgQ9rlNqjTluUJioO1nkzU2l+vT2Pxu6WOxKZnVqSUt/Wwyse1rKZDqsSjW3NqaL2yGGnH5CFByS5htW7UHerzQtJ8VKndzMkuFkHNCFVX7XqyZAc3mjBTntRRriBQzS4VUj0Wx5tbWfGEzRERERHqN1wwRERGRXmMzRERERHqNzRARERHpNTZDREREpNfYDBEREZFeYzNEREREeo3NEBEREek1NkNERESk19gMERERkV5jM0RERER6jc0QERER6TU2Q0RERKTX2AwRERGRXmMzRERERHqNzRARERHpNTZDREREpNfYDBEREZFeYzNEREREeu3/ANDoHa95uw5SAAAAAElFTkSuQmCC",
"text/plain": [
"<Figure size 748.797x204.68 with 1 Axes>"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"connectivity = [[0,1], [1,2], [2,0]]\n",
"circ = alternating_sq_2q_layers(3,2,'RXX', connectivity)\n",
"circ.draw('mpl')"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"OPENQASM 2.0;\n",
"include \"qelib1.inc\";\n",
"qreg q[3];\n",
"rx(1.0) q[0];\n",
"rz(1.0) q[0];\n",
"rx(1.0) q[1];\n",
"rz(1.0) q[1];\n",
"rx(1.0) q[2];\n",
"rz(1.0) q[2];\n",
"rxx(1.0) q[0],q[1];\n",
"rxx(1.0) q[1],q[2];\n",
"rxx(1.0) q[2],q[0];\n",
"rz(1.0) q[0];\n",
"rx(1.0) q[0];\n",
"rz(1.0) q[0];\n",
"rz(1.0) q[1];\n",
"rx(1.0) q[1];\n",
"rz(1.0) q[1];\n",
"rz(1.0) q[2];\n",
"rx(1.0) q[2];\n",
"rz(1.0) q[2];\n",
"rxx(1.0) q[0],q[1];\n",
"rxx(1.0) q[1],q[2];\n",
"rxx(1.0) q[2],q[0];\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"C:\\Users\\c5517\\AppData\\Local\\Temp\\ipykernel_66640\\2418064179.py:2: DeprecationWarning: The method ``qiskit.circuit.quantumcircuit.QuantumCircuit.bind_parameters()`` is deprecated as of qiskit 0.45.0. It will be removed no earlier than 3 months after the release date. Use assign_parameters() instead\n",
" print(qiskit.qasm2.dumps(circ.bind_parameters(np.ones(21))))\n"
]
}
],
"source": [
"# qasm convert\n",
"print(qiskit.qasm2.dumps(circ.bind_parameters(np.ones(21))))"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.0"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Binary file added utils/__pycache__/layers.cpython-38.pyc
Binary file not shown.
Loading