All Projects → rigetti → AdmittanceModels.jl

rigetti / AdmittanceModels.jl

Licence: BSD-3-Clause license
Analysis of linear systems using admittance models

Programming Languages

julia
2034 projects
Jupyter Notebook
11667 projects

Projects that are alternatives of or similar to AdmittanceModels.jl

SparseRegression.jl
Statistical Models with Regularization in Pure Julia
Stars: ✭ 37 (+117.65%)
Mutual labels:  linear-models
spydrnet
A flexible framework for analyzing and transforming FPGA netlists. Official repository.
Stars: ✭ 49 (+188.24%)
Mutual labels:  circuit-analysis
Circuitscape.py
Circuitscape uses electronic circuit theory to solve problems in landscape ecology.
Stars: ✭ 26 (+52.94%)
Mutual labels:  circuit-analysis
linear-tree
A python library to build Model Trees with Linear Models at the leaves.
Stars: ✭ 128 (+652.94%)
Mutual labels:  linear-models
Lecture-3-Linear-Models
ICDSS Machine Learning Workshop Series: Linear Models
Stars: ✭ 19 (+11.76%)
Mutual labels:  linear-models
gglmannotate
📈Annotate a ggplot with a description of a linear model
Stars: ✭ 24 (+41.18%)
Mutual labels:  linear-models
rust-lp-modeler
Lp modeler written in Rust
Stars: ✭ 75 (+341.18%)
Mutual labels:  linear-models
tests-as-linear
Python port of "Common statistical tests are linear models" by Jonas Kristoffer Lindeløv.
Stars: ✭ 64 (+276.47%)
Mutual labels:  linear-models
LearnedSort
Learned Sort: a model-enhanced sorting algorithm
Stars: ✭ 74 (+335.29%)
Mutual labels:  linear-models
appliedstats
📊 Methods of Applied Statistics Course Textbook Repository
Stars: ✭ 134 (+688.24%)
Mutual labels:  linear-models
bruceR
📦 BRoadly Useful Convenient and Efficient R functions that BRing Users Concise and Elegant R data analyses.
Stars: ✭ 110 (+547.06%)
Mutual labels:  linear-models
golinear
liblinear bindings for Go
Stars: ✭ 45 (+164.71%)
Mutual labels:  linear-models

AdmittanceModels.jl

AdmittanceModels.jl is a package for creating and manipulating linear input-output models of the form YΦ = Px, y = QᵀΦ where x are the inputs and y are the outputs. One example of such a model is a Positive Second Order model, defined in [1]. Such models can capture the equations of motion of a circuit consisting of inductors, capacitors, and resistors.

The scripts in paper were used to generate the figures in [1].

If you use this package in a publication, please cite our paper:

@article{ScheerBlock2018,
    author = {Michael G. Scheer and Maxwell B. Block},
    title = "{Computational modeling of decay and hybridization in superconducting circuits}",
    year = "2018",
    month = "Oct",
    note = {arXiv:1810.11510},
    archivePrefix = {arXiv},
    eprint = {1810.11510},
    primaryClass = {quant-ph},
}

[1] Computational modeling of decay and hybridization in superconducting circuits

Installation

Clone the repository from GitHub and install Julia 1.1. No build is required beyond the default Julia compilation.

Example usage: the circuit in Appendix A of [1]

Construct the circuit in Appendix A, with arbitrarily chosen values.

using AdmittanceModels
vertices = collect(0:4)
circuit = Circuit(vertices)
set_capacitance!(circuit, 0, 1, 10.0)
set_capacitance!(circuit, 1, 2, 4.0)
set_capacitance!(circuit, 0, 3, 4.0)
set_capacitance!(circuit, 2, 3, 5.0)
set_capacitance!(circuit, 3, 4, 5.0)
set_inv_inductance!(circuit, 1, 2, 3.5)
set_inv_inductance!(circuit, 0, 3, 4.5)

Use the spanning tree in Appendix A to find a Positive Second Order model.

root = 0
edges = [(1, 0),
         (3, 0),
         (4, 0),
         (2, 1)]
tree = SpanningTree(root, edges)
PSOModel(circuit, [(4, 0)], ["port"], tree)

The tree is optional because a change of spanning tree is simply an invertible change of coordinates.

PSOModel(circuit, [(4, 0)], ["port"])

Example usage: a λ/4 transmission line resonator capacitively coupled to a transmission line

The model we will analyze is similar the device shown below, from Manufacturing low dissipation superconducting quantum processors.

Create CircuitComponent objects for the model.

using AdmittanceModels
ν = 1.2e8 # propagation_speed
Z0 = 50.0 # characteristic_impedance
δ = 100e-6 # discretization length

resonator = TransmissionLine(["coupler_0", "short"], ν, Z0, 5e-3, δ=δ)
tline = TransmissionLine(["in", "coupler_1", "out"], ν, Z0, 2e-3, locations=[1e-3], δ=δ)
coupler = SeriesComponent("coupler_0", "coupler_1", 0, 0, 10e-15)
components = [resonator, tline, coupler]

Use PSOModel objects to compute the frequency and decay rate of quarter wave resonator mode. Include resistors at the ports in order to get the correct decay rate.

resistors = [ParallelComponent(name, 0, 1/Z0, 0) for name in ["in", "out"]]
pso = connect(PSOModel.([components; resistors]))
pso = short_ports(pso, "short")
λs, _ = lossy_modes_dense(pso, min_freq=3e9, max_freq=7e9)
freq = imag(λs[1])/(2π)
decay = -2*real(λs[1])/(2π)

Compute the transmission scattering parameters Blackbox. This uses a closed form representation of the transmission lines.

ω = collect(range(freq - 2 * decay, stop=freq + 2 * decay, length=300)) * 2π
bbox = connect(Blackbox.(Ref(ω), components))
bbox = short_ports(bbox, "short")
bbox = open_ports_except(bbox, ["in", "out"])
S = [x[1,2] for x in scattering_matrices(bbox, [Z0, Z0])]

Plot the magnitude of the scattering parameters.

using PlotlyJS
plot(scatter(x=ω/(2π*1e9), y=abs.(S)), Layout(xaxis_title="Frequency [GHz]", yaxis_title="|S|"))

Plot the phase of the scattering parameters.

plot(scatter(x=ω/(2π*1e9), y=angle.(S)), Layout(xaxis_title="Frequency [GHz]", yaxis_title="Phase(S)"))

Using with ANSYS Q3D Extractor

Plain text files containing RLGC parameters exported by ANSYS® Q3D Extractor® software can be used to construct a Circuit object via Circuit(file_path). Currently only capacitance matrices are supported.

ANSYS and Q3D Extractor are registered trademarks of ANSYS, Inc. or its subsidiaries in the United States or other countries.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].