Circuits and components
Netlists and connections, subcircuits, scattering blocks, transmission lines, and noise models.
Multi-tone harmonic balance and time domain simulations of nonlinear circuits. The linearized response, noise, and sensitivity about the operating point.
JosephsonCircuits or "JC" is a high-performance frequency domain and time domain simulator for nonlinear circuits containing Josephson junctions, capacitors, inductors, mutual inductors, and resistors. JC simulates the frequency domain behavior using a modified nodal analysis formulation in the flux basis [1,2], with mutually coupled inductors assigned auxiliary branch currents and floating inductive or Josephson subnetworks gauge fixed at DC, so nodes do not require an inductive path to ground) and the harmonic balance method [3-5] with an analytic Jacobian. Noise performance, quantified by quantum efficiency, is efficiently simulated through an adjoint method.
Frequency dependent circuit parameters are supported to model realistic impedance environments or dissipative components. Dissipation can be modeled by capacitors with an imaginary capacitance or frequency dependent resistors.
The same compiled circuit, on the same node flux unknowns, can also be integrated directly in time, for pulsed drives and for drives with more tones than a harmonic grid can hold, with the exact tangent and adjoint of the recorded time steps, its quantum noise computed in temporal modes about the recorded trajectory, and measured or simulated scattering data, cables and lossy blocks included through fitted rational blocks and ideal transmission lines; the theory and implementation of the time domain solver has its own page.
JosephsonCircuits.jl supports the following:
Nonlinear simulations in which the user defines a circuit, the drive current, frequency, and number of harmonics and the code calculates the node flux or node voltage at each harmonic.
Linearized simulations about the nonlinear operating point calculated above. This simulates the small signal response of a periodically time varying linear circuit and is useful for simulating parametric amplification and frequency conversion in the undepleted (strong) pump limit. Calculation of node fluxes (or node voltages) and scattering parameters of the linearized circuit [4-5].
Linear simulations of linear circuits. Calculation of node fluxes (or node voltages) and scattering parameters.
Calculation of symbolic capacitance and inverse inductance matrices.
As detailed in [6], we find excellent agreement with Keysight ADS simulations and Fourier analysis of time domain simulation performed by WRSPICE.
Warning: this package is under heavy development and there will be breaking changes. We will keep the examples updated to ease the burden of any breaking changes.
Circuits: writing a circuit, the netlist and connection group forms, subcircuits, scattering blocks, transmission lines, noise models and temperatures.
Harmonic balance: the frequency domain solvers, their drives and their results, the theory and implementation behind them, and the worked examples from a parametric amplifier to a traveling wave amplifier.
The circuit in time: the time domain solver's usage, the theory and implementation behind it, and quantum noise in time.
Using other solvers and the reference of every exported function.
To install the latest release of the package, install Julia using Juliaup, start Julia, and enter the following command:
using Pkg
Pkg.add("JosephsonCircuits")To install the development version, start Julia and enter the command:
using Pkg
Pkg.add(name="JosephsonCircuits",rev="main")To run the examples below, you will need to install Plots.jl using the command:
Pkg.add("Plots")If you get errors when running the examples, please try installing the latest version of Julia and updating to the latest version of JosephsonCircuits.jl by running:
Pkg.update()Then check that you are running the latest version of the package with:
Pkg.status()Simulations of the linearized system can be effectively parallelized, so we suggest starting Julia with the number of threads equal to the number of physical cores. This can be done with the command line argument --threads or by setting the environmental variable JULIA_NUM_THREADS. See the Julia documentation for the more details. Verify you are using the desired number of threads by running:
Threads.nthreads()For context, the simulation times reported for the examples below use 16 threads on an AMD Ryzen 9 9950X system running Linux.
The examples can be run in the command line (REPL) after starting Julia or you can run them in a Jupyter notebook with IJulia or in Visual Studio Code with the Julia extension.
using JosephsonCircuits
# a Josephson parametric amplifier: a port, a coupling capacitor, and a
# junction shunted by a capacitor
circuit = Circuit([(:p1, 1, 0, Port(1; Z0 = 50.0)),
(:cc, 1, 2, Capacitor(100e-15)),
(:jj, 2, 0, JosephsonJunction(1000e-12)),
(:cj, 2, 0, Capacitor(1000e-15))])
# its gain in the frequency domain: a pump at 4.75 GHz, signals swept about it
ws = 2pi*(4.5:0.001:5.0)*1e9
wp = (2pi*4.75001e9,)
sources = [(mode = (1,), port = 1, current = 0.00565e-6)]
sol = hbsolve(ws, wp, sources, (8,), (16,), circuit)
gain = 10*log10.(abs2.(sol.linearized.S((0,), 1, (0,), 1, :)))
# the same amplifier in time: the pump rising over 2 ns, stepped at 80 samples a period
ramp(t) = t <= 0 ? 0.0 : t >= 2e-9 ? 1.0 : (1 - cospi(t/2e-9))/2
pump(t) = 2*0.00565e-6*ramp(t)*cospi(2*4.75e9*t)
problem = transientproblem(circuit; sources = [TransientSource(1, pump)])
solution = transientsolve(problem, (0.0, 100e-9); dt = 2.6e-12, method = GaussLegendre())
solution.voltage # the port voltage at every stepWe welcome contributions in the form of issues/bug reports or pull requests. This project uses the MIT open source license. You retain the copyright to any code you contribute.
Andrew J. Kerman "Efficient numerical simulation of complex Josephson quantum circuits" arXiv:2010.14929 (2020)
Jiří Vlach and Kishore Singhal "Computer Methods for Circuit Analysis and Design" 2nd edition, Springer New York, NY (1993)
Stephen A. Maas "Nonlinear Microwave and RF Circuits" 2nd edition, Artech House (1997)
José Carlos Pedro, David E. Root, Jianjun Xu, and Luís Cótimos Nunes. "Nonlinear Circuit Simulation and Modeling: Fundamentals for Microwave Design" The Cambridge RF and Microwave Engineering Series, Cambridge University Press (2018)
David E. Root, Jan Verspecht, Jason Horn, and Mihai Marcu. "X-Parameters: Characterization, Modeling, and Design of Nonlinear RF and Microwave Components" The Cambridge RF and microwave engineering series, Cambridge University Press (2013)
Kaidong Peng, Rick Poore, Philip Krantz, David E. Root, and Kevin P. O'Brien "X-parameter based design and simulation of Josephson traveling-wave parametric amplifiers for quantum computing applications" IEEE International Conference on Quantum Computing & Engineering (QCE22) (2022)
The motivation for developing this package is to simulate the gain and noise performance of ultra low noise amplifiers for quantum computing applications such as the Josephson traveling-wave parametric amplifier, which have thousands of linear and nonlinear circuit elements.
We prioritize speed (including compile time and time to first use), simplicity, and scalability.
Design optimization.
More nonlinear components such as kinetic inductors.
Xyce.jl provides a wrapper for Xyce, the open source parallel circuit simulator from Sandia National Laboratories which can perform time domain and harmonic balance method simulations.
NgSpice.jl and LTspice.jl provide wrappers for NgSpice and LTspice, respectively.
ModelingToolkit.jl supports time domain circuit simulations from scratch and using their standard library
ACME.jl simulates electrical circuits in the time domain with an emphasis on audio effect circuits.
Cedar EDA is a Julia-based commercial cloud service for circuit simulations.
Keysight ADS, Cadence AWR, Cadence Spectre RF, and Qucs are capable of time and frequency domain analysis of nonlinear circuits. WRSPICE performs time domain simulations of Josephson junction containing circuits and frequency domain simulations of linear circuits.
We gratefully acknowledge funding from the AWS Center for Quantum Computing and the MIT Center for Quantum Engineering (CQE).