-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
544912c
commit 6dcc024
Showing
4 changed files
with
195 additions
and
1 deletion.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.