Skip to content

Commit

Permalink
Updated fromatting with black and fixed pylint rc issue
Browse files Browse the repository at this point in the history
  • Loading branch information
zlatko-minev committed May 21, 2024
1 parent c77d67b commit 001394b
Show file tree
Hide file tree
Showing 36 changed files with 3,834 additions and 2,751 deletions.
86 changes: 6 additions & 80 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -63,87 +63,12 @@ confidence=
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use "--disable=all --enable=classes
# --disable=W".
disable=print-statement,
parameter-unpacking,
unpacking-in-except,
old-raise-syntax,
backtick,
long-suffix,
old-ne-operator,
old-octal-literal,
import-star-module-level,
non-ascii-bytes-literal,
raw-checker-failed,
bad-inline-option,
locally-disabled,
file-ignored,
disable=file-ignored,
suppressed-message,
useless-suppression,
deprecated-pragma,
use-symbolic-message-instead,
apply-builtin,
basestring-builtin,
buffer-builtin,
cmp-builtin,
coerce-builtin,
execfile-builtin,
file-builtin,
long-builtin,
raw_input-builtin,
reduce-builtin,
standarderror-builtin,
unicode-builtin,
xrange-builtin,
coerce-method,
delslice-method,
getslice-method,
setslice-method,
no-absolute-import,
old-division,
dict-iter-method,
dict-view-method,
next-method-called,
metaclass-assignment,
indexing-exception,
raising-string,
reload-builtin,
oct-method,
hex-method,
nonzero-method,
cmp-method,
input-builtin,
round-builtin,
intern-builtin,
unichr-builtin,
map-builtin-not-iterating,
zip-builtin-not-iterating,
range-builtin-not-iterating,
filter-builtin-not-iterating,
using-cmp-argument,
eq-without-hash,
div-method,
idiv-method,
rdiv-method,
exception-message-attribute,
invalid-str-codec,
sys-max-int,
bad-python3-import,
deprecated-string-function,
deprecated-str-translate-call,
deprecated-itertools-function,
deprecated-types-field,
next-method-defined,
dict-items-not-iterating,
dict-keys-not-iterating,
dict-values-not-iterating,
deprecated-operator-function,
deprecated-urllib-function,
xreadlines-attribute,
deprecated-sys-function,
exception-escape,
comprehension-escape,
fixme, # disabled as TODOs would show up as warnings
logging-fstring-interpolation # fstrings inside logging
fixme, # disabled as TODOs would show up as warnings
logging-fstring-interpolation # fstrings inside logging

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down Expand Up @@ -331,12 +256,13 @@ max-line-length=100
# Maximum number of lines in a module.
max-module-lines=1000

; Pylint 2.6: The no-space-check option has been removed,
# List of optional constructs for which whitespace checking is disabled. `dict-
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
# `empty-line` allows space-only lines.
no-space-check=trailing-comma,
dict-separator
; no-space-check=trailing-comma,
; dict-separator

# Allow the body of a class to be on the same line as the declaration if body
# contains single statement.
Expand Down
32 changes: 32 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# .readthedocs.yml
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.8"

# Build documentation in the docs/source/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
# - pdf

# Optionally set the version of Python and requirements required to build your docs
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
version: 3.8
install:
- requirements: requirements.txt
- path: .
# - method: pip
# path: .
# extra_requirements:
# - docs
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,37 @@
from pyEPR import ProjectInfo, DistributedAnalysis, QuantumAnalysis

# 1. Project and design. Open link to HFSS controls.
project_info = ProjectInfo('c:/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.
)
project_info = ProjectInfo(
"c:/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.
)

# 2a. Junctions. Specify junctions in HFSS model
project_info.junctions['jAlice'] = {'Lj_variable':'LJAlice', 'rect':'qubitAlice', 'line': 'alice_line', 'length':0.0001}
project_info.junctions['jBob'] = {'Lj_variable':'LJBob', 'rect':'qubitBob', 'line': 'bob_line', 'length':0.0001}
project_info.junctions["jAlice"] = {
"Lj_variable": "LJAlice",
"rect": "qubitAlice",
"line": "alice_line",
"length": 0.0001,
}
project_info.junctions["jBob"] = {
"Lj_variable": "LJBob",
"rect": "qubitBob",
"line": "bob_line",
"length": 0.0001,
}

# 2b. Dissipative elements.
project_info.dissipative['dielectrics_bulk'] = ['si_substrate'] # supply names here, there are more options in project_info.dissipative.
project_info.dissipative['dielectric_surfaces'] = ['interface']
project_info.dissipative["dielectrics_bulk"] = [
"si_substrate"
] # supply names here, there are more options in project_info.dissipative.
project_info.dissipative["dielectric_surfaces"] = ["interface"]

# 3. Run analysis
epr_hfss = DistributedAnalysis(project_info)
epr_hfss.do_EPR_analysis()

# 4. Hamiltonian analysis
epr = QuantumAnalysis(epr_hfss.data_filename)
epr.analyze_all_variations(cos_trunc = 8, fock_trunc = 7)
epr.plot_hamiltonian_results()
epr = QuantumAnalysis(epr_hfss.data_filename)
epr.analyze_all_variations(cos_trunc=8, fock_trunc=7)
epr.plot_hamiltonian_results()
22 changes: 5 additions & 17 deletions pyEPR/__config_user_old.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,50 +12,40 @@
from . import Dict

config = Dict(

# Folder to save result data to.
# PLEASE CHANGE THIS
root_dir=r'C:\data-pyEPR',

root_dir=r"C:\data-pyEPR",
# Loss properties of various materials and surfaces
dissipation=Dict(

##################################################
# Bulk dielectric
# refs: https://arxiv.org/abs/1308.1743
# http://arxiv.org/pdf/1509.01854.pdf
tan_delta_sapp=1e-6, # tan(delta) for bulk surface
epsi=10, # dielectric

epsi=10, # dielectric
##################################################
# Surface dielectric
# ref: http://arxiv.org/pdf/1509.01854.pdf

# Surface dielectric (dirt) thickness
# units: meters
th=3e-9,

# Surface dielectric (dirt) constant
# units: relative permittivity
eps_r=10,

# Surface dielectric (dirt) loss tangent
# units: unitless, since this is tan(delta)
tan_delta_surf=1e-3,

##################################################
# Thin-film surface loss
# units: Ohms
# ref: https://arxiv.org/abs/1308.1743
surface_Rs=250e-9,

##################################################
# Seam current loss
# units: per Ohm meter; i.e., seam conductance
# ref: http://arxiv.org/pdf/1509.01119.pdf
gseam=1.0e3,
),

ansys=Dict(
# method_calc_P_mj sets the method used to calculate the participation ratio in eigenmode.
# Valid values:
Expand All @@ -66,16 +56,14 @@
# Current is integrated average of J_surf by default: (zkm 3/29/16)
# Will calculate the Pj matrix for the selected modes for the given junctions
# junc_rect array & length of junctions
method_calc_P_mj='line_voltage',

method_calc_P_mj="line_voltage",
),

plotting=Dict(
# Default color map for plotting. Better if made into a string name
# taken from matplotlib.cm
default_color_map='viridis', # pylint: disable=no-member
default_color_map="viridis", # pylint: disable=no-member
),
)


__all__ = ['config']
__all__ = ["config"]
Loading

0 comments on commit 001394b

Please sign in to comment.