Closed lm1909 closed 1 year ago
Using Circuit.apply_gate() with a parameter gate_id of type Gate results in a reference before assignment error being raised.
Circuit.apply_gate()
gate_id
Gate
The gate should be applied to the circuit.
No response
The reason is gate in https://github.com/jcmgray/quimb/blob/97a874619d7e31d5fb3bb20a8485d5cea23c7300/quimb/tensor/circuit.py#L923 which needs to be gate_id.
gate
Latest version of quimb, commit 97a874619d7e31d5fb3bb20a8485d5cea23c7300.
quimb
What happened?
Using
Circuit.apply_gate()
with a parametergate_id
of typeGate
results in a reference before assignment error being raised.What did you expect to happen?
The gate should be applied to the circuit.
Minimal Complete Verifiable Example
No response
Relevant log output
No response
Anything else we need to know?
The reason is
gate
in https://github.com/jcmgray/quimb/blob/97a874619d7e31d5fb3bb20a8485d5cea23c7300/quimb/tensor/circuit.py#L923 which needs to begate_id
.Environment
Latest version of
quimb
, commit 97a874619d7e31d5fb3bb20a8485d5cea23c7300.