Closed bsiegelwax closed 11 months ago
The first code block on https://queracomputing.github.io/bloqade-python-examples/0.9.0/examples/example-5-MIS-UDG/ generates:
--------------------------------------------------------------------------- BeartypeCallHintParamViolation Traceback (most recent call last) Cell In[7], line 16 11 rng = np.random.default_rng(1234) 13 durations = [0.3, 1.6, 0.3] 15 mis_udg_program = ( ---> 16 Square(15, 5.0) 17 .apply_defect_density(0.3, rng=rng) 18 .rydberg.rabi.amplitude.uniform.piecewise_linear(durations, [0.0, 15.0, 15.0, 0.0]) 19 .detuning.uniform.piecewise_linear( 20 durations, [-30, -30, "final_detuning", "final_detuning"] 21 ) 22 ) 24 mis_udg_job = mis_udg_program.batch_assign(final_detuning=np.linspace(0, 80, 41)) File /opt/conda/lib/python3.9/site-packages/pydantic/dataclasses.py:322, in pydantic.dataclasses._add_pydantic_validation_attributes.new_init() File /opt/conda/lib/python3.9/site-packages/pydantic/dataclasses.py:286, in pydantic.dataclasses._add_pydantic_validation_attributes.handle_extra_init() File <@beartype(bloqade.ir.location.bravais.Square.__init__) at 0x7f57e8de28b0>:44, in __init__(__beartype_func, __beartype_conf, __beartype_get_violation, __beartype_object_140015545536064, __beartype_object_140016691238688, *args, **kwargs) BeartypeCallHintParamViolation: Method bloqade.ir.location.bravais.Square.__init__() parameter L2=5.0 violates type hint typing.Optional[int], as float 5.0 not <class "builtins.NoneType"> or int.
in qBraid.
Same issue as #794
The first code block on https://queracomputing.github.io/bloqade-python-examples/0.9.0/examples/example-5-MIS-UDG/ generates:
in qBraid.