Frequently Asked Questions#
Q: How do I schedule new pulses relative to existing ones?
A. You can schedule a pulse relative to another by specifying the ref_op, ref_pt and rel_time arguments when adding it to the schedule.
ref_op: the name of the existing pulse that serves as the reference.ref_pt: the reference point on the existing pulse. It could bestart,center, orend.rel_time: the time in seconds to wait after the reference point (ref_pt) before starting the new pulse.
Q: Can I output a square pulse with complex amplitude?
A. Yes, you can specify a complex number for the amp parameter when adding a SquarePulse to the schedule. This is essential for the module to reach its full output range - for more details please see the [NCO Tutorial](INSERT LINK HERE)
Q: How do I set the modulation frequency for a pulse?
A. First, you must define a ClockResource with the desired frequency and add it to the schedule. Then, assign that clock to your pulse using its name.
# 1. Define a clock resource with a specific frequency.
example_clock = ClockResource(name="cs0.ro", freq=50e6) # 50 MHz
# 2. Add the clock resource to the schedule.
schedule.add_resource(example_clock)
# 3. Assign the clock to a pulse when adding it to the schedule.
square_pulse = schedule.add(
SquarePulse(amp=1, duration=1e-6, port="cs0:res", clock="cs0.ro")
)
Q: How could I sweep modulation frequency within a schedule?
A. To change a clock’s frequency dynamically, add a SetClockFrequency operation to your schedule at the point where the change should occur.
# This operation changes the frequency of an existing clock.
schedule.add(
SetClockFrequency(
clock="cs0.ro", # The name of the clock to modify
clock_freq_new=60e6, # The new frequency in Hz (e.g., 60 MHz)
)
)
Q: How do I set up a baseband module as a DC source?
A. You can add a VoltageOffset to the schedule. It will set a constant offset to the output voltage. Notice that the clock should be defined as clock='cl0.basband', namely turn off the modulation from the baseband module.
Q: How does the channel mapping work?
A. Channel mapping is defined under the Connectivity section of your hardware configuration file. The available options depend on the module type.
# QCM Baseband
complex_output_{0,1}
real_output_{0,1,2,3}
digital_output_{0,1,2,3}
# QRM baseband
complex_output_0
complex_input_0
real_output_{0,1}
real_input_{0,1}
digital_output_{0,1,2,3}
# QCM-RF
complex_output_{0,1}
digital_output_{0,1}
# QRM-RF
complex_output_0
complex_input_0
digital_output_{0,1}
Here is what the different connection types mean:
complex_output/complex_input: Connects a pair of physical channels for I (in-phase) and Q (quadrature) signals. This allows you to map a qubit port to a pair of physical outputs/inputs (O1 and O2, O3 and O4, or I1 and I2) for the baseband modules, or one up-/down-converted physical output/input (O1, O2, or I1) in the RF modules.real_output/real_input: Connects a single physical channel, which only outputs or inputs an I signal. This option is not available for RF modules, as both I and Q are required for up/downconversion.digital_output: Connects a digital marker channel.
Q: What are the best practices for setting modulation_frequencies in the hardware configuration?
A: The modulation_frequencies object in your hardware configuration assigns the initial modulation settings for your port-clock combinations. The required parameters change depending on the module type.
Baseband Modules
For baseband modules, you only need to define the interm_freq (intermediate frequency).
For a fixed frequency: you can set the
interm_freqtoNone, as you would define the modulation frequency viaClockResourcein your schedule.For a swept frequency: if you plan to sweep the frequency during an experiment (e.g., using
SetClockFrequency), you must setinterm_freqtoNone. This indicates that the frequency is dynamic and will be controlled by the schedule itself.
RF Modules
For RF modules, you only need to define either the lo_freq (local oscillator frequency) or the interm_freq.
The system automatically calculates the missing parameter based on the clock’s frequency. The relationship is always:
clock_frequency = lo_freq + interm_freq
For example, if a clock is set to 6.1 GHz and you define lo_freq as 6.0 GHz, the interm_freq will automatically be configured to 100 MHz.
When sweeping frequencies during an experiment it is always recommended to set only the “lo_freq”.