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

QSwitch driver with monitor support #266

Merged
merged 7 commits into from
Nov 20, 2023
Merged
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
4 changes: 2 additions & 2 deletions docs/examples/QDevil/QDAC2/Chaining.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "qcodespip311",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -332,7 +332,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.0 | packaged by conda-forge | (main, Jan 16 2023, 14:12:30) [MSC v.1916 64 bit (AMD64)]"
"version": "3.10.12"
},
"nbsphinx": {
"execute": "never"
Expand Down
160 changes: 160 additions & 0 deletions docs/examples/QDevil/QSwitch/Debugging.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "c08d6367",
"metadata": {},
"source": [
"# QSwitch debugging\n"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "85f2a1e0",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Connected to: Quantum Machines QSwitch (serial:5, firmware:0.160) in 0.11s\n"
]
}
],
"source": [
"import pprint\n",
"pp = pprint.PrettyPrinter()\n",
"from qcodes_contrib_drivers.drivers.QDevil import QSwitch\n",
"qswitch_addr = '192.168.8.18'\n",
"qswitch = QSwitch.QSwitch('switch', visalib='@py', address=f'TCPIP::{qswitch_addr}::5025::SOCKET')"
]
},
{
"cell_type": "markdown",
"id": "5c6c00b2",
"metadata": {},
"source": [
" You can record the underlying SCPI commands that are sent to the QSwitch:"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "d0c7fc28",
"metadata": {},
"outputs": [],
"source": [
"qswitch.start_recording_scpi()"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "64f0cbe6",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'0,\"No error\"'"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"qswitch.reset()\n",
"qswitch.arrange(\n",
" breakouts={'DMM': 5, 'VNA': 7},\n",
" lines={'plunger': 23, 'sensor': 5})\n",
"qswitch.connect('sensor')\n",
"qswitch.breakout('sensor', 'DMM')\n",
"qswitch.errors()"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "0d8a7693",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"['*rst', 'stat?', 'clos (@5!9)', 'open (@5!0)', 'clos (@5!5)', 'all?']\n"
]
}
],
"source": [
"pp.pprint(qswitch.get_recorded_scpi_commands())"
]
},
{
"cell_type": "markdown",
"id": "4a00d73e-88e0-439c-9b80-15aaffaf2064",
"metadata": {},
"source": [
"If you are connecting via USB, then you need `pyserial` installed."
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "37ac76f2",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"('ASRL/dev/ttyS0::INSTR', 'ASRL/dev/ttyACM0::INSTR')"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import pyvisa\n",
"rm = pyvisa.ResourceManager('@py')\n",
"rm.list_resources()"
]
},
{
"cell_type": "markdown",
"id": "d6bdb22e",
"metadata": {},
"source": [
"See https://github.com/QDevil/qdac2-tools for more debugging tools."
]
}
],
"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.10.12"
},
"nbsphinx": {
"execute": "never"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading