atomiq.components.electronics.currentsource

Classes

CurrentSource

Current Source

HBridgedCurrentSource

Combination of an H-bridge and a current source

TTLHardwareLogicHBridgedCurrentSource

H-bridged current source with control logic implemented in hardware

TTLSoftwareLogicHBridgedCurrentSource

H-bridged current source with control logic implemented in software

RPCCurrentSource

A current source controlled via RPC calls

RPCCurrentSourceChannel

One channel of a multi-channel currentsource controlled via RPC

VoltageControlledCurrentSource

A current source controlled by an analog voltage

Module Contents

class atomiq.components.electronics.currentsource.CurrentSource(min_current=float('-inf'), max_current=float('inf'), default_ramp_steps=30, *args, **kwargs)[source]

Bases: atomiq.components.primitives.Component, atomiq.components.primitives.Parametrizable

Current Source

This abstract class represents any device that can output a defined, controllable current.

Parameters:
  • min_current (artiq.language.types.TFloat) -- The minimum current the device can output [A]

  • max_current (artiq.language.types.TFloat) -- The maximum current the device can output [A]

  • default_ramp_steps (artiq.language.types.TInt32) -- The default number of steps that this device should use if the current is ramped. This value is only used if no ramp_steps are given in the ramp_current() method.

kernel_invariants
current
min_current
max_current
default_ramp_steps = 30
set_current(current)[source]

Set the current delivered by the current source

Parameters:

current (artiq.language.types.TFloat) -- Current in A

abstractmethod _set_current(current)[source]
Parameters:

current (artiq.language.types.TFloat)

_ramp_current(duration, current_start, current_end, ramp_timestep=0.0002)[source]

This method implements a stupid ramp on an abstract level. This will most likely work but be slow. If your hardware has native support for ramping, please override this function when you inherit from currentSource

Parameters:
  • duration (artiq.language.types.TFloat)

  • current_start (artiq.language.types.TFloat)

  • current_end (artiq.language.types.TFloat)

  • ramp_timestep (artiq.language.types.TFloat)

ramp_current(duration, current_end, current_start=float('nan'), ramp_timestep=float('nan'), ramp_steps=-1)[source]

Ramp current over a given duration.

This method advances the timeline by duration

Parameters:
  • duration (artiq.language.types.TFloat) -- ramp duration [s]

  • current_end (artiq.language.types.TFloat) -- end current [A]

  • current_start (artiq.language.types.TFloat) -- initial current [A]. If not given, the ramp starts from the current operating current.

  • ramp_timestep (artiq.language.types.TFloat)

  • ramp_steps (artiq.language.types.TInt32)

class atomiq.components.electronics.currentsource.HBridgedCurrentSource(current_source, *args, **kwargs)[source]

Bases: CurrentSource, atomiq.components.primitives.Switchable

Combination of an H-bridge and a current source

Combining an H-bridge with a unipolar current source allows to create a bipolar current source. This class bundles these two comoponents an exposes them as a bipolar current source.

Parameters:

current_source (CurrentSource) -- The current source connected to the H-bridge

class HBridgeState[source]

Bases: enum.IntEnum

Enum where members are also (and must be) ints

FORWARD = (1,)
OFF = (0,)
REVERSE = -1
kernel_invariants
current_source
state
last_state
hbridge_off()[source]
hbridge_reverse()[source]
hbridge_forward()[source]
hbridge_toggle()[source]
abstractmethod _hbridge_off()[source]
abstractmethod _hbridge_forward()[source]
abstractmethod _hbridge_reverse()[source]
_set_current(current)[source]
Parameters:

current (artiq.language.types.TFloat)

_ramp_current(duration, current_start, current_end, ramp_timestep)[source]

This method implements a stupid ramp on an abstract level. This will most likely work but be slow. If your hardware has native support for ramping, please override this function when you inherit from currentSource

Parameters:
  • duration (artiq.language.types.TFloat)

  • current_start (artiq.language.types.TFloat)

  • current_end (artiq.language.types.TFloat)

  • ramp_timestep (artiq.language.types.TFloat)

