Skip to content

Commit

Permalink
Add docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
Diego Ristè committed Jan 23, 2020
1 parent d58f411 commit fb5643d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions QGL/ChannelLibraries.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,12 @@ def set_control(self, qubit_or_edge, transmitter, generator=None):
self.update_channelDict()

def set_bias(self, qubit, bias=None, frequency=None):
"""
Set either qubit frequency or DC bias given the other, reading the values or interpolating from qubit.bias_pairs.
qubit: qubit bias/frequency to be set
bias (option 1): set the DC bias of the associated qubit.DCsource and the qubit control generator to the corresponding frequency
frequency (option 2): set the qubit control generator (accounting for SSB) and the associated DCsource to the corresponding value
"""
if not isinstance(qubit, Channels.Qubit):
raise ValueError("Set DC bias for a qubit only")
if not qubit.bias_pairs:
Expand Down

0 comments on commit fb5643d

Please sign in to comment.