Abstract: Superconducting circuits incorporating non-linear devices, such as Josephson junctions and nanowires, are among the leading platforms for emerging quantum technologies. Promising applications require designing and optimizing circuits with ever-increasing complexity and controlling their dissipative and Hamiltonian parameters to several significant digits. Therefore, there is a growing need for a systematic, simple, and robust approach for precise circuit design, extensible to increased complexity. The energy-participation ratio (EPR) approach presents such an approach to unify the design of dissipation and Hamiltonians around a single concept β the energy participation, a number between zero and one β in a single-step electromagnetic simulation. This markedly reduces the required number of simulations and allows for robust extension to complex systems. The approach is general purpose, derived abΒ initio, and valid for arbitrary non-linear devices and circuit architectures. Experimental results on a variety of circuit quantum electrodynamics (cQED) devices and architectures, 3D and flip-chip (2.5D), have been demonstrated to exhibit ten percent to percent-level agreement for non-linear coupling and modal Hamiltonian parameters over five-orders of magnitude and across a dozen samples. Here, in this package, all routines of the EPR approach are fully automated.
- Z.K. Minev, Ph.D. Dissertation, Yale University (2018), see Chapter 4. arXiv:1902.10355
- Z.K. Minev, Z. Leghtas, et al. (to appear soon on arXiv) (2019)
- Start here: Using
pyEPR
- Video Tutorials
- Setup and Installation
- HFSS Project Setup for
pyEPR
- Troubleshooting
pyEPR
- Authors and Contributors
- Fork π΄ the
pyEPR top-level repository
on GitHub. (How to fork a GitHub repo?). Share some love by staring β pyEPR. - Clone π your forked repository locally. (How to clone a GitHub repo?). Setup the
pyEPR
python code by following Installation and Python Setup. - Tutorials Learn how to use using the jupyter notebook tutorials
- Stay up to date Enjoy and make sure to git add the master remote branch
git remote add MASTER_MINEV git://github.com/zlatko-minev/pyEPR.git
(help?). - Cite
pyEPR
arXiv:1902.10355 and enjoy! π
The following code illustrates how to perform a complete analysis of a simple two-qubit, one-cavity device in just a few lines of code with pyEPR
. In the HFSS file, before running the script, first specify the non-linear junction rectangles and variables (see Sec. pyEPR Project Setup in HFSS). All operations in the eigen analysis and Hamiltonian computation are fully automated. The results are saved, printed, and succinctly plotted.
from pyEPR import *
# Connect to your HFSS project
pinfo = Project_Info(r'C:/path-to-sims',
project_name = 'two_qubit_one_cavity', # Project file name (string).
# "None" will get the current active one.
design_name = 'Alice_Bob' # Design name (string).
# "None" will get the current active one.
).conect()
# Specify your Josephson tunnel junction info for HFSS
pinfo.junctions['jAlice'] = {'Lj_variable':'LJAlice', 'rect':'qubitAlice', 'line': 'alice_line', 'length':parse_units('50um')}
pinfo.junctions['jBob'] = {'Lj_variable':'LJBob', 'rect':'qubitBob', 'line': 'bob_line', 'length':parse_units('50um')}
pinfo.validate_junction_info() # Check that valid names of variables and objects have been supplied.
# 2b. Dissipative elements. (see more options in Project_Info.dissipative)
pinfo.dissipative.dielectrics_bulk = ['si_substrate', 'dielectic_object2'] # supply names of hfss objects
pinfo.dissipative.dielectric_surfaces = ['interface1', 'interface2']
# 3. Run analysis
epr_hfss = pyEPR_HFSS(pinfo)
epr_hfss.do_EPR_analysis()
# 4. Hamiltonian analysis
epr = pyEPR_Analysis(epr_hfss.data_filename)
epr.analyze_all_variations(cos_trunc = 8, fock_trunc = 7)
epr.plot_Hresults()
Use pyEPR
directly from the source, and pull updates from the master git repo, since we often update it. The following steps explain how to set up Python 3, fork the pyEPR
repo and use it.
Please keep up to date with pyEPR
by using git. We like to make it simple using a git-gui manager, SourceTree or GitHub Desktop.
Recommended procedure.
-
Install Python 3.x, we recommend the Anaconda distribution.
The code is currently under dev with Python 3.6/7. It was developed under 2.7 and should still be compatible.
After the install, make sure you configure your system PATH variables. On Windows, in the taskbar search or control panel, search for "Edit environment variables for your account". In the section System Variables, find the PATH environment variable and select it. Click Edit. PlaceC:\Anaconda3;C:\Anaconda3\Scripts;C:\Anaconda3\Library\bin;
at the beginning of the path. If you have a previous Python installation this step is very important, especially to compile the qutip module. You may verity your path using the following command in the Command Prompt (terminal):sh $ echo %PATH%
-
Install the required packages, including pint, qutip, and attrdict. In a terminal window
conda install -c conda-forge pint
conda install -c conda-forge qutip
pip install attrdict
- Fork this pyEPR repository on GitHub with your GitHub account. You may clone the fork to your PC and manage it using the SourceTree git-gui manager.
- Add the pyEPR repository folder to your python search path. Make sure to add the git remote to the master is set up,
git remote add MASTER_MINEV git://github.com/zlatko-minev/pyEPR.git
! (Help?) - Edit pyEPR module
config.py
to set your data-saving directory and other parameters of interest. - **ENJOY and cite pyEPR! ** π
Follow the same instructions above. You shouldn't have to install mingw or modify distutils.cfg, since your distribution should come with gcc as the default compiler.
You may find an advised work flow and some setup tips here.
- Define circuit geometry & electromagnetic boundary condition (BC).
- Junction rectangles and BC: Create a rectangle for each Josephson junction and give it a good name; e.g.,
jAlice
for a qubit named Alice. We recommend 50 x 100 um rectangle for a simple simulation, although orders of magnitude smaller rectangles work as well. Note the length of this junction, you will supply it to pyEPR. Assign aLumped RLC
BC on this rectangle surface, with an inductance value given by a local variable,Lj1
for instance. The name of this variable will also be supplied to the pyEPR. - Over each junction rectangle draw a model
polyline
to define give a sense of the junction current-flow direction. This line should spans the length of the full junction rectangle. Define it using an object coordinate system on the junction rectangle (so that they move together when the geometry is altered). The name of this line will be supplied to the pyEPR module. - Meshing.
- Lightly mesh the thin-film metal BC. Lightly mesh the junction rectangles.
- Simulation setup
- We recommend
mixed order
solutions.
Please update to pint version newer than 0.7.2. You may use
pip install pint --upgrade
You probably have to update your numpy installation. For me, the following bash sequence worked:
conda update qutip
conda update numpy
You may also choose to install the optional qutip package for some advanced numerical analysis of the Hamiltonian. We use Qutip to handle quantum objects. Follow the instruction on their website. As of Aug. 2017, qutip is part of conda, and you can use
conda install qutip
If this doesn't work, try installing from conda forge
conda install -c conda-forge qutip
If you wish to install manually, follow the following procedure. Some of this can get a bit tricky at times. First, you need to install a C compiler, since qutip uses Cython. If you dont have VS9, gcc, or mingw installed, the following works:
pip install -i https://pypi.anaconda.org/carlkl/simple mingwpy
Let anaconda know to use this compiler by creating the file C:\Anaconda2\Lib\distutils\distutils.cfg
with the following content
[build]
compiler = mingw32
[build_ext]
compiler = mingw32
Next, let's install qutip. You can choose to use conda intall or pip install, or pull from the git directly as done here:
conda install git
pip install git+https://github.com/qutip/qutip.git
Check the project and design file names carefully. Make sure that the file-path doesn't have apostrophes or other bad characters, such as in C:\Minev's PC\my:Project. Check that HFSS hasn't popped up an error dialogue, such as "File locked." Manually open HFSS and the file.
Either HFSS popped an error dialog, froze up, or you miss-typed the name of something.
If your script terminates improperly, this can happen. pyHFSS tries to catch termination events and handle them. Your safety should be guaranteed however, if you call hfss.release()
when you have finished. Use the Task-manager (Activity Monitor on MAC) to kill HFSS if you want.
When running a parametric sweep in HFSS, make sure you are actually saving the fields for each variation before running pyEPR. This can be done by right-clicking on your ParametricSetup -> properties -> options -> "Save Fields and Mesh".
This problem is due to pandas 0.20.1, update to 0.20.3 or better solves this issue.
This error happens when trying to read in an hdf file with numpy version 1.16, see git issue here. A solution is to downgrade numpy to 1.15.4 or upgrade to newer versions of hdf and numpy.
- Authors: Zlatko Minev & Zaki Leghtas, with contributions from many friends and colleagues.
- 2015 - present.
- Contributors: Phil Rheinhold, Lysander Christakis, Devin Cody, ... Original versions of pyHFSS.py and pyNumericalDiagonalization.py contributed by Phil Rheinhold, excellent original repo.
- Terms of use: Use freely and kindly cite the paper (arXiv link to be posted here) and/or this package.
- How can I contribute? Contact Z. Minev or Z. Leghtas.