-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
I loaded a task file, then tried to extract the task_ir and visualize. I got a error message saying
BokehDeprecationWarning: 'circle() method with size value' was deprecated in Bokeh 3.4.0 and will be removed, use 'scatter(size=...) instead' instead.
BokehDeprecationWarning: 'circle() method with size value' was deprecated in Bokeh 3.4.0 and will be removed, use 'scatter(size=...) instead' instead.
BokehDeprecationWarning: 'circle() method with size value' was deprecated in Bokeh 3.4.0 and will be removed, use 'scatter(size=...) instead' instead.
Traceback (most recent call last):
File "/Users/jingchen/JingQuEra/QuEraRepo/bloqade-analog/test.py", line 11, in <module>
y.show()
File "/Users/jingchen/JingQuEra/QuEraRepo/bloqade-analog/src/bloqade/analog/submission/ir/task_specification.py", line 276, in show
display_task_ir(self)
File "/Users/xxx/JingQuEra/QuEraRepo/bloqade-analog/src/bloqade/analog/visualization/display.py", line 172, in display_task_ir
show(task_ir.figure())
^^^^^^^^^^^^^^^^
File "/Users/xxx/xxx/QuEraRepo/bloqade-analog/src/bloqade/analog/submission/ir/task_specification.py", line 273, in figure
return get_task_ir_figure(self)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/xxx/xxx/QuEraRepo/bloqade-analog/src/bloqade/analog/visualization/task_visualize.py", line 24, in get_task_ir_figure
return get_quera_task_figure(task_ir, **fig_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/xxx/xxx/QuEraRepo/bloqade-analog/src/bloqade/analog/visualization/task_visualize.py", line 61, in get_quera_task_figure
register = task_ir.lattice.figure(x_axis_label="x (um)", y_axis_label="y (um)")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/xxx/xxx/QuEraRepo/bloqade-analog/src/bloqade/analog/submission/ir/task_specification.py", line 242, in figure
return get_task_ir_figure(self, **fig_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/xxx/xxx/QuEraRepo/bloqade-analog/src/bloqade/analog/visualization/task_visualize.py", line 22, in get_task_ir_figure
return get_lattice_figure(task_ir, **fig_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/xxx/xxx/QuEraRepo/bloqade-analog/src/bloqade/analog/visualization/task_visualize.py", line 39, in get_lattice_figure
reg = ListOfLocations().add_position(sites_um, lattice.filling)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/xxx/xxx/QuEraRepo/bloqade-analog/src/bloqade/analog/ir/location/location.py", line 349, in add_position
raise TypeError("Invalid input types for add_position provided!")
TypeError: Invalid input types for add_position provided!
Minimal broken example
import bloqade
import bloqade.analog
p=bloqade.analog.load("./WMIS_G_14_10_job.json")
y = p.tasks[0].task_ir
print(y)
y.show()
The json file is
{"bloqade.analog.task.batch.RemoteBatch": {"source": null, "tasks": [[0, {"bloqade.analog.task.exclusive.ExclusiveRemoteTask": {"task_id": "XXXXXXXXX", "task_ir": {"nshots": 50, "lattice": {"sites": [[0.0000417, 0E-7], [0.0000208, -0.0000139], [0.0000347, -0.0000208], [0.0000347, -0.0000139], [0.0000417, -0.0000208], [0.0000417, -0.0000139], [0.0000278, -0.0000208], [0.0000417, -0.0000278], [0.0000486, -0.0000139], [0.0000347, -0.0000069], [0.0000556, -0.0000139], [0.0000417, -0.0000347]], "filling": [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}, "effective_hamiltonian": {"rydberg": {"rabi_frequency_amplitude": {"global": {"times": [0E-9, 0.000002000, 0.000008000, 0.000010000, 0.000012000], "values": [0.0, 15800000.0, 15800000.0, 0.0, 0.0]}}, "rabi_frequency_phase": {"global": {"times": [0E-9, 0.000012000], "values": [0E-7, 0E-7]}}, "detuning": {"global": {"times": [0E-9, 0.000002000, 0.000005000, 0.000010000, 0.000012000], "values": [-15000000.0, -15000000.0, 14000000.0, 14000000.0, 14000000.0]}, "local": {"times": [0E-9, 0.000005000, 0.000008000, 0.000010000, 0.000012000], "values": [0E+5, 0E+5, -1.225E+7, -1.225E+7, 0E+5], "lattice_site_coefficients": [1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.8571428571428571, 0.8571428571428571, 0.8571428571428571, 0.8571428571428571, 1.0, 1.0]}}}}}, "metadata": {}, "parallel_decoder": null, "task_result_ir": {"task_status": "Accepted", "shot_outputs": []}}}]], "name": null}}
The printed task_ir looks like
nshots=50 lattice=Lattice(sites=[(Decimal('0.0000417'), Decimal('0E-7')), (Decimal('0.0000208'), Decimal('-0.0000139')), (Decimal('0.0000347'), Decimal('-0.0000208')), (Decimal('0.0000347'), Decimal('-0.0000139')), (Decimal('0.0000417'), Decimal('-0.0000208')), (Decimal('0.0000417'), Decimal('-0.0000139')), (Decimal('0.0000278'), Decimal('-0.0000208')), (Decimal('0.0000417'), Decimal('-0.0000278')), (Decimal('0.0000486'), Decimal('-0.0000139')), (Decimal('0.0000347'), Decimal('-0.0000069')), (Decimal('0.0000556'), Decimal('-0.0000139')), (Decimal('0.0000417'), Decimal('-0.0000347'))], filling=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) effective_hamiltonian=EffectiveHamiltonian(rydberg=RydbergHamiltonian(rabi_frequency_amplitude=RabiFrequencyAmplitude(global_=GlobalField(times=[Decimal('0E-9'), Decimal('0.000002000'), Decimal('0.000008000'), Decimal('0.000010000'), Decimal('0.000012000')], values=[Decimal('0.0'), Decimal('15800000.0'), Decimal('15800000.0'), Decimal('0.0'), Decimal('0.0')])), rabi_frequency_phase=RabiFrequencyPhase(global_=GlobalField(times=[Decimal('0E-9'), Decimal('0.000012000')], values=[Decimal('0E-7'), Decimal('0E-7')])), detuning=Detuning(global_=GlobalField(times=[Decimal('0E-9'), Decimal('0.000002000'), Decimal('0.000005000'), Decimal('0.000010000'), Decimal('0.000012000')], values=[Decimal('-15000000.0'), Decimal('-15000000.0'), Decimal('14000000.0'), Decimal('14000000.0'), Decimal('14000000.0')]), local=LocalField(times=[Decimal('0E-9'), Decimal('0.000005000'), Decimal('0.000008000'), Decimal('0.000010000'), Decimal('0.000012000')], values=[Decimal('0E+5'), Decimal('0E+5'), Decimal('-1.225E+7'), Decimal('-1.225E+7'), Decimal('0E+5')], lattice_site_coefficients=[Decimal('1.0'), Decimal('1.0'), Decimal('0.0'), Decimal('0.0'), Decimal('0.0'), Decimal('0.0')
Expected behavior
I expected to visualize the task setting from a web page.
Desktop (please complete the following information):
- OS: macOS
- Bloqade Version: main branch (8a638 Friday Jun 13th 2025)
- Python Version: 3.12.9
Additional context
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working