Quandela / Perceval

An open source framework for programming photonic quantum computers
https://perceval.quandela.net
Other
133 stars 63 forks source link

Pcvl 686 explicit cast to integer #379

Closed Benoit-F-Q closed 3 months ago

Benoit-F-Q commented 3 months ago

I didn't reproduce the Raise with :

def input_type(key: int):
    print("input conversion: {}".format(key))

def return_type(**kwargs) -> int:
    return kwargs.get("key", None)

value = 1e6
input_type(key = value)
print("output conversion: {}".format(return_type(key=value)))

Where does the check come from? Protobuf? Somewhere else?

Shouldn't we fix in a more generic way to prevents similar issues?

Benoit-F-Q commented 3 months ago

Testé (bug reproduit, puis corrigé, pour Processor et RemoteProcessor,