Skip to content

Commit 0add046

Browse files
Merge pull request #476 from JoelPasvolsky/mca_get_properties_update
Update multicolor annealing for updated structure of ``x_get_multicolor_annealing_exp_feature_info``
2 parents fcd45ed + 4205e04 commit 0add046

3 files changed

Lines changed: 39 additions & 35 deletions

File tree

docs/quantum_research/experimental_research.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ needed to use multicolor annealing on your selected QPU, either through the
542542

543543
exp_feature_info = mca.get_properties(qpu)
544544

545-
num_anneal_lines = len(exp_feature_info)
545+
num_anneal_lines = len(exp_feature_info[1])
546546

547547
>>> print(f"QPU {qpu.solver.name} has {num_anneal_lines} annealing lines.") # doctest: +SKIP
548548
QPU Advantage2_research1 has 6 annealing lines.
@@ -562,7 +562,7 @@ QPU Advantage2_research1 has 6 annealing lines.
562562
result = computation.result()
563563
exp_feature_info = result['x_get_multicolor_annealing_exp_feature_info']
564564

565-
num_anneal_lines = len(exp_feature_info)
565+
num_anneal_lines = len(exp_feature_info[1])
566566

567567
>>> print(f"QPU {qpu.solver.name} has {num_anneal_lines} annealing lines.") # doctest: +SKIP
568568
QPU Advantage2_research1 has 6 annealing lines.
@@ -594,7 +594,7 @@ repository.
594594
qubits_of_line = {}
595595

596596
for q in range(num_anneal_lines):
597-
qubits_of_line[q] = exp_feature_info[q]['qubits']
597+
qubits_of_line[q] = exp_feature_info[1][q]['qubits']
598598

599599
line_target = 0
600600
line_source = 1
@@ -658,16 +658,16 @@ schedule for the selected QPU.
658658
.. testcode::
659659
:skipif: True
660660

661-
Q_target_max_c = exp_feature_info[line_target]['maxC']
662-
Q_target_min_c = exp_feature_info[line_target]['minC']
661+
Q_target_max_c = exp_feature_info[1][line_target]['maxC']
662+
Q_target_min_c = exp_feature_info[1][line_target]['minC']
663663

664-
Q_source_max_c = exp_feature_info[line_source]['maxC']
665-
Q_source_min_c = exp_feature_info[line_source]['minC']
664+
Q_source_max_c = exp_feature_info[1][line_source]['maxC']
665+
Q_source_min_c = exp_feature_info[1][line_source]['minC']
666666

667-
Q_detector_max_c = exp_feature_info[line_detector]['maxC']
668-
Q_detector_min_c = exp_feature_info[line_detector]['minC']
667+
Q_detector_max_c = exp_feature_info[1][line_detector]['maxC']
668+
Q_detector_min_c = exp_feature_info[1][line_detector]['minC']
669669

670-
min_time_step = exp_feature_info[0]["minAnnealingTimeStep"]
670+
min_time_step = exp_feature_info[1][0]["minAnnealingTimeStep"]
671671

672672
>>> print(f"Minimum time step is {min_time_step} µs") # doctest: +SKIP
673673
Minimum time step is 0.01 µs
@@ -763,7 +763,7 @@ and shows a Larmor precession that corresponds to the chosen transverse energy,
763763
x_anneal_schedules = anneal_schedules,
764764
x_polarizing_schedule = polarization_schedule)
765765

766-
delay_sweep = np.arange(0.0, 0.02, 40*exp_feature_info[0]["scheduleDelayStep"])
766+
delay_sweep = np.arange(0.0, 0.02, 40*exp_feature_info[1][0]["scheduleDelayStep"])
767767

768768
res_plus=[]
769769

docs/quantum_research/solver_properties_all.rst

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -854,19 +854,22 @@ and the range for the target normalized control bias :math:`c(s)` for a QPU.
854854
x_get_multicolor_annealing_exp_feature_info
855855
===========================================
856856

857-
Returns information about per-line anneal schedules, such as the subset of
858-
the QPU's qubits indexed to each line, supported minimum time steps, and ranges
857+
Returns information about multicolor annealing, such as the subset of the QPU's
858+
qubits indexed to each annealing line, supported minimum time steps, and ranges
859859
of normalized control bias, :math:`c(s)`, etc.
860860

861861
.. note:: |research_property_note1|
862862

863863
|research_property_note2|
864864

