Skip to content
Open
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
26 changes: 12 additions & 14 deletions qbraid.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -70,23 +70,21 @@
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" |---|\n",
"q0---| h |-----■---\n",
" |---| |\n",
" |----|\n",
"q1----------| cx |-\n",
" |----|\n"
]
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAANMAAACeCAYAAACowT9rAAAAOnRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjEwLjYsIGh0dHBzOi8vbWF0cGxvdGxpYi5vcmcvq6yFwwAAAAlwSFlzAAAPYQAAD2EBqD+naQAADGZJREFUeJzt3X9s03Uex/HXt93GZr9lP4DRTWBzE6dOcEgCIXfKcniQwMZQWMSZW6rjRy4oIeCYGYg4PE6YEPBUDAHOWQaHuUvGBBJRJwtyHHdhN2GYwAUPjPuBeu022q1bXXt/KD13G2zd3u23XV+PhCif8m3fS3mu3+93/RbF4/F4QETDptN6AKKRgjERCWFMREIYE5EQxkQkhDERCWFMREIYE5EQxkQkhDERCWFMREIYE5EQxkQkJELrAbTicbuBnh6tx7gzRYESEbZPUcgJu2eqx2pFZ309er79FgiBq08UgwFRaWkYlZkJRVG0HofuIKxicnd1wV5TA7hcWo8yaB6HA10XL0LR6TDqwQe1HofuIKyOmX5obAypkH6u+9o1rUegAYRVTO6ODq1HGLJQnj1chFVMIS0Eju/CHWMiEsKYiIQwJiIhjIlICGMiEsKYiIQwJiIhjIlICGMiEsKYiIQwpmGorK1FXEEB/vnVV/3evmDLFsxavz7AU5FWxGNKTU2FoihQFAWtra2D3m7z5s3e7Xbt2iU9FglxOp2wWCxYvHgxsrOzsXjxYlgsFjidTq1H05xfXpnKysrQ3NyM2NhY79qFCxfw6KOPIjo6GhMnTsT27dt7bfPiiy+i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/fjDNqPROOjtFi5c6D3lHhcXJz0Wkd/xg/tHqM52F746Y9V6jCFLnREPw5gRfDaPiG6PMREJYUxEQhgTkRDGRCSEMREJYUxEQhgTkRDGRCSEMREJYUwjlE6vaD3CsITi/IxphIq6S4/I6NB8evWRCqJHh9Yl6wBjGrEURUHyQ6Oh6Af+s8FEUfDj3LrQe2Xiu8ZHuB6XG/bvu+Fy9gDB/EwrQMQoHdSxoxARFZrf4xkTkZDQ/BZAFIQYE5EQxkQkhDERCWFMREIYE5EQxkQkhDERCWFMREIYE5EQxkQkhDERCWFMREIYE5GQ/wLdsGgFi1ZXLwAAAABJRU5ErkJggg==",
"text/plain": [
"<Figure size 220x180 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Before submitting the job, we can visualize the circuit using qasm3_drawer().\n",
"from qbraid.visualization import qasm3_drawer\n",
"# Before submitting the job, we can visualize the circuit using pyqasm.draw().\n",
"from pyqasm import draw\n",
"\n",
"qasm3_drawer(program)"
"draw(program)"
]
},
{
Expand All @@ -107,7 +105,7 @@
"job = device.run(program, name=\"qBraid example\", shots=100)\n",
"results = job.result()\n",
"\n",
"counts = results.measurement_counts()\n",
"counts = results.data.get_counts()\n",
"\n",
"print(counts)"
]
Expand Down