Skip to content

Commit

Permalink
moving files
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhaoTianPu committed May 6, 2024
1 parent 544912c commit 6dcc024
Show file tree
Hide file tree
Showing 4 changed files with 195 additions and 1 deletion.
Binary file added debug/1500JJ1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
186 changes: 186 additions & 0 deletions debug/1500JJ_Tracking_line.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# `1500JJ`"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
"import scqubits as scq\n",
"\n",
"fluxonium = scq.Fluxonium(\n",
" EJ = 6.846,\n",
" EC = 0.953,\n",
" EL = 0.066,\n",
" flux = 0.5,\n",
" cutoff = 110,\n",
" truncated_dim = 20,\n",
" id_str = \"Fluxonium\"\n",
")\n",
"\n",
"resonator = scq.Oscillator(\n",
" E_osc = 3.6,\n",
" l_osc = 1.0,\n",
" truncated_dim = 4,\n",
" id_str = \"Resonator\"\n",
")\n",
"\n",
"hilbertspace = scq.HilbertSpace([fluxonium, resonator])\n",
"\n",
"hilbertspace.add_interaction(\n",
" g = 2,\n",
" op1 = resonator.creation_operator,\n",
" op2 = fluxonium.n_operator,\n",
" add_hc = True,\n",
")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Provide experimental data and launch `qfit`"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"Open the app using `Fit(<HilbertSpace>, <data file path>)`. An app (the graphical user interface, GUI) will pop up and we'll guide you through the GUI in the next few subsections. You may treat the following sections as a documentation and refer to it if necessary. Also you may click on the ? buttons for help."
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
"filepath =\"C:/Users/shele/Scqubit_qfit/Chain_mode_fitting/1500JJ/1500JJ1.jpg\" "
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"RuntimeWarning: invalid value encountered in divide\n",
" C:\\Users\\shele\\anaconda3\\envs\\scqubitfit\\lib\\site-packages\\qfit\\models\\measurement_data.py: 752RuntimeWarning: invalid value encountered in cast\n",
" C:\\Users\\shele\\anaconda3\\envs\\scqubitfit\\lib\\site-packages\\qfit\\models\\measurement_data.py: 743WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).\n",
"WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).\n",
"WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).\n",
"RuntimeError: Failed to disconnect (None) from signal \"editingFinished()\".\n",
" C:\\Users\\shele\\anaconda3\\envs\\scqubitfit\\lib\\site-packages\\qfit\\views\\calibration_view.py: 396Warning: [scqubits] Some quantum system parameters have been changed and generated spectrum data could be outdated, potentially leading to incorrect results. Spectral data can be refreshed via <HilbertSpace>.generate_lookup() or <ParameterSweep>.run()\n",
" C:\\Users\\shele\\anaconda3\\envs\\scqubitfit\\lib\\site-packages\\scqubits\\utils\\misc.py: 174Warning: [scqubits] Some quantum system parameters have been changed and generated spectrum data could be outdated, potentially leading to incorrect results. Spectral data can be refreshed via <HilbertSpace>.generate_lookup() or <ParameterSweep>.run()\n",
" C:\\Users\\shele\\anaconda3\\envs\\scqubitfit\\lib\\site-packages\\scqubits\\utils\\misc.py: 174Warning: [scqubits] Some quantum system parameters have been changed and generated spectrum data could be outdated, potentially leading to incorrect results. Spectral data can be refreshed via <HilbertSpace>.generate_lookup() or <ParameterSweep>.run()\n",
" C:\\Users\\shele\\anaconda3\\envs\\scqubitfit\\lib\\site-packages\\scqubits\\utils\\misc.py: 174Warning: [scqubits] Some quantum system parameters have been changed and generated spectrum data could be outdated, potentially leading to incorrect results. Spectral data can be refreshed via <HilbertSpace>.generate_lookup() or <ParameterSweep>.run()\n",
" C:\\Users\\shele\\anaconda3\\envs\\scqubitfit\\lib\\site-packages\\scqubits\\utils\\misc.py: 174Warning: [scqubits] Some quantum system parameters have been changed and generated spectrum data could be outdated, potentially leading to incorrect results. Spectral data can be refreshed via <HilbertSpace>.generate_lookup() or <ParameterSweep>.run()\n",
" C:\\Users\\shele\\anaconda3\\envs\\scqubitfit\\lib\\site-packages\\scqubits\\utils\\misc.py: 174Warning: [scqubits] Some quantum system parameters have been changed and generated spectrum data could be outdated, potentially leading to incorrect results. Spectral data can be refreshed via <HilbertSpace>.generate_lookup() or <ParameterSweep>.run()\n",
" C:\\Users\\shele\\anaconda3\\envs\\scqubitfit\\lib\\site-packages\\scqubits\\utils\\misc.py: 174Warning: [scqubits] Some quantum system parameters have been changed and generated spectrum data could be outdated, potentially leading to incorrect results. Spectral data can be refreshed via <HilbertSpace>.generate_lookup() or <ParameterSweep>.run()\n",
" C:\\Users\\shele\\anaconda3\\envs\\scqubitfit\\lib\\site-packages\\scqubits\\utils\\misc.py: 174Warning: [scqubits] Some quantum system parameters have been changed and generated spectrum data could be outdated, potentially leading to incorrect results. Spectral data can be refreshed via <HilbertSpace>.generate_lookup() or <ParameterSweep>.run()\n",
" C:\\Users\\shele\\anaconda3\\envs\\scqubitfit\\lib\\site-packages\\scqubits\\utils\\misc.py: 174Warning: [scqubits] Some quantum system parameters have been changed and generated spectrum data could be outdated, potentially leading to incorrect results. Spectral data can be refreshed via <HilbertSpace>.generate_lookup() or <ParameterSweep>.run()\n",
" C:\\Users\\shele\\anaconda3\\envs\\scqubitfit\\lib\\site-packages\\scqubits\\utils\\misc.py: 174Warning: [scqubits] Some quantum system parameters have been changed and generated spectrum data could be outdated, potentially leading to incorrect results. Spectral data can be refreshed via <HilbertSpace>.generate_lookup() or <ParameterSweep>.run()\n",
" C:\\Users\\shele\\anaconda3\\envs\\scqubitfit\\lib\\site-packages\\scqubits\\utils\\misc.py: 174Warning: [scqubits] Some quantum system parameters have been changed and generated spectrum data could be outdated, potentially leading to incorrect results. Spectral data can be refreshed via <HilbertSpace>.generate_lookup() or <ParameterSweep>.run()\n",
" C:\\Users\\shele\\anaconda3\\envs\\scqubitfit\\lib\\site-packages\\scqubits\\utils\\misc.py: 174Warning: [scqubits] Some quantum system parameters have been changed and generated spectrum data could be outdated, potentially leading to incorrect results. Spectral data can be refreshed via <HilbertSpace>.generate_lookup() or <ParameterSweep>.run()\n",
" C:\\Users\\shele\\anaconda3\\envs\\scqubitfit\\lib\\site-packages\\scqubits\\utils\\misc.py: 174"
]
}
],
"source": [
"from qfit import Fit\n",
"fit = Fit(hilbertspace, filepath)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"You can also open a new window to load the previous session."
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Key PrefitParamModel not found in registry. Skipping. We apologize that it's usually due to the version mismatch. Please contact the developer for retrieving the data.\n",
"Key FitParamModel not found in registry. Skipping. We apologize that it's usually due to the version mismatch. Please contact the developer for retrieving the data.\n",
"Key PrefitCaliModel not found in registry. Skipping. We apologize that it's usually due to the version mismatch. Please contact the developer for retrieving the data.\n",
"Key FitCaliModel not found in registry. Skipping. We apologize that it's usually due to the version mismatch. Please contact the developer for retrieving the data.\n"
]
}
],
"source": [
"from qfit import Fit\n",
"# this is an example file we already prepared for you\n",
"# If you didn't close the previous window, you'll get another one\n",
"fit = Fit.open(\"C:/Users/nicolas.roch/Qfit/Legqcy/Vishnu_sample.qfit\") "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"There is another option for you to continue working in the notebook - export."
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"HilbertSpace(**{'subsystem_list': [Fluxonium(**{'EJ': 3.3728, 'EC': 1.0515, 'EL': 0.2017, 'flux': 0.971708185053381, 'cutoff': 100, 'truncated_dim': 5, 'id_str': 'Fluxonium', 'evals_method': None, 'evals_method_options': None, 'esys_method': None, 'esys_method_options': None}), Oscillator(**{'E_osc': 5.5929, 'l_osc': 1.0, 'truncated_dim': 4, 'id_str': 'Resonator'})], 'interaction_list': [InteractionTerm(**{'g_strength': 1.1441, 'operator_list': [(1, <bound method Oscillator.n_operator of Oscillator(**{'E_osc': 5.5929, 'l_osc': 1.0, 'truncated_dim': 4, 'id_str': 'Resonator'})>), (0, <bound method Fluxonium.n_operator of Fluxonium(**{'EJ': 3.3728, 'EC': 1.0515, 'EL': 0.2017, 'flux': 0.971708185053381, 'cutoff': 100, 'truncated_dim': 5, 'id_str': 'Fluxonium', 'evals_method': None, 'evals_method_options': None, 'esys_method': None, 'esys_method_options': None})>)], 'add_hc': False})]})"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# To get the HilbertSpace object and continue working on it\n",
"fit_hilbertspace = fit.exportHilbertSpace(deepcopy=True)\n",
"fit_hilbertspace"
]
}
],
"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.14"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
10 changes: 9 additions & 1 deletion debug.ipynb → debug/debug_paul.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,15 @@
" raise Exception(\n",
"Exception: Lookup data not found. For HilbertSpace: data must be generated with .generate_lookup(). For ParameterSweep: data should be automatically generated unless disabled manually. In the latter case, apply .run().\n",
"The cached device pixel ratio value was stale on window expose. Please file a QTBUG which explains how to reproduce.\n",
"The cached device pixel ratio value was stale on window expose. Please file a QTBUG which explains how to reproduce.\n"
"The cached device pixel ratio value was stale on window expose. Please file a QTBUG which explains how to reproduce.\n",
"Traceback (most recent call last):\n",
" File \"/Users/pacosynthesis/Desktop/ScienceTech/Research/Superconducting_qubit_NU/qfit/qfit/qfit/controllers/io_ctrl.py\", line 433, in closeByMainWindow\n",
" status = self.closeAppAfterSaving()\n",
" ^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
" File \"/Users/pacosynthesis/Desktop/ScienceTech/Research/Superconducting_qubit_NU/qfit/qfit/qfit/controllers/io_ctrl.py\", line 267, in closeAppAfterSaving\n",
" assert registryDictFromFile is not None, \"File not found\"\n",
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
"AssertionError: File not found\n"
]
}
],
Expand Down
File renamed without changes.

0 comments on commit 6dcc024

Please sign in to comment.