example_channel_library


Channel library

This code to generate a sample channel library and stores it in the database example.sqlite. This channel library is used in the examples in this directory. See Auspex example notebooks for documentation.


In [ ]:
from QGL import *

cl = ChannelLibrary(db_resource_name="./example.sqlite")
q1 = cl.new_qubit("q1")
q2 = cl.new_qubit("q2")
CNOT12 = cl.new_edge(q1, q2)
aps2_1 = cl.new_APS2("BBNAPS1", address="192.168.5.101") 
aps2_2 = cl.new_APS2("BBNAPS2", address="192.168.5.102")
aps2_3 = cl.new_APS2("BBNAPS3", address="192.168.5.103") 
aps2_4 = cl.new_APS2("BBNAPS4", address="192.168.5.104")
dig_1  = cl.new_X6("X6_1", address=0)
h1 = cl.new_source("Holz1", "HolzworthHS9000", "HS9004A-009-1", power=-30)
h2 = cl.new_source("Holz2", "HolzworthHS9000", "HS9004A-009-2", power=-30) 
cl.set_control(q1, aps2_1, generator=h1)
cl.set_measure(q1, aps2_2, dig_1.ch(1), generator=h2)
cl.set_control(q2, aps2_3, generator=h1)
cl.set_measure(q2, aps2_4, dig_1.ch(2), generator=h2)
cl.set_master(aps2_1, aps2_1.ch("m2"))
cl.set_control(CNOT12, aps2_1, generator=h1)
cl["q1"].measure_chan.frequency = 0e6
cl.commit()

In [ ]: