diff --git a/iqm5q/parameters.json b/iqm5q/parameters.json index 5814d6a2..0e616b58 100644 --- a/iqm5q/parameters.json +++ b/iqm5q/parameters.json @@ -1,417 +1,548 @@ { -"nqubits": 5, -"description": "IQM 5-qubit device, controlled with Zurich Instruments.", -"settings": { -"nshots": 4096, -"relaxation_time": 300000 -}, -"qubits": [ -0, -1, -2, -3, -4 -], -"couplers": [ -0, -1, -3, -4 -], -"topology": { -"0": [ - 0, - 2 -], -"1": [ - 1, - 2 -], -"3": [ - 2, - 3 -], -"4": [ - 2, - 4 -] -}, -"instruments": { -"lo_readout": { - "frequency": 5500000000 -}, -"lo_drive_0": { - "frequency": 4200000000 -}, -"lo_drive_1": { - "frequency": 4600000000 -}, -"lo_drive_2": { - "frequency": 4800000000 -}, -"TWPA": { - "frequency": 6710200000, - "power": -5.7 -} -}, -"native_gates": { -"single_qubit": { - "0": { - "RX": { - "duration": 40, - "amplitude": 0.62, - "frequency": 4095140800, - "shape": "Gaussian(5)", - "type": "qd", - "relative_start": 0, - "phase": 0 + "nqubits": 5, + "description": "IQM 5-qubit device, controlled with Zurich Instruments.", + "settings": { + "nshots": 4096, + "relaxation_time": 300000 + }, + "qubits": [ + 0, + 1, + 2, + 3, + 4 + ], + "couplers": [ + 0, + 1, + 3, + 4 + ], + "topology": { + "0": [ + 0, + 2 + ], + "1": [ + 1, + 2 + ], + "3": [ + 2, + 3 + ], + "4": [ + 2, + 4 + ] + }, + "instruments": { + "EL_ZURO": { + "bounds": { + "waveforms": 40000, + "readout": 250, + "instructions": 1000000 + } }, - "MZ": { - "duration": 2000, - "amplitude": 0.1, - "frequency": 5227920060, - "shape": "Rectangular()", - "type": "ro", - "relative_start": 0, - "phase": 0 + "TWPA_PUMP": { + "frequency": 6710000000, + "power": -4 } }, - "1": { - "RX": { - "duration": 40, - "amplitude": 0.936, + "channels": { + "qubit_0/drive": { + "frequency": 4095140800, + "lo_config": { + "frequency": 4200000000, + "power": null + }, + "mixer_config": null, + "power_range": -10 + }, + "qubit_1/drive": { "frequency": 4241884701, - "shape": "Gaussian(5)", - "type": "qd", - "relative_start": 0, - "phase": 0 + "lo_config": { + "frequency": 4200000000, + "power": null + }, + "mixer_config": null, + "power_range": -5 }, - "MZ": { - "duration": 2000, - "amplitude": 0.1, - "frequency": 4932107000, - "shape": "Rectangular()", - "type": "ro", - "relative_start": 0, - "phase": 0 - } - }, - "2": { - "RX": { - "duration": 40, - "amplitude": 0.42, + "qubit_2/drive": { "frequency": 4539550000, - "shape": "Gaussian(5)", - "type": "qd", - "relative_start": 0, - "phase": 0 + "lo_config": { + "frequency": 4600000000, + "power": null + }, + "mixer_config": null, + "power_range": -10 }, - "MZ": { - "duration": 2000, - "amplitude": 0.2, - "frequency": 6085941000, - "shape": "Rectangular()", - "type": "ro", - "relative_start": 0, - "phase": 0 - } - }, - "3": { - "RX": { - "duration": 40, - "amplitude": 0.6, + "qubit_3/drive": { "frequency": 4168624000, - "shape": "Gaussian(5)", - "type": "qd", - "relative_start": 0, - "phase": 0 + "lo_config": { + "frequency": 4600000000, + "power": null + }, + "mixer_config": null, + "power_range": -5 }, - "MZ": { - "duration": 2000, - "amplitude": 0.6, - "frequency": 5778270000, - "shape": "Rectangular()", - "type": "ro", - "relative_start": 0, - "phase": 0 - } - }, - "4": { - "RX": { - "duration": 40, - "amplitude": 0.6, + "qubit_4/drive": { "frequency": 4353464450, - "shape": "Gaussian(5)", - "type": "qd", - "relative_start": 0, - "phase": 0 + "lo_config": { + "frequency": 4800000000, + "power": null + }, + "mixer_config": null, + "power_range": -10 + }, + "qubit_0/flux": { + "offset": -0.15, + "power_range": 0.8 + }, + "qubit_1/flux": { + "offset": 0.0, + "power_range": 0.8 + }, + "qubit_2/flux": { + "offset": 0.015, + "power_range": 0.8 }, - "MZ": { - "duration": 2000, - "amplitude": 0.08, + "qubit_3/flux": { + "offset": 0.0, + "power_range": 0.8 + }, + "qubit_4/flux": { + "offset": -0.025, + "power_range": 0.8 + }, + "qubit_0/measure": { + "frequency": 5227920060, + "lo_config": { + "frequency": 5500000000, + "power": null + }, + "mixer_config": null, + "power_range": -15 + }, + "qubit_1/measure": { + "frequency": 4932107000, + "lo_config": { + "frequency": 5500000000, + "power": null + }, + "mixer_config": null, + "power_range": -15 + }, + "qubit_2/measure": { + "frequency": 6085941000, + "lo_config": { + "frequency": 5500000000, + "power": null + }, + "mixer_config": null, + "power_range": -15 + }, + "qubit_3/measure": { + "frequency": 5778270000, + "lo_config": { + "frequency": 5500000000, + "power": null + }, + "mixer_config": null, + "power_range": -15 + }, + "qubit_4/measure": { "frequency": 5514950000, - "shape": "Rectangular()", - "type": "ro", - "relative_start": 0, - "phase": 0 - } - } -}, -"coupler": { - "0": { - "CP": { - "type": "coupler", - "duration": 1000, - "amplitude": 0.5, - "shape": "Rectangular()", - "coupler": 0, - "relative_start": 0 - } - }, - "1": { - "CP": { - "type": "coupler", - "duration": 1000, - "amplitude": 0.5, - "shape": "Rectangular()", - "coupler": 1, - "relative_start": 0 - } - }, - "3": { - "CP": { - "type": "coupler", - "duration": 1000, - "amplitude": 0.5, - "shape": "Rectangular()", - "coupler": 3, - "relative_start": 0 + "lo_config": { + "frequency": 5500000000, + "power": null + }, + "mixer_config": null, + "power_range": -15 + }, + "qubit_0/acquire": { + "type": "AcquisitionType.INTEGRATION", + "power_range": 10 + }, + "qubit_1/acquire": { + "type": "AcquisitionType.INTEGRATION", + "power_range": 10 + }, + "qubit_2/acquire": { + "type": "AcquisitionType.INTEGRATION", + "power_range": 10 + }, + "qubit_3/acquire": { + "type": "AcquisitionType.INTEGRATION", + "power_range": 10 + }, + "qubit_4/acquire": { + "type": "AcquisitionType.INTEGRATION", + "power_range": 10 + }, + "coupler_0/flux": { + "offset": 0.0, + "power_range": 0.8 + }, + "coupler_1/flux": { + "offset": 0.0, + "power_range": 0.8 + }, + "coupler_3/flux": { + "offset": 0.0, + "power_range": 0.8 + }, + "coupler_4/flux": { + "offset": 0.0, + "power_range": 0.8 } }, - "4": { - "CP": { - "type": "coupler", - "duration": 1000, - "amplitude": 0.5, - "shape": "Rectangular()", - "coupler": 4, - "relative_start": 0 - } - } -}, -"two_qubit": { - "0-2": { - "CZ": [ - { - "duration": 30, - "amplitude": 0.6025, - "shape": "Rectangular()", - "qubit": 2, - "relative_start": 0, - "type": "qf" + "native_gates": { + "single_qubit": { + "0": { + "RX": { + "duration": 40, + "amplitude": 0.62, + "frequency": 4095140800, + "envelope": { "kind": "gaussian", "rel_sigma": 5.0 }, + "type": "qd" + }, + "MZ": { + "duration": 2000, + "amplitude": 0.1, + "frequency": 5227920060, + "envelope": { "kind": "rectangular" }, + "type": "ro" + } + }, + "1": { + "RX": { + "duration": 40, + "amplitude": 0.6, + "frequency": 4252836000, + "envelope": { "kind": "gaussian", "rel_sigma": 5.0 }, + "type": "qd" + }, + "MZ": { + "duration": 2000, + "amplitude": 0.09, + "frequency": 4933092000, + "envelope": { "kind": "rectangular" }, + "type": "ro" + } }, - { - "type": "virtual_z", - "phase": -1, - "qubit": 0 + "2": { + "RX": { + "duration": 40, + "amplitude": 0.42, + "frequency": 4539550000, + "envelope": { "kind": "gaussian", "rel_sigma": 5.0 }, + "type": "qd" + }, + "MZ": { + "duration": 2000, + "amplitude": 0.2, + "frequency": 6085941000, + "envelope": { "kind": "rectangular" }, + "type": "ro" + } }, - { - "type": "virtual_z", - "phase": -3, - "qubit": 2 + "3": { + "RX": { + "duration": 40, + "amplitude": 0.6, + "frequency": 4168624000, + "envelope": { "kind": "gaussian", "rel_sigma": 5.0 }, + "type": "qd" + }, + "MZ": { + "duration": 2000, + "amplitude": 0.6, + "frequency": 5778270000, + "envelope": { "kind": "rectangular" }, + "type": "ro" + } }, - { - "type": "coupler", - "duration": 50, - "amplitude": 0.8, - "shape": "Rectangular()", - "coupler": 0, - "relative_start": 0 + "4": { + "RX": { + "duration": 40, + "amplitude": 0.6, + "frequency": 4353464450, + "envelope": { "kind": "gaussian", "rel_sigma": 5.0 }, + "type": "qd" + }, + "MZ": { + "duration": 2000, + "amplitude": 0.08, + "frequency": 5514950000, + "envelope": { "kind": "rectangular" }, + "type": "ro" + } } - ] - }, - "1-2": { - "CZ": [ - { - "duration": 30, - "amplitude": 0.6025, - "shape": "Rectangular()", - "qubit": 2, - "relative_start": 0, - "type": "qf" + }, + "coupler": { + "0": { + "CP": { + "type": "cf", + "duration": 1000, + "amplitude": 0.5, + "envelope": { "kind": "rectangular" }, + "coupler": 0 + } }, - { - "type": "virtual_z", - "phase": -1, - "qubit": 1 + "1": { + "CP": { + "type": "cf", + "duration": 1000, + "amplitude": 0.5, + "envelope": { "kind": "rectangular" }, + "coupler": 1 + } }, - { - "type": "virtual_z", - "phase": -3, - "qubit": 2 + "3": { + "CP": { + "type": "cf", + "duration": 1000, + "amplitude": 0.5, + "envelope": { "kind": "rectangular" }, + "coupler": 3 + } }, - { - "type": "coupler", - "duration": 40, - "amplitude": 0.1, - "shape": "Rectangular()", - "coupler": 1, - "relative_start": 0 + "4": { + "CP": { + "type": "cf", + "duration": 1000, + "amplitude": 0.5, + "envelope": { "kind": "rectangular" }, + "coupler": 4 + } } - ] - } -} -}, -"characterization": { -"single_qubit": { - "0": { - "bare_resonator_frequency": 5225320060, - "readout_frequency": 5227920060, - "drive_frequency": 4095140800, - "anharmonicity": 217492000, - "Ec": 0, - "g": 0, - "asymmetry": 0.0, - "assignment_fidelity": 0.884, - "sweetspot": -0.15, - "peak_voltage": 0, - "pi_pulse_amplitude": 0.924, - "T1": 11961, - "T2": 0.0, - "T2_spin_echo": 0, - "state0_voltage": 0, - "state1_voltage": 0, - "mean_gnd_states": [ - -0.0051689363924847615, - 0.06828212233945871 - ], - "mean_exc_states": [ - -0.773457961897901, - -0.44969928873718545 - ], - "threshold": 0.501546, - "iq_angle": 2.672 }, - "1": { - "bare_resonator_frequency": 4923107000, - "readout_frequency": 4932107000, - "drive_frequency": 4241884701, - "anharmonicity": 0, - "Ec": 0, - "g": 0, - "asymmetry": 0.0, - "assignment_fidelity": 0.865, - "sweetspot": 0.0, - "peak_voltage": 0, - "pi_pulse_amplitude": 0.985, - "T1": 11491, - "T2": 0.0, - "T2_spin_echo": 0, - "state0_voltage": 0, - "state1_voltage": 0, - "mean_gnd_states": [ - 1.5300999632978378, - -1.7864620560039184 - ], - "mean_exc_states": [ - -3.7071945265824735, - -9.35587044417559 - ], - "threshold": 3.9350260175625893, - "iq_angle": 2.176067198433465 - }, - "2": { - "bare_resonator_frequency": 6163447000, - "readout_frequency": 6085941000, - "drive_frequency": 4539550000, - "anharmonicity": 211604296, - "Ec": 0, - "g": 0, - "asymmetry": 0.0, - "assignment_fidelity": 0.799, - "sweetspot": 0.015, - "T1": 8343, - "T2": 0.0, - "T2_spin_echo": 0, - "state0_voltage": 0, - "state1_voltage": 0, - "mean_gnd_states": [ - 0.1741377634001174, - 0.2917017948399187 - ], - "mean_exc_states": [ - -1.644348910967934, - 0.5699327364542519 - ], - "threshold": 0.6334573745826475, - "iq_angle": -2.9897686869193305 - }, - "3": { - "bare_resonator_frequency": 5773100000, - "readout_frequency": 5778270000, - "drive_frequency": 4168624000, - "anharmonicity": 214000000, - "Ec": 0, - "g": 0, - "asymmetry": 0.0, - "assignment_fidelity": 0.887, - "sweetspot": 0.0, - "T1": 10490, - "T2": 0.0, - "T2_spin_echo": 0, - "state0_voltage": 0, - "state1_voltage": 0, - "mean_gnd_states": [ - -1.5157013000200312, - 3.600143370559288 - ], - "mean_exc_states": [ - -0.8186923372721429, - -2.1199756256035918 - ], - "threshold": -3.295590970178259, - "iq_angle": 1.449541916726749 - }, - "4": { - "bare_resonator_frequency": 5504700000, - "readout_frequency": 5514950000, - "drive_frequency": 4353464450, - "anharmonicity": 0, - "Ec": 0, - "g": 0, - "asymmetry": 0.0, - "assignment_fidelity": 0.967, - "T1": 9891, - "T2": 0.0, - "sweetspot": -0.025, - "T2_spin_echo": 0, - "state0_voltage": 0, - "state1_voltage": 0, - "mean_gnd_states": [ - 0.5710573755325768, - -0.1332288824165712 - ], - "mean_exc_states": [ - 15.22772730837784, - -2.1649515770198255 - ], - "threshold": 1.7944859713165011, - "iq_angle": 0.1377432252403901 - } -}, -"coupler": { - "0": { - "sweetspot": 0.0 - }, - "1": { - "sweetspot": 0.0 - }, - "3": { - "sweetspot": 0.0 + "two_qubit": { + "0-2": { + "CZ": { + "coupler_0/flux": [ + { + "type": "cf", + "duration": 50, + "amplitude": 0.8, + "envelope": { "kind": "rectangular" }, + "coupler": 0 + } + ], + "qubit_2/flux": [ + { + "duration": 30, + "amplitude": 0.6025, + "envelope": { "kind": "rectangular" }, + "qubit": 2, + "type": "qf" + } + ], + "qubit_0/drive": [ + { + "type": "vz", + "phase": -1, + "qubit": 0 + } + ], + "qubit_2/drive": [ + { + "type": "vz", + "phase": -3, + "qubit": 2 + } + ] + } + }, + "1-2": { + "CZ":{ + "coupler_1/flux": [ + { + "type": "cf", + "duration": 40, + "amplitude": 0.1, + "envelope": { "kind": "rectangular"}, + "coupler": 1 + } + ], + "qubit_2/flux": [ + { + "duration": 30, + "amplitude": 0.6025, + "envelope": { "kind": "rectangular" }, + "qubit": 2, + "type": "qf" + } + ], + "qubit_1/drive": [ + { + "type": "vz", + "phase": -1, + "qubit": 1 + } + ], + "qubit_2/drive": [ + { + "type": "vz", + "phase": -3, + "qubit": 2 + } + ] + } + } + } }, - "4": { - "sweetspot": 0.0 + "characterization": { + "single_qubit": { + "0": { + "bare_resonator_frequency": 5225320060, + "readout_frequency": 5227920060, + "drive_frequency": 4095140800, + "anharmonicity": 217492000, + "Ec": 0, + "g": 0, + "asymmetry": 0.0, + "assignment_fidelity": 0.884, + "sweetspot": -0.15, + "peak_voltage": 0, + "pi_pulse_amplitude": 0.924, + "T1": 11961, + "T2": 0.0, + "T2_spin_echo": 0, + "state0_voltage": 0, + "state1_voltage": 0, + "mean_gnd_states": [ + -0.0051689363924847615, + 0.06828212233945871 + ], + "mean_exc_states": [ + -0.773457961897901, + -0.44969928873718545 + ], + "threshold": 0.501546, + "iq_angle": 2.672 + }, + "1": { + "bare_resonator_frequency": 4923107000, + "readout_frequency": 4932107000, + "drive_frequency": 4241884701, + "anharmonicity": 0, + "Ec": 0, + "g": 0, + "asymmetry": 0.0, + "assignment_fidelity": 0.865, + "sweetspot": 0.0, + "peak_voltage": 0, + "pi_pulse_amplitude": 0.985, + "T1": 11491, + "T2": 0.0, + "T2_spin_echo": 0, + "state0_voltage": 0, + "state1_voltage": 0, + "mean_gnd_states": [ + 1.5300999632978378, + -1.7864620560039184 + ], + "mean_exc_states": [ + -3.7071945265824735, + -9.35587044417559 + ], + "threshold": 3.9350260175625893, + "iq_angle": 2.176067198433465 + }, + "2": { + "bare_resonator_frequency": 6163447000, + "readout_frequency": 6085941000, + "drive_frequency": 4539550000, + "anharmonicity": 211604296, + "Ec": 0, + "g": 0, + "asymmetry": 0.0, + "assignment_fidelity": 0.799, + "sweetspot": 0.015, + "T1": 8343, + "T2": 0.0, + "T2_spin_echo": 0, + "state0_voltage": 0, + "state1_voltage": 0, + "mean_gnd_states": [ + 0.1741377634001174, + 0.2917017948399187 + ], + "mean_exc_states": [ + -1.644348910967934, + 0.5699327364542519 + ], + "threshold": 0.6334573745826475, + "iq_angle": -2.9897686869193305 + }, + "3": { + "bare_resonator_frequency": 5773100000, + "readout_frequency": 5778270000, + "drive_frequency": 4168624000, + "anharmonicity": 214000000, + "Ec": 0, + "g": 0, + "asymmetry": 0.0, + "assignment_fidelity": 0.887, + "sweetspot": 0.0, + "T1": 10490, + "T2": 0.0, + "T2_spin_echo": 0, + "state0_voltage": 0, + "state1_voltage": 0, + "mean_gnd_states": [ + -1.5157013000200312, + 3.600143370559288 + ], + "mean_exc_states": [ + -0.8186923372721429, + -2.1199756256035918 + ], + "threshold": -3.295590970178259, + "iq_angle": 1.449541916726749 + }, + "4": { + "bare_resonator_frequency": 5504700000, + "readout_frequency": 5514950000, + "drive_frequency": 4353464450, + "anharmonicity": 0, + "Ec": 0, + "g": 0, + "asymmetry": 0.0, + "assignment_fidelity": 0.967, + "T1": 9891, + "T2": 0.0, + "sweetspot": -0.025, + "T2_spin_echo": 0, + "state0_voltage": 0, + "state1_voltage": 0, + "mean_gnd_states": [ + 0.5710573755325768, + -0.1332288824165712 + ], + "mean_exc_states": [ + 15.22772730837784, + -2.1649515770198255 + ], + "threshold": 1.7944859713165011, + "iq_angle": 0.1377432252403901 + } + }, + "coupler": { + "0": { + "sweetspot": 0.0 + }, + "1": { + "sweetspot": 0.0 + }, + "3": { + "sweetspot": 0.0 + }, + "4": { + "sweetspot": 0.0 + } + } } } -} -} diff --git a/iqm5q/platform.py b/iqm5q/platform.py index 72d534f1..4d1a0bee 100644 --- a/iqm5q/platform.py +++ b/iqm5q/platform.py @@ -5,12 +5,18 @@ from laboneq.dsl.device.instruments import HDAWG, PQSC, SHFQC from laboneq.simple import DeviceSetup from qibolab import Platform -from qibolab.channels import Channel, ChannelMap -from qibolab.instruments.dummy import DummyLocalOscillator from qibolab.instruments.rohde_schwarz import SGS100A -from qibolab.instruments.zhinst import Zurich +from qibolab.instruments.zhinst import ( + ZIAcquisitionChannel, + ZIChannel, + Zurich, + ZurichAcquisitionChannelConfig, + ZurichDCChannelConfig, + ZurichIQChannelConfig, +) from qibolab.kernels import Kernels from qibolab.serialize import ( + load_channel_configs, load_instrument_settings, load_qubits, load_runcard, @@ -22,14 +28,11 @@ TWPA_ADDRESS = "192.168.0.35" N_QUBITS = 5 +N_COUPLERS = 4 def create(): - """IQM 5q-chip controlled Zurich Instruments (Zh) SHFQC, HDAWGs and PQSC. - - Args: - runcard_path (str): Path to the runcard file. - """ + """IQM 5q-chip controlled Zurich Instruments SHFQC, HDAWGs and PQSC.""" device_setup = DeviceSetup("EL_ZURO") # Dataserver @@ -41,43 +44,6 @@ def create(): PQSC("device_pqsc", address="DEV10055", reference_clock_source="internal"), SHFQC("device_shfqc", address="DEV12146"), ) - device_setup.add_connections( - "device_shfqc", - *[ - create_connection( - to_signal=f"q{i}/drive_line", ports=[f"SGCHANNELS/{i}/OUTPUT"] - ) - for i in range(N_QUBITS) - ], - *[ - create_connection( - to_signal=f"q{i}/measure_line", ports=["QACHANNELS/0/OUTPUT"] - ) - for i in range(N_QUBITS) - ], - *[ - create_connection( - to_signal=f"q{i}/acquire_line", ports=["QACHANNELS/0/INPUT"] - ) - for i in range(N_QUBITS) - ], - ) - device_setup.add_connections( - "device_hdawg", - *[ - create_connection(to_signal=f"q{i}/flux_line", ports=f"SIGOUTS/{i}") - for i in range(N_QUBITS) - ], - *[ - create_connection(to_signal=f"qc{c}/flux_line", ports=f"SIGOUTS/{i}") - for c, i in zip(itertools.chain(range(0, 2), range(3, 4)), range(5, 8)) - ], - ) - - device_setup.add_connections( - "device_hdawg2", - create_connection(to_signal="qc4/flux_line", ports=["SIGOUTS/0"]), - ) device_setup.add_connections( "device_pqsc", @@ -86,119 +52,75 @@ def create(): create_connection(to_instrument="device_shfqc", ports="ZSYNCS/2"), ) + runcard = load_runcard(FOLDER) + kernels = Kernels.load(FOLDER) + qubits, couplers, pairs = load_qubits(runcard, kernels) + channel_configs = load_channel_configs(runcard) + settings = load_settings(runcard) + + zi_channels = [] + for q in range(N_QUBITS): + # acquisition. wire "L2-7" + qubits[q].acquisition = ZIAcquisitionChannel( + f"qubit_{q}/acquire", + ZurichAcquisitionChannelConfig(**channel_configs[f"qubit_{q}/acquire"]), + "device_shfqc", + "QACHANNELS/0/INPUT", + ) + zi_channels.append(qubits[q].acquisition) + # readout. wire "L3-31" + qubits[q].readout = ZIChannel( + f"qubit_{q}/measure", + ZurichIQChannelConfig(**channel_configs[f"qubit_{q}/measure"]), + "device_shfqc", + "QACHANNELS/0/OUTPUT", + ) + zi_channels.append(qubits[q].readout) + # drive. wire f"L4-{15+q}" + qubits[q].drive = ZIChannel( + f"qubit_{q}/drive", + ZurichIQChannelConfig(**channel_configs[f"qubit_{q}/drive"]), + "device_shfqc", + f"SGCHANNELS/{q}/OUTPUT", + ) + zi_channels.append(qubits[q].drive) + # flux qubits. wire f"L4-{6+q}" + qubits[q].flux = ZIChannel( + f"qubit_{q}/flux", + ZurichDCChannelConfig(**channel_configs[f"qubit_{q}/flux"]), + "device_hdawg", + f"SIGOUTS/{q}", + ) + zi_channels.append(qubits[q].flux) + + # coupler flux. wires f"L4-{i}" for i in range(11, 15) + for c, i in zip(itertools.chain(range(0, 2), range(3, 4)), range(5, 8)): + couplers[c].flux = ZIChannel( + f"coupler_{c}/flux", + ZurichDCChannelConfig(**channel_configs[f"coupler_{c}/flux"]), + "device_hdawg", + f"SIGOUTS/{i}", + ) + zi_channels.append(couplers[c].flux) + couplers[4].flux = ZIChannel( + "coupler_4/flux", + ZurichDCChannelConfig(**channel_configs["coupler_4/flux"]), + "device_hdawg2", + "SIGOUTS/0", + ) + zi_channels.append(couplers[4].flux) + controller = Zurich( "EL_ZURO", device_setup=device_setup, + channels=zi_channels, time_of_flight=75, smearing=50, ) - # Create channel objects and map controllers - channels = ChannelMap() - # feedback - channels |= Channel( - "L2-7", port=controller.ports(("device_shfqc", "[QACHANNELS/0/INPUT]")) - ) - # readout - channels |= Channel( - "L3-31", port=controller.ports(("device_shfqc", "[QACHANNELS/0/OUTPUT]")) - ) - # drive - channels |= ( - Channel( - f"L4-{i}", - port=controller.ports(("device_shfqc", f"SGCHANNELS/{i-5}/OUTPUT")), - ) - for i in range(15, 20) - ) - # flux qubits (CAREFUL WITH THIS !!!) - channels |= ( - Channel(f"L4-{i}", port=controller.ports(("device_hdawg", f"SIGOUTS/{i-6}"))) - for i in range(6, 11) - ) - # flux couplers - channels |= ( - Channel(f"L4-{i}", port=controller.ports(("device_hdawg", f"SIGOUTS/{i-11+5}"))) - for i in range(11, 14) - ) - channels |= Channel("L4-14", port=controller.ports(("device_hdawg2", "SIGOUTS/0"))) - # TWPA pump(EraSynth) - channels |= Channel("L3-32") - - # SHFQC - # Sets the maximal Range of the Signal Output power. - # The instrument selects the closest available Range [-50. -30. -25. -20. -15. -10. -5. 0. 5. 10.] - # with a resolution of 5 dBm. - - # WE DON'T WANT BIG NUMBERS HERE AT THE EXPENSE OF AMPLITUDES IN THE ORDER 10-2 !!! - - # readout "gain": Set to max power range (10 Dbm) if no distorsion - channels["L3-31"].power_range = -15 # -15 - # feedback "gain": play with the power range to calibrate the best RO - channels["L2-7"].power_range = 10 - - # drive - # The instrument selects the closest available Range [-30. -25. -20. -15. -10. -5. 0. 5. 10.] - channels["L4-15"].power_range = -10 # q0 - channels["L4-16"].power_range = -5 # q1 - channels["L4-17"].power_range = -10 # q2 - channels["L4-18"].power_range = -5 # q3 - channels["L4-19"].power_range = -10 # q4 - - # HDAWGS - # Sets the output voltage range. - # The instrument selects the next higher available Range with a resolution of 0.4 Volts. - - # flux - for i in range(6, 11): - channels[f"L4-{i}"].power_range = 0.8 - # flux couplers - for i in range(11, 15): - channels[f"L4-{i}"].power_range = 0.8 - - # Instantiate local oscillators - local_oscillators = [ - DummyLocalOscillator(f"lo_{kind}", None) - for kind in ["readout"] + [f"drive_{n}" for n in range(3)] - ] - - local_oscillators.append(SGS100A("TWPA", TWPA_ADDRESS)) - - # Map LOs to channels - ch_to_lo = { - "L3-31": 0, - "L4-15": 1, - "L4-16": 1, - "L4-17": 2, - "L4-18": 2, - "L4-19": 3, - "L3-32": 4, - } - for ch, lo in ch_to_lo.items(): - channels[ch].local_oscillator = local_oscillators[lo] - - # create qubit objects - runcard = load_runcard(FOLDER) - kernels = Kernels.load(FOLDER) - qubits, couplers, pairs = load_qubits(runcard, kernels) - settings = load_settings(runcard) - - # assign channels to qubits and sweetspots(operating points) - for q in range(0, 5): - qubits[q].readout = channels["L3-31"] - qubits[q].feedback = channels["L2-7"] - - for q in range(0, 5): - qubits[q].drive = channels[f"L4-{15 + q}"] - qubits[q].flux = channels[f"L4-{6 + q}"] - qubits[q].twpa = channels["L3-32"] - channels[f"L4-{6 + q}"].qubit = qubits[q] + twpa_pump = SGS100A("TWPA_PUMP", TWPA_ADDRESS) - # assign channels to couplers and sweetspots(operating points) - for c, coupler in enumerate(couplers.values()): - coupler.flux = channels[f"L4-{11 + c}"] - instruments = {controller.name: controller} - instruments.update({lo.name: lo for lo in local_oscillators}) + instruments = {controller.name: controller, twpa_pump.name: twpa_pump} instruments = load_instrument_settings(runcard, instruments) return Platform( str(FOLDER), diff --git a/tii2qs3f_zi/parameters.json b/tii2qs3f_zi/parameters.json new file mode 100644 index 00000000..9d5aa835 --- /dev/null +++ b/tii2qs3f_zi/parameters.json @@ -0,0 +1,169 @@ +{ + "nqubits": 2, + "description": "Tii 2q chip.", + "settings": { + "nshots": 4096, + "relaxation_time": 300000 + }, + "qubits": [ + 0, + 1 + ], + "couplers": [], + "topology": [ + [ + 0, + 1 + ] + ], + "instruments": { + "ZURO_BLANCO": { + "bounds": { + "waveforms": 40000, + "readout": 250, + "instructions": 1000000 + } + } + }, + "components": { + "qubit_0/drive": { + "frequency": 4833726197, + "power_range": 5 + }, + "qubit_1/drive": { + "frequency": 5705000000, + "power_range": 5 + }, + "qubit_1_2/drive/lo": { + "frequency": 5200000000, + "power": null + }, + "qubit_1/flux": { + "offset": 0.09, + "power_range": 0.8 + }, + "qubit_0/measure": { + "frequency": 7320000000, + "power_range": 1 + }, + "qubit_1/measure": { + "frequency": 7322300000, + "power_range": -5 + }, + "qubit_1_2/measure/lo": { + "frequency": 7300000000, + "power": null + }, + "qubit_0/acquire": { + "delay": 0, + "smearing": 0, + "power_range": 10 + }, + "qubit_1/acquire": { + "delay": 0, + "smearing": 0, + "power_range": 10 + } + }, + "native_gates": { + "single_qubit": { + "0": { + "RX": { + "qubit_0/drive": [ + { + "duration": 40, + "amplitude": 0.5, + "frequency": 4833726197, + "envelope": { "kind": "gaussian", "rel_sigma": 2.0 }, + "type": "qd" + } + ] + }, + "MZ": { + "qubit_0/measure": [ + { + "duration": 2000, + "amplitude": 0.1, + "frequency": 7320000000, + "envelope": { "kind": "rectangular" }, + "type": "ro" + } + ] + } + }, + "1": { + "RX": { + "qubit_1/drive": [ + { + "duration": 40, + "amplitude": 0.5, + "frequency": 5705000000, + "envelope": { "kind": "gaussian", "rel_sigma": 2.0 }, + "type": "qd" + } + ] + }, + "MZ": { + "qubit_1/measure": [ + { + "duration": 2000, + "amplitude": 0.2, + "frequency": 7322300000, + "envelope": { "kind": "rectangular" }, + "type": "ro" + } + ] + } + } + }, + "two_qubit": { } + }, + "characterization": { + "single_qubit": { + "0": { + "bare_resonator_frequency": 7314400000, + "anharmonicity": 0, + "asymmetry": 0, + "Ec": 0, + "Ej": 0, + "g": 0, + "assignment_fidelity": 0, + "readout_fidelity": 0, + "effective_temperature": 0, + "peak_voltage": 0, + "pi_pulse_amplitude": 0, + "T1": 8752.985976351081, + "T2": 0, + "T2_spin_echo": 0, + "state0_voltage": 0, + "state1_voltage": 0, + "mean_gnd_states": [2.7928963953488375, 0.38721744186046514], + "mean_exc_states": [3.1822208720930236, 2.6839408139534884], + "threshold": 2.0384892421724587, + "iq_angle": -1.4028795254342719 + }, + "1": { + "bare_resonator_frequency": 7314400000, + "anharmonicity": 0, + "asymmetry": 0, + "Ec": 0, + "Ej": 0, + "g": 0, + "assignment_fidelity": 0, + "readout_fidelity": 0, + "effective_temperature": 0, + "peak_voltage": 0, + "pi_pulse_amplitude": 0, + "T1": 9648.473025473866, + "T2": 0, + "T2_spin_echo": 0, + "state0_voltage": 0, + "state1_voltage": 0, + "mean_gnd_states": [2.1203863372093026, 2.590681220930233], + "mean_exc_states": [2.6019945348837212, 4.65872796511628], + "threshold": 4.698395737427324, + "iq_angle": -1.3419936877473289 + } + } + } +} diff --git a/tii2qs3f_zi/platform.py b/tii2qs3f_zi/platform.py new file mode 100644 index 00000000..906bcbc7 --- /dev/null +++ b/tii2qs3f_zi/platform.py @@ -0,0 +1,129 @@ +import pathlib + +from laboneq.dsl.device import create_connection +from laboneq.dsl.device.instruments import HDAWG, PQSC, SHFQC +from laboneq.simple import DeviceSetup +from qibolab import Platform +from qibolab.components import AcquireChannel, DcChannel, IqChannel, OscillatorConfig +from qibolab.instruments.zhinst import ( + ZiAcquisitionConfig, + ZiChannel, + ZiDcConfig, + ZiIqConfig, + Zurich, +) +from qibolab.serialize import ( + load_component_config, + load_instrument_settings, + load_qubits, + load_runcard, + load_settings, +) + +FOLDER = pathlib.Path(__file__).parent + +N_QUBITS = 2 + + +def create(): + """Tii 2q chip""" + + device_setup = DeviceSetup() + # Dataserver + device_setup.add_dataserver(host="localhost", port=8004) + # Instruments + device_setup.add_instruments( + HDAWG("device_hdawg", address="DEV8660"), + PQSC("device_pqsc", address="DEV10055", reference_clock_source="internal"), + SHFQC("device_shfqc", address="DEV12146"), + ) + + device_setup.add_connections( + "device_pqsc", + create_connection(to_instrument="device_hdawg", ports="ZSYNCS/0"), + create_connection(to_instrument="device_shfqc", ports="ZSYNCS/2"), + ) + + runcard = load_runcard(FOLDER) + qubits, _, pairs = load_qubits(runcard) + settings = load_settings(runcard) + + components = {} + drive_lo = "qubit_1_2/drive/lo" + measure_lo = "qubit_1_2/measure/lo" + components[drive_lo] = load_component_config(runcard, drive_lo, OscillatorConfig) + components[measure_lo] = load_component_config( + runcard, measure_lo, OscillatorConfig + ) + zi_channels = [] + for q in range(N_QUBITS): + measure_name = f"qubit_{q}/measure" + acquisition_name = f"qubit_{q}/acquire" + components[acquisition_name] = load_component_config( + runcard, acquisition_name, ZiAcquisitionConfig + ) + qubits[q].acquisition = AcquireChannel( + name=acquisition_name, + twpa_pump=None, + measure=measure_name, + ) + zi_channels.append( + ZiChannel( + qubits[q].acquisition, device="device_shfqc", path="QACHANNELS/0/INPUT" + ) + ) + + components[measure_name] = load_component_config( + runcard, measure_name, ZiIqConfig + ) + qubits[q].measure = IqChannel( + name=measure_name, lo=measure_lo, mixer=None, acquisition=acquisition_name + ) + zi_channels.append( + ZiChannel( + qubits[q].measure, device="device_shfqc", path="QACHANNELS/0/OUTPUT" + ) + ) + + drive_name = f"qubit_{q}/drive" + components[drive_name] = load_component_config(runcard, drive_name, ZiIqConfig) + qubits[q].drive = IqChannel( + name=drive_name, + mixer=None, + lo=drive_lo, + ) + zi_channels.append( + ZiChannel( + qubits[q].drive, device="device_shfqc", path=f"SGCHANNELS/{q}/OUTPUT" + ) + ) + + flux_name = "qubit_1/flux" + components[flux_name] = load_component_config(runcard, flux_name, ZiDcConfig) + qubits[1].flux = DcChannel( + name=flux_name, + ) + zi_channels.append( + ZiChannel(qubits[1].flux, device="device_hdawg", path="SIGOUTS/0") + ) + + controller = Zurich( + "ZURO_BLANCO", + device_setup=device_setup, + channels=zi_channels, + time_of_flight=75, + smearing=50, + ) + + instruments = {controller.name: controller} + instruments = load_instrument_settings(runcard, instruments) + return Platform( + str(FOLDER), + qubits, + pairs, + components, + instruments, + settings, + resonator_type="3D", + couplers={}, + )