off()[source]
on()[source]
class atomiq.components.electronics.currentsource.TTLHardwareLogicHBridgedCurrentSource(switch_direction, switch_on, invert_direction=False, *args, **kwargs)[source]

Bases: HBridgedCurrentSource

H-bridged current source with control logic implemented in hardware

Some external hardware (logic gates) take care to set all MOSFETs of the H-bridge based on the desired direction as indicated by switch_direction. Via switch_on the entire bridge can be enabled and disabled.

switch_on

switch_direction

current flow

off

on

off

off

off

off

on

on

forward

on

off

reverse

Parameters:
  • switch_on (Switchable) -- When ON, H-bridge is eith forward or reverse; when OFF, load is disconnected from the PSU

  • switch_direction (Switchable) -- select forward or reverse direction of current flow

  • invert_direction (artiq.language.types.TBool) -- flip forward/reverse

kernel_invariants
switch_direction
switch_on
invert_direction = False
_hbridge_off()[source]
_hbridge_forward()[source]
_hbridge_reverse()[source]
class atomiq.components.electronics.currentsource.TTLSoftwareLogicHBridgedCurrentSource(switch_forward, switch_reverse, *args, **kwargs)[source]

Bases: HBridgedCurrentSource

H-bridged current source with control logic implemented in software

Each pair of MOSFETs is directly controlled by one switch. So when both TTLs are off, the bridge is off, but also when both are on the PSU is shorted.

switch_forward

switch_reverse

current flow

off

off

off

off

on

reverse

on

off

forward

on

on

INVALID

Parameters:
  • switch_forward (Switchable) -- TTL to enable forward pair of MOSFETs

  • switch_reverse (Switchable) -- TTL to enable reverse pair of MOSFETs

kernel_invariants
switch_forward
switch_reverse
_hbridge_off()[source]
_hbridge_forward()[source]
_hbridge_reverse()[source]
class atomiq.components.electronics.currentsource.RPCCurrentSource(rpc_currentsource, *args, **kwargs)[source]

Bases: CurrentSource

A current source controlled via RPC calls

Parameters:

rpc_currentsource (Component) -- The ARTIQ rpc object representing the current source. This object needs to provide a function named set_current(current_in_A) to set the current.

kernel_invariants
currentsource
_set_current(current)[source]
Parameters:

current (artiq.language.types.TFloat)

class atomiq.components.electronics.currentsource.RPCCurrentSourceChannel(rpc_currentsource, channel, *args, **kwargs)[source]

Bases: CurrentSource

One channel of a multi-channel currentsource controlled via RPC

Parameters:
  • rpc_currentsource (Component) -- The ARTIQ rpc object representing the multi channel current source. This object needs to provide a function named set_current(current_in_A, channel) to set the current.

  • channel (artiq.language.types.TInt32) -- channel of the multi-channel current source to operate on

kernel_invariants
currentsource
channel
_set_current(current)[source]
Parameters:

current (artiq.language.types.TFloat)

class atomiq.components.electronics.currentsource.VoltageControlledCurrentSource(voltage_source, calibration, *args, **kwargs)[source]

Bases: CurrentSource

A current source controlled by an analog voltage

A typical usecase for this class are voltage-controlled power supplies that drive the current through a coil.

Parameters:
  • voltage_source (VoltageSource) -- Voltage source that controls the current source

  • calibration (Calibration) -- Calibration U = f(I) to give the control voltage U for a desired current I

kernel_invariants
voltage_source
calibration
_set_current(current)[source]
Parameters:

current (artiq.language.types.TFloat)

_ramp_current(duration, current_start, current_end, ramp_timestep)[source]

This method implements a stupid ramp on an abstract level. This will most likely work but be slow. If your hardware has native support for ramping, please override this function when you inherit from currentSource

Parameters:
  • duration (artiq.language.types.TFloat)

  • current_start (artiq.language.types.TFloat)

  • current_end (artiq.language.types.TFloat)

  • ramp_timestep (artiq.language.types.TFloat)