Element Classes
Capacitor
- class SQcircuit.Capacitor(value, unit=None, requires_grad=False, Q='default', error=0, id_str=None)[source]
Bases:
ElementClass that contains the capacitor properties.
- Parameters:
value (
float) – The value of the capacitor.unit (
Optional[str]) – The unit of input value. Ifunitis “THz”, “GHz”, and, etc., the value specifies the charging energy of the capacitor. Ifunitis “fF”, “pF”, and, etc., the value specifies the capacitance in farad. IfunitisNone, the default unit of capacitor is “GHz”.requires_grad (
bool) – A boolean variable that specifies whether autograd should record operations on this element. This feature is specific to thePyTorchengine.Q (
Union[Any,Callable[[float],float]]) – Quality factor of the dielectric of the capacitor which is one over tangent loss. It can be either a float number or a Python function of angular frequency.error (
float) – The error of fabrication in percentage.id_str (
Optional[str]) – ID string for the capacitor.
- value_unit = 'F'
- property requires_grad: bool
Inductor
- class SQcircuit.Inductor(value, unit=None, requires_grad=False, cap=None, Q='default', error=0, loops=None, id_str=None)[source]
Bases:
ElementClass that contains the inductor properties.
- Parameters:
value (
float) – The value of the inductor.unit (
str) – The unit of input value. Ifunitis “THz”, “GHz”, and ,etc., the value specifies the inductive energy of the inductor. Ifunitis “fH”, “pH”, and ,etc., the value specifies the inductance in henry. IfunitisNone, the default unit of inductor is “GHz”.requires_grad (
bool) – A boolean variable that specifies whether autograd should record operations on this element. This feature is specific to thePyTorchengine.loops (
Optional[List[Loop]]) – List of loops in which the inductor resides.cap (
Optional[Capacitor]) – Capacitor associated to the inductor, necessary for correct time-dependent external fluxes scheme.Q (
Union[Any,Callable[[float,float],float]]) – Quality factor of the inductor needed for inductive loss calculation. It can be either a float number or a Python function of angular frequency and temperature.error (
float) – The error in fabrication as a percentage.id_str (
Optional[str]) – ID string for the inductor.
- value_unit = 'H'
- property requires_grad: bool
Junction
- class SQcircuit.Junction(value, unit=None, requires_grad=False, cap=None, A=1e-07, x=3e-06, delta=0.00034, Y='default', error=0, loops=None, id_str=None)[source]
Bases:
ElementClass that contains the Josephson junction properties.
- Parameters:
value (
float) – The value of the Josephson junction.unit (str) – The unit of input value. The
unitcan be “THz”, “GHz”, and ,etc., that specifies the junction energy of the inductor. IfunitisNone, the default unit of junction is “GHz”.requires_grad (
bool) – A boolean variable that specifies whether autograd should record operations on this element. This feature is specific to thePyTorchengine.loops (
Optional[List[Loop]]) – List of loops in which the Josephson junction reside.cap (
Optional[Capacitor]) – Capacitor associated to the josephson junction, necessary for the correct time-dependent external fluxes scheme.A (
float) – Normalized noise amplitude related to critical current noise.x (
float) – Quasiparticle densitydelta (
float) – Superconducting gapY (
Union[Any,Callable[[float,float],float]]) – Real part of admittance.error (
float) – The error in fabrication as a percentage.id_str (
Optional[str]) – ID string for the junction.
- value_unit = 'Hz'
- property requires_grad: bool
Loop
- class SQcircuit.Loop(value=0, A=1e-06, requires_grad=False, id_str=None)[source]
Bases:
objectClass that contains the inductive loop properties, closed path of inductive elements.
- Parameters:
value (
float) – Value of the external flux in the loop.requires_grad (
bool) – A boolean variable that specifies whether autograd should record operations on this loop. This feature is specific to thePyTorchengine.A (
float) – Normalized noise amplitude related to flux noise.id_str (
Optional[str]) – ID string for the loop.
- property requires_grad: bool
- value(random=False)[source]
Return the value of the external flux. If random is True, it samples from a normal distribution with variance defined by the flux noise amplitude.
- Parameters:
random (
bool) – A boolean flag which specifies whether the output is deterministic or random.- Return type:
float