Skip to content

Commit

Permalink
Merge pull request #574 from qiboteam/add_twpa_dummy
Browse files Browse the repository at this point in the history
Add TWPA to dummy platform
  • Loading branch information
Edoardo-Pedicillo authored Sep 5, 2023
2 parents 522ee54 + 0807f1d commit 20c61f7
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/qibolab/dummy.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from qibolab.channels import Channel, ChannelMap
from qibolab.instruments.dummy import DummyInstrument
from qibolab.instruments.oscillator import LocalOscillator
from qibolab.platform import Platform
from qibolab.serialize import load_qubits, load_settings

Expand Down Expand Up @@ -206,13 +207,20 @@ def create_dummy():
# Create dummy controller
instrument = DummyInstrument(NAME, 0)

# Create local oscillator
twpa_pump = LocalOscillator(name="twpa_pump", address=0)
twpa_pump.frequency = 1e9
twpa_pump.power = 10

# Create channel objects
nqubits = RUNCARD["nqubits"]
channels = ChannelMap()
channels |= Channel("readout", port=instrument["readout"])
channels |= (Channel(f"drive-{i}", port=instrument[f"drive-{i}"]) for i in range(nqubits))
channels |= (Channel(f"flux-{i}", port=instrument[f"flux-{i}"]) for i in range(nqubits))
channels |= Channel("twpa", port=None)
channels["readout"].attenuation = 0
channels["twpa"].local_oscillator = twpa_pump

qubits, pairs = load_qubits(RUNCARD)
settings = load_settings(RUNCARD)
Expand All @@ -222,7 +230,8 @@ def create_dummy():
qubit.readout = channels["readout"]
qubit.drive = channels[f"drive-{q}"]
qubit.flux = channels[f"flux-{q}"]
qubit.twpa = channels["twpa"]

instruments = {instrument.name: instrument}
instruments = {instrument.name: instrument, twpa_pump.name: twpa_pump}
instrument.sampling_rate = settings.sampling_rate * 1e-9
return Platform(NAME, qubits, pairs, instruments, settings, resonator_type="2D")

0 comments on commit 20c61f7

Please sign in to comment.