-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using circuit.bits
as args
to add_wasm
with more registers causes a Fatal Python error
.
#1641
Comments
You can also trigger this bug with: def test_wasm_circuit_bits() -> None:
w = wasm.WasmFileHandler("testfile.wasm")
c = Circuit(0, 1)
c.add_wasm("add_one", w, [1], [1], [0])
assert c.depth() == 1 |
I noticed recently that the unit ID we use for the wasm state (which has the special name |
@cqc-alec I have taken a look on this, it should have the type WasmState, see tket/tket/include/tket/Utils/UnitID.hpp Line 229 in a9add4b
Can you give some more details where you have seen this? I was not able to construct an example where this did not work. |
In this test, if you insert the lines cmd = c.get_commands()[0]
for arg in cmd.args:
print(arg, type(arg)) after constructing the circuit, and run it with
(This was the reason for this workaround.) |
Is the issue that there is no python binding for the |
Probably yes, still unexpected that they show up as bits. I will add them. |
Thank you! I will solves this together with the other issues. |
Using a test case like this in
test_classical.py
Results in an error during the tests of:
Not that reducing the number of classical registers in the circuit or using a different
args
avoids this issue.The text was updated successfully, but these errors were encountered: