Scqubits

Latest version: v4.3

Safety actively analyzes 706267 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 5

3.1.1

**ADDITIONS**
* Enhanced support for interfacing with QuTiP/mesolve: for simulation of time evolution it is often preferable to work with matrices in the dressed eigenenergy basis (in the absence of a time-dependent drive).
To simplify this, all qubits (i.e., `QuantumSystem` children) now offer an `energy_esys` keyword argument, and introduce `HilbertSpace.op_in_dressed_eigenbasis`.
* Add fit method `Transmon.find_EJ_EC` that extracts EJ, EC of a transmon, based on given E01 and anharmonicity.
* Add `E01`, `anharmonicity` as attributes to all qubits inheriting from `QubitBaseClass`.

**BUG FIXES**
* Fixed a bug affecting certain matrix element parameter sweeps that required recomputing of operators under parameter changes (114 and 177).
* Fixed a bug where `energy_by_bare_index` could throw an exception because np.int32 is not recognized by isinstance(myvar, int) (172).
* Fix for inconsistencies in global signs used for harmonic oscillator and discrete charge basis, originating in definitions of charge-basis lowering/raising operators; e^(i theta) is raising operator. Related fix in harm. osc. momentum operator sign (166).
* Corrected `Transmon.d_hamiltonian_d_flux` to account for the shift in generalized flux (178).
* Various GUI bug fixes.
* Various docstring typo fixes (incl. 165).

**UNDER THE HOOD**
* Renamed branch master → main.
* Constrain changes to matplotlib settings to scqubits.
* Account for scipy deprecation: `linalg.eigh` option `eigvals` -> `subset_by_index`.
* Introduce check for existence of lookup in `HilbertSpace` and `ParameterSweep`; emit meaningful exception message otherwise.
* Phase out `HilbertSpace.subsys_list` in favor of `subsystem_list` (160).
* Remove deprecated `HilbertSpace.lookup` interface and corresponding adapter class.
* Distinguish preslicing reset for `ParameterSweep` and `HilbertSpace` (170).
* Changed pytest data for `ZeroPi`, `FullZeroPi`, `Cos2Phi` to account for the sign fix in 3c1c5914e41d944d8234a8cfc8f7ef2f5ae7b67e.
* Increase required pathos version to 0.3.0 to fix the multiprocessing issue in python 3.7.

3.1

**ADDITIONS**
* `GUI` now includes functionality to plot coherence time estimates for various qubits


**UNDER THE HOOD**
* Speedup for diagonalization of `Transmon` and `TunableTransmon` by recognizing the Hamiltonian matrix as tridiagonal.

3.0.3

**BUG FIXES: GUI**
- `get_operator_names` has been eliminated from the operator dropdown menu
- "State No." sliders for `FluxQubit`, `ZeroPi`, and `Cos2PhiQubit` do not exclude the ground state anymore.
- Fixed a bug where the plot was not being erased after switching to another qubit while in manual-update mode.
- Changing to a non-manual scqubit now switches manual-mode off.
- Fixed a bug where the maximum state number could be larger than `hilbertdim`.

