bbndb.qgl module¶
Channels is where we store information for mapping virtual (qubit) channel to real channels.
Created on Jan 19, 2012 in the QGL package
Original Author: Colm Ryan Modified By: Graham Rowlands (moved to bbndb using sqlalchemy)
Copyright 2013 Raytheon BBN Technologies
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-
class
bbndb.qgl.Attenuator(**kwargs)[source]¶ Bases:
bbndb.qgl.DatabaseItem,sqlalchemy.ext.declarative.api.Base-
address¶
-
channel_db_id¶
-
channels¶
-
id¶
-
label¶
-
model¶
-
standalone¶
-
-
class
bbndb.qgl.AttenuatorChannel(**kwargs)[source]¶ Bases:
bbndb.qgl.PhysicalChannel,bbndb.qgl.ChannelMixinPhysical Channel on an Attenutator
-
DCsource¶
-
DCsource_id¶
-
attenuation¶
-
attenuator¶
-
attenuator_id¶
-
channel¶
-
channel_db_id¶
-
delay¶
-
generator¶
-
generator_id¶
-
id¶
-
instrument¶
-
label¶
-
log_chan¶
-
receiver¶
-
receiver_id¶
-
sampling_rate¶
-
spectrumanalyzer¶
-
spectrumanalyzer_id¶
-
translator¶
-
transmitter¶
-
transmitter_id¶
-
type¶
-
-
class
bbndb.qgl.Channel(**kwargs)[source]¶ Bases:
sqlalchemy.ext.declarative.api.BaseEvery channel has a label and some printers.
-
channel_db_id¶
-
id¶
-
label¶
-
type¶
-
-
class
bbndb.qgl.ChannelDatabase(**kwargs)[source]¶ Bases:
sqlalchemy.ext.declarative.api.Base-
DCSources¶
-
attenuators¶
-
channels¶
-
generators¶
-
id¶
-
instruments¶
-
label¶
-
notes¶
-
processors¶
-
receivers¶
-
spectrum_analyzers¶
-
time¶
-
transceivers¶
-
transmitters¶
-
-
class
bbndb.qgl.ChannelMixin[source]¶ Bases:
object-
id= Column(None, Integer(), ForeignKey('channel.id'), table=None, primary_key=True, nullable=False)¶
-
-
class
bbndb.qgl.DCSource(**kwargs)[source]¶ Bases:
bbndb.qgl.DatabaseItem,sqlalchemy.ext.declarative.api.Base-
address¶
-
channel_db_id¶
-
id¶
-
label¶
-
level¶
-
mode¶
-
model¶
-
output¶
-
phys_chans¶
-
pump_source¶
-
standalone¶
-
-
class
bbndb.qgl.DatabaseItem[source]¶ Bases:
object-
channel_db_id= Column(None, Integer(), ForeignKey('channeldatabase.id'), table=None)¶
-
id= Column(None, Integer(), table=None, primary_key=True, nullable=False)¶
-
label= Column(None, String(), table=None, nullable=False)¶
-
standalone= Column(None, Boolean(), table=None, nullable=False, default=ColumnDefault(False))¶
-
-
class
bbndb.qgl.DigitalInput(**kwargs)[source]¶ Bases:
bbndb.qgl.PhysicalChannel,bbndb.qgl.ChannelMixinA digital input channel on a Processor.
-
DCsource¶
-
DCsource_id¶
-
channel¶
-
channel_db_id¶
-
delay¶
-
generator¶
-
generator_id¶
-
id¶
-
instrument¶
-
label¶
-
log_chan¶
-
meas_chan_id¶
-
processor¶
-
processor_id¶
-
receiver¶
-
receiver_id¶
-
sampling_rate¶
-
spectrumanalyzer¶
-
spectrumanalyzer_id¶
-
translator¶
-
transmitter¶
-
transmitter_id¶
-
type¶
-
-
class
bbndb.qgl.Edge(**kwargs)[source]¶ Bases:
bbndb.qgl.LogicalChannel,bbndb.qgl.ChannelMixinDefines an arc/directed edge between qubit vertices. If a device supports bi-directional connectivity, that is represented with two independent Edges.
An Edge is also effectively an abstract channel, so it carries the same properties as a Qubit channel.
-
channel_db_id¶
-
frequency¶
-
gate_chan¶
-
gate_chan_id¶
-
id¶
-
isforward(source, target)[source]¶ Test whether (source, target) matches the directionality of the edge.
-
label¶
-
phys_chan_id¶
-
pulse_params¶
-
source_id¶
-
target_id¶
-
type¶
-
-
class
bbndb.qgl.Generator(**kwargs)[source]¶ Bases:
bbndb.qgl.DatabaseItem,sqlalchemy.ext.declarative.api.Base-
DCsource_id¶
-
address¶
-
channel_db_id¶
-
frequency¶
-
id¶
-
label¶
-
model¶
-
phys_chans¶
-
power¶
-
reference¶
-
spectrumanalyzer_id¶
-
standalone¶
-
-
class
bbndb.qgl.Instrument(**kwargs)[source]¶ Bases:
bbndb.qgl.DatabaseItem,sqlalchemy.ext.declarative.api.Base-
address¶
-
channel_db_id¶
-
id¶
-
label¶
-
model¶
-
parameters¶
-
standalone¶
-
-
class
bbndb.qgl.LogicalChannel(**kwargs)[source]¶ Bases:
bbndb.qgl.ChannelMixin,bbndb.qgl.ChannelThe main class from which we will generate sequences. At some point it needs to be assigned to a physical channel.
frequency: modulation frequency of the channel (can be positive or negative)-
channel_db_id¶
-
frequency¶
-
gate_chan¶
-
gate_chan_id¶
-
id¶
-
label¶
-
phys_chan_id¶
-
pulse_params¶
-
type¶
-
-
class
bbndb.qgl.LogicalMarkerChannel(**kwargs)[source]¶ Bases:
bbndb.qgl.LogicalChannel,bbndb.qgl.ChannelMixinA class for digital channels for gating sources or triggering other things.
-
channel_db_id¶
-
frequency¶
-
gate_chan¶
-
gate_chan_id¶
-
id¶
-
label¶
-
meas_chan_id¶
-
phys_chan_id¶
-
pulse_params¶
-
type¶
-
-
class
bbndb.qgl.Measurement(**kwargs)[source]¶ Bases:
bbndb.qgl.LogicalChannel,bbndb.qgl.ChannelMixinA class for measurement channels. Measurements are special because they can be different types: autodyne which needs an IQ pair or hetero/homodyne which needs just a marker channel.
meas_type: Type of measurement (autodyne, homodyne) autodyne_freq: use to bake the modulation into the pulse, so that it has constant phase frequency: use to associate modulation with the channel-
autodyne_freq¶
-
channel_db_id¶
-
control_chan_id¶
-
frequency¶
-
gate_chan¶
-
gate_chan_id¶
-
id¶
-
label¶
-
meas_type¶
-
phys_chan_id¶
-
processor_chan¶
-
pulse_params¶
-
receiver_chan¶
-
trig_chan¶
-
type¶
-
-
class
bbndb.qgl.MutableDict[source]¶ Bases:
sqlalchemy.ext.mutable.Mutable,dict-
classmethod
coerce(key, value)[source]¶ Given a value, coerce it into the target type.
Can be overridden by custom subclasses to coerce incoming data into a particular type.
By default, raises
ValueError.This method is called in different scenarios depending on if the parent class is of type
Mutableor of typeMutableComposite. In the case of the former, it is called for both attribute-set operations as well as during ORM loading operations. For the latter, it is only called during attribute-set operations; the mechanics of thecomposite()construct handle coercion during load operations.Parameters: - key – string name of the ORM-mapped attribute being set.
- value – the incoming value.
Returns: the method should return the coerced value, or raise
ValueErrorif the coercion cannot be completed.
-
classmethod
-
class
bbndb.qgl.PhysicalChannel(**kwargs)[source]¶ Bases:
bbndb.qgl.ChannelMixin,bbndb.qgl.ChannelThe main class for actual Transmitter channels.
-
DCsource¶
-
DCsource_id¶
-
channel_db_id¶
-
delay¶
-
generator¶
-
generator_id¶
-
id¶
-
instrument¶
-
label¶
-
log_chan¶
-
receiver¶
-
receiver_id¶
-
sampling_rate¶
-
spectrumanalyzer¶
-
spectrumanalyzer_id¶
-
translator¶
-
transmitter¶
-
transmitter_id¶
-
type¶
-
-
class
bbndb.qgl.PhysicalMarkerChannel(**kwargs)[source]¶ Bases:
bbndb.qgl.PhysicalChannel,bbndb.qgl.ChannelMixin- A digital output channel on an Transmitter.
- gate_buffer: How much extra time should be added onto the beginning of a gating pulse gate_min_width: The minimum marker pulse width
-
DCsource¶
-
DCsource_id¶
-
channel¶
-
channel_db_id¶
-
delay¶
-
gate_buffer¶
-
gate_min_width¶
-
generator¶
-
generator_id¶
-
id¶
-
instrument¶
-
label¶
-
log_chan¶
-
receiver¶
-
receiver_id¶
-
sampling_rate¶
-
sequence_file¶
-
spectrumanalyzer¶
-
spectrumanalyzer_id¶
-
translator¶
-
transmitter¶
-
transmitter_id¶
-
type¶
-
class
bbndb.qgl.PhysicalQuadratureChannel(**kwargs)[source]¶ Bases:
bbndb.qgl.PhysicalChannel,bbndb.qgl.ChannelMixinSomething used to implement a standard qubit channel with two analog channels and a microwave gating channel.
-
DCsource¶
-
DCsource_id¶
-
I_channel_amp_factor¶
-
I_channel_offset¶
-
Q_channel_amp_factor¶
-
Q_channel_offset¶
-
amp_factor¶
-
attenuation¶
-
channel¶
-
channel_db_id¶
-
delay¶
-
generator¶
-
generator_id¶
-
id¶
-
instrument¶
-
label¶
-
log_chan¶
-
phase_skew¶
-
receiver¶
-
receiver_id¶
-
sampling_rate¶
-
sequence_file¶
-
spectrumanalyzer¶
-
spectrumanalyzer_id¶
-
translator¶
-
transmitter¶
-
transmitter_id¶
-
type¶
-
-
class
bbndb.qgl.Processor(**kwargs)[source]¶ Bases:
bbndb.qgl.DatabaseItem,sqlalchemy.ext.declarative.api.BaseA hardware unit used for signal processing, e.g. a TDM model: currently TDM is the only supported model address: instrument address (string) master: true if trigger master (boolean) trigger_interval: (s) trigger_source: internal / external (string) channels: digital inputs (typically carrying the results of qubit state assignment). Used to map meas. results into memory (see QGL.PulsePrimitives.MEASA)
-
address¶
-
channel_db_id¶
-
channels¶
-
id¶
-
label¶
-
master¶
-
model¶
-
standalone¶
-
transceiver_id¶
-
trigger_interval¶
-
trigger_source¶
-
-
class
bbndb.qgl.Qubit(**kwargs)[source]¶ Bases:
bbndb.qgl.LogicalChannel,bbndb.qgl.ChannelMixin- The main class for generating qubit pulses. Effectively a logical “QuadratureChannel”.
- frequency: modulation frequency of the channel (can be positive or negative)
-
channel_db_id¶
-
edge_source¶
-
edge_target¶
-
frequency¶
-
gate_chan¶
-
gate_chan_id¶
-
id¶
-
label¶
-
measure_chan¶
-
phys_chan_id¶
-
pulse_params¶
-
type¶
-
class
bbndb.qgl.Receiver(**kwargs)[source]¶ Bases:
bbndb.qgl.DatabaseItem,sqlalchemy.ext.declarative.api.BaseA receiver , or generally an analog to digitial converter
-
acquire_mode¶
-
address¶
-
channel_db_id¶
-
channels¶
-
id¶
-
label¶
-
model¶
-
number_averages¶
-
number_segments¶
-
number_waveforms¶
-
record_length¶
-
reference¶
-
sampling_rate¶
-
standalone¶
-
stream_sel¶
-
stream_types¶
-
transceiver_id¶
-
trigger_source¶
-
vertical_scale¶
-
-
class
bbndb.qgl.ReceiverChannel(**kwargs)[source]¶ Bases:
bbndb.qgl.PhysicalChannel,bbndb.qgl.ChannelMixinReceiverChannel denotes the physical receive channel on a transceiver. The actual stream type, and the dsp stream id, are handled by the pipeline.
-
DCsource¶
-
DCsource_id¶
-
channel¶
-
channel_db_id¶
-
delay¶
-
generator¶
-
generator_id¶
-
id¶
-
instrument¶
-
label¶
-
log_chan¶
-
receiver¶
-
receiver_id¶
-
sampling_rate¶
-
spectrumanalyzer¶
-
spectrumanalyzer_id¶
-
translator¶
-
transmitter¶
-
transmitter_id¶
-
triggering_chan_id¶
-
type¶
-
-
class
bbndb.qgl.SpectrumAnalyzer(**kwargs)[source]¶ Bases:
bbndb.qgl.DatabaseItem,sqlalchemy.ext.declarative.api.Base-
LO_source¶
-
address¶
-
channel_db_id¶
-
id¶
-
label¶
-
model¶
-
phys_chans¶
-
standalone¶
-
-
class
bbndb.qgl.Transceiver(**kwargs)[source]¶ Bases:
bbndb.qgl.DatabaseItem,sqlalchemy.ext.declarative.api.BaseA single machine or rack of a2ds and d2as that we want to treat as a unit.
-
address¶
-
channel_db_id¶
-
id¶
-
initialize_separately¶
-
label¶
-
master¶
-
model¶
-
processors¶
-
receivers¶
-
standalone¶
-
transmitters¶
-
-
class
bbndb.qgl.Transmitter(**kwargs)[source]¶ Bases:
bbndb.qgl.DatabaseItem,sqlalchemy.ext.declarative.api.BaseAn arbitrary waveform generator, or generally a digital to analog converter
-
address¶
-
channel_db_id¶
-
channels¶
-
delay¶
-
id¶
-
label¶
-
master¶
-
model¶
-
sequence_file¶
-
standalone¶
-
transceiver_id¶
-
trigger_interval¶
-
trigger_source¶
-