865865
Submit a placeholder problem with this parameter set to True to return the
866-
information, as a Python list with a dict for each of the QPU's anneal lines,
867-
under the returned result's ``x_get_multicolor_annealing_exp_feature_info``
868-
field. (The length of the returned list is the number of anneal lines of the
869-
QPU.)
866+
information, under the returned result's
867+
``x_get_multicolor_annealing_exp_feature_info`` field, as a Python list
868+
containing a dict of values that apply across annealing lines and list of dicts,
869+
one for each of the QPU's annealing lines:
870+
``[{Shared fields}, [{Line 0 fields}, {Line 1 fields}, ...]]``.
871+
(The length of the returned *inner* list---i.e., the number of the dicts it
872+
contains---is the number of annealing lines of the QPU.)
870873

871874
The returned information contains the following fields.
872875

@@ -880,6 +883,22 @@ The returned information contains the following fields.
880883
* - Field Name
881884
- Type
882885
- Value
886+
* - ``minPolarizingTimeStep``
887+
- Float
888+
- Minimum supported time step, in microseconds, for the
889+
:ref:`parameter_polarizing_schedule` parameter. Values specified
890+
with greater precision are rounded. This value is common to all
891+
the QPU's annealing lines.
892+
* - ``depolarizationAnneal``
893+
``ScheduleRequiredDelay``
894+
- Float
895+
- Time, in microseconds, after the
896+
:ref:`parameter_polarizing_schedule` parameter changes the
897+
polarization value from :math:`\pm 1` to :math:`0` for the qubits,
898+
during which the :ref:`parameter_qpu_anneal_schedules` parameter
899+
must not set a new value of the normalized control bias,
900+
:math:`c(s)` line. This value is common to all the QPU's annealing
901+
lines.
883902
* - ``annealingLine``
884903
- Integer
885904
- Index of the annealing line for which the other field values are
@@ -890,11 +909,6 @@ The returned information contains the following fields.
890909
- Minimum supported time step, in microseconds, for the
891910
:ref:`parameter_qpu_anneal_schedules` parameter. Values specified
892911
with greater precision are rounded.
893-
* - ``minPolarizingTimeStep``
894-
- Float
895-
- Minimum supported time step, in microseconds, for the
896-
:ref:`parameter_polarizing_schedule` parameter. Values specified
897-
with greater precision are rounded.
898912
* - ``holdOvershootFor``
899913
- Float
900914
- Maximum supported duration, in microseconds, that you can specify a
@@ -944,16 +958,6 @@ The returned information contains the following fields.
944958
- Maximum supported precision, in microseconds, of the
945959
:ref:`parameter_qpu_schedule_delays` parameter. Values specified
946960
with greater precision are rounded.
947-
* - ``depolarizationAnneal``
948-
``ScheduleRequiredDelay``
949-
- Float
950-
- Time, in microseconds, after the
951-
:ref:`parameter_polarizing_schedule` parameter changes the
952-
polarization value from :math:`\pm 1` to :math:`0` for the qubits of
953-
an anneal line, during which the
954-
:ref:`parameter_qpu_anneal_schedules` parameter must not set a new
955-
value of the normalized control bias, :math:`c(s)`, on that same
956-
line.
957961
* - ``qubits``
958962
- Array of integers
959963
- Indices of qubits controlled by the annealing line with the index
@@ -969,7 +973,7 @@ This example prints the first 5 qubits on annealing line 0.
969973

970974
>>> from dwave.experimental import multicolor_anneal as mca
971975
>>> exp_feature_info = mca.get_properties() # doctest: +SKIP
972-
>>> print(exp_feature_info[0]['qubits'][:5]) # doctest: +SKIP
976+
>>> print(exp_feature_info[1][0]['qubits'][:5]) # doctest: +SKIP
973977
[2, 5, 6, 9, 14]
974978

975979
2. Directly using the :ref:`property_qpu_get_multicolor_annealing_exp_feature_info`
@@ -982,5 +986,5 @@ This example prints the first 5 qubits on annealing line 0.
982986
... {next(iter(solver.nodes)): 0}, {}, x_get_multicolor_annealing_exp_feature_info=True)
983987
... result = computation.result()
984988
... exp_feature_info = result['x_get_multicolor_annealing_exp_feature_info']
985-
>>> print(exp_feature_info[0]['qubits'][:5]) # doctest: +SKIP
989+
>>> print(exp_feature_info[1][0]['qubits'][:5]) # doctest: +SKIP
986990
[2, 5, 6, 9, 14]

docs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ reno[sphinx]==3.3.0
1111
# TODO: remove the constraint once numpy 2.4.0 gets yanked
1212
numpy~=2.0,!=2.4.0
1313

14-
dwave-experimental==2026.5.27
14+
dwave-experimental==2026.6.23
1515

1616
# needed for some of the examples
1717
matplotlib

0 commit comments

Comments
 (0)