**UNDER THE HOOD**
- Initialization of a circuit instance now does not globally switch to latex output (avoids unnecessary slowdowns with regular, non-sympy, output.

3.0.2

**ADDITIONS**
* `Circuit` now implements multiprocessing in routines like `get_evals_vs_paramvals` when specifying `num_cpus=2` or higher as optional keyword argument.
* The class `Circuit` is now “frozen” to prevent accidental creation of new instance attributes. Doing `<circuit instance>.non_existing_attribute = 3` will now raise an error message instead of creating a new attribute.
* New threshold setting `scqubits.settings.SYM_INVERSION_MAX_NODES` (default: `=3`) decides whether the capacitance matrix is inverted symbolically (number of nodes ≤ threshold) or numerically (number of nodes > threshold). This avoids apparent hang-ups due to generation of massive symbolic expressions for matrix inverses.

**BUG FIXES**
* Branches are now distinguished by a unique id. This solves an issue of incorrect spanning trees when two branches of the same type were connected across the same set of nodes.
* Fixed a bug in plotting routines which led to an `Exception` for cases with two or more layers in the system hierarchy.
* Fixed a bug that could break `Subsystem` instances when the symbolic Hamiltonian had no potential terms.
* `GUI`: establish correct clearing when turning manual plot on or when switching to another plot while on manual update.

**UNDER THE HOOD**
* All numerical diagonalization is now delayed until explicitly required. Changing circuit parameters thus does not incur a repeated runtime cost anymore.
* When hierarchical diagonalization is used, the bare eigensystems for each subsystems are now stored and reused for calculations, and only replaced by a new set when necessary. This dramatically improves the performance of wavefunction plotting, identity wrapping, etc.
* If the circuit parameters are not updated, successive diagonalizations are skipped for all subsystems.
* Implemented `eigsh_safe` (wrapper for scipy.sparse.linalg.eigsh) that orthogonalizes the eigenvectors when degenerate eigenvalues are detected. In rare cases of actual degeneracies in the spectrum, sparse matrix methods could have given incorrect results because `scipy.sparse.linalg.eigsh` does not guarantee orthogonality of eigenvectors in degenerate subspaces.

**DEPRECATIONS**
* The `Circuit.from_yaml` method will be phased out. Instead simply use the regular instance creation method `scq.Circuit(...)` with the same arguments as in the `from_yaml` class method.


v.3.0.1
**ADDITIONS**
* Modified `SymbolicCircuit` and `Circuit` classes to simulate linear LC circuits efficiently.
* Added the option `grids_dict` to `plot_wavefunction`, which provides an option to define a custom grid for wavefunction plots.
* File input/output is now functional for the `Circuit` class, which will enable users to store `Circuit` objects to file.

**BUG FIXES**
* `sym_external_fluxes` now functions as expected for circuits with capacitive sub-circuits; external fluxes are now distributed in a deterministic way by default.
* Fixed and improved functions that display symbolic Hamiltonians, Lagrangians, potentials, etc.; added factor 2pi for displayed external fluxes to reflect units correctly.
* Fixed the representation of cosine operator for periodic variables which previously resulted in an erroneous shift of pi in the wavefunction plots.
* Multiple corrections to plot functionality of `Circuit` class.
* GUI: fixed issue with “update” button for slow qubits.
* GUI: fixed bad range default for wavefunction plots of fluxonium.

**UNDER THE HOOD**
* Changed the way to calculate the junction potential matrix in `Circuit` class, which now uses expm to evaluate the cosine terms.
* f-strings are now used for most of the string manipulations in `Circuit` and `SymbolicCircuit` class.
* Fixed the overall energy shift in the eigenvalues by incorporating omega/2 for every harmonic oscillator.

3.0

**ADDITIONS**
* add circuit and symbolic_circuit modules, introducing the Circuit class for symbolic and numerical analysis of custom circuits
* add official support for Python 3.9 and 3.10
* improved GUI for single qubits (incl., e.g., a Dropdown menu with parameter choices from papers)
* improved Explorer class
* additional options for specifying initial and final states in transitions and plot_transitions inside ParameterSweep
* additional helper functions in ParameterSweep: get_subsys(index), subsys_by_id_str(id_str), subsys_evals_count(index), dressed_evals_count
* ParameterSweep offers a new option ignore_low_overlap
* improved status information output when using parallel processing of ParameterSweep data

**DEPRECATIONS**
* remove deprecation support for outdated InteractionTerm / HilbertSpace interface
* remove deprecation support for outdated Explorer interface

**BUG FIXES**
* fixed incorrect output/return from supported_noise_channels for the FullZeroPi qubit
* fixed accidental support of h5py without safeguard (remains optional)
* fixed ordering bug in de-serialization of OrderedDict which could prevent reading of ParameterSweep objects
* fixed plotting issue in which presence of nans could reduce the intended plot range

**UNDER THE HOOD**
* remove _evec_dtype attribute from qubit classes
* eliminated code duplication for SpectrumLookup between HilbertSpace and ParameterSweep . Both classes now use SpectrumLookupMixin
* ParameterSweep now has read-only property hilbertspace
* added quantitative pytest for FullZeroPi

2.2.2

**BUG FIXES**
* Fixed issue that could make import of `scqubits` fail when optional `h5py` package was not installed.
* Plot options were not properly handled by `plotting.data_vs_paramvals` , leading to poor formatting of `plot_dispersion_vs_paramvals`
* In certain scenarios (likely related to dependency version updates), GUI displays were duplicated rather than substituted.
* Adjusted calculations mapping dressed-basis to bare-state labels: use (state overlap)^2 instead of (state overlap) for thresholding.


**UNDER THE HOOD**
* `typing_extensions` is new dependency (used for enhanced typing annotations such as `overload` and `Literal`

Page 2 of 5

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.