stanfordLINQS / SQcircuit

Superconducting quantum circuit analyzer
BSD 3-Clause "New" or "Revised" License
43 stars 7 forks source link

Gram_Schmidt process failed in some circuits #22

Closed Zhenxing2020 closed 1 month ago

Zhenxing2020 commented 6 months ago

Hi, the circuit below, a transmon connected directly to a fluxonium, doesn't work. The bug happens when applying 2nd transformation, see _get_and_apply_transformation_2(self) in circuit.py. And the bug will disappear when removing either inductor or capacitor or JJ.

I feel like this is a bug that can be fixed, since the circuit topology doesn't have any funky things.

Any comments and help would be greatly appreciated!

import SQcircuit as sq
loop1 = sq.Loop()
# define the circuit elements
CJ = sq.Capacitor(3., 'GHz',Q=1e6 ,error=10)
C = sq.Capacitor(0.5, 'GHz',Q=1e6 ,error=10)
L = sq.Inductor(0.3,'GHz',Q=500e6 ,loops=[loop1])
JJ1 = sq.Junction(10.2,'GHz',cap =CJ , A=1e-7, x=3e-06, loops=[loop1])
JJ2 = sq.Junction(10.2,'GHz',cap =CJ , A=1e-7, x=3e-06)

# define the circuit
elements = {
    (0, 1): [L, JJ1],
    (1, 2): [C, JJ2]
}

cr = sq.Circuit(elements, flux_dist='all')
cr.description()
taha1373 commented 1 month ago

Hi @Zhenxing2020,

Thank you for using SQcircuit and for bringing this issue to our attention. We’re happy to inform you that this issue has been resolved in the latest release. Please install SQcircuit Version 1.0.0, where this problem should be addressed. If you encounter any further issues or have additional feedback, don’t hesitate to let us know.