Commit e8907b97 authored by Edgar Reehuis's avatar Edgar Reehuis
Browse files

Merge branch 'remove-renormalization-virtual-awgoffsetstrategy' into 'main'

Remove normalization in virtual AwgOffsetStrategy

See merge request !683
parents 5e7f45ac fa2c32da
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@
  - Currently, only the user interface is implemented - changes to the backends will be made later (#413)
  - The code is backwards compatible, i.e., all schedules remain valid, but pulse amplitudes are not backwards compatible and will need adjustment / re-calibrating
- Qblox backend - Lowering the minimum time between acquisitions to 300 ns (!676, #369)
- Qblox backend - The compiled offset value in `AwgOffsetStrategy` is adjusted to match the changes to pulse amplitudes in !652. A pulse with a given amplitude `A` and a `VoltageOffset` with offset `A` will now produce the same voltage at the hardware level (!683).

### Merged branches and closed issues

+2 −4
Original line number Diff line number Diff line
@@ -160,15 +160,13 @@ class AwgOffsetStrategy(IdleStrategy):
            The QASMProgram to add the assembly instructions to.
        """
        path0_amp = qasm_program.expand_from_normalised_range(
            val=self.operation_info.data["offset_path_0"]
            / qasm_program.static_hw_properties.max_awg_output_voltage,
            val=self.operation_info.data["offset_path_0"],
            immediate_size=constants.IMMEDIATE_SZ_OFFSET,
            param="offset_awg_path_0",
            operation=self.operation_info,
        )
        path1_amp = qasm_program.expand_from_normalised_range(
            val=self.operation_info.data["offset_path_1"]
            / qasm_program.static_hw_properties.max_awg_output_voltage,
            val=self.operation_info.data["offset_path_1"],
            immediate_size=constants.IMMEDIATE_SZ_OFFSET,
            param="offset_awg_path_1",
            operation=self.operation_info,
+1 −1
Original line number Diff line number Diff line
@@ -149,7 +149,7 @@ class TestAwgOffsetStrategy:
            "offset_path_0": 0.4,
            "offset_path_1": 0,
        }
        expected_qasm = [["", "set_awg_offs", "5242,0", ""]]
        expected_qasm = [["", "set_awg_offs", "13107,0", ""]]

        qasm = empty_qasm_program_qcm
        duration = 24e-9
+3 −3
Original line number Diff line number Diff line
@@ -3115,7 +3115,7 @@ def test_stitched_pulse_compilation_upd_param_at_end(
    for i, string in enumerate(program_with_long_square):
        if "set_awg_offs" in string:
            break
    assert re.search(r"^\s*set_awg_offs\s+32767,0\s+", program_with_long_square[i])
    assert re.search(r"^\s*set_awg_offs\s+16383,0\s+", program_with_long_square[i])
    assert re.search(r"^\s*upd_param\s+4\s+", program_with_long_square[i + 1])
    assert re.search(r"^\s*wait\s+9996\s+", program_with_long_square[i + 2])
    assert re.search(r"^\s*set_awg_offs\s+0,0\s+", program_with_long_square[i + 3])
@@ -3156,7 +3156,7 @@ def test_auto_compile_long_square_pulses(
        if "set_awg_offs" in string:
            idx = i
            break
    assert re.search(r"^\s*set_awg_offs\s+13107,0\s+", seq_instructions[idx])
    assert re.search(r"^\s*set_awg_offs\s+6553,0\s+", seq_instructions[idx])
    assert re.search(r"^\s*upd_param\s+4\s+", seq_instructions[idx + 1])
    assert re.search(r"^\s*wait\s+2496\s+", seq_instructions[idx + 2])
    assert re.search(r"^\s*set_awg_offs\s+0,0\s+", seq_instructions[idx + 3])
@@ -3214,7 +3214,7 @@ def test_long_acquisition(
        if "set_awg_offs" in string:
            idx = i
            break
    assert re.search(r"^\s*set_awg_offs\s+16383,0\s+", seq_instructions[idx])
    assert re.search(r"^\s*set_awg_offs\s+8191,0\s+", seq_instructions[idx])
    assert re.search(r"^\s*upd_param\s+4\s+", seq_instructions[idx + 1])
    assert re.search(r"^\s*wait\s+96\s+", seq_instructions[idx + 2])
    assert re.search(r"^\s*acquire\s+0,0,4\s+", seq_instructions[idx + 3])