What mode are you using in CircInspect?
Expected behaviour
Entire sequence of operations generated by a loop is printed, for both regular operation and their adjoints.
Actual behaviour
The number of operations is incorrect adjoints are applied. It is usually about 2 loop iterations less, but this is irregular. For example, the image below is missing CNOTs from wires 3 and 4, and the terminal qml.adjoint(qml.QFT).
However, removing the adjoint results in the correct behaviour:
I tested also in PennyLane in a Jupyter notebook, and the adjoint version is drawn correctly.
Here's the code for testing:
import pennylane as qml
dev = qml.device("default.qubit", wires=7)
@qml.qnode(dev)
def my_circuit():
for wire in range(5):
qml.QFT(wires=range(5))
qml.CNOT(wires=[wire, 6])
#qml.adjoint(qml.QFT)(wires=range(5))
return qml.probs()
# Execute a QNode to render a circuit in the righthand pane
my_circuit()
System information
- OS: Ubuntu 24.04
- Browser (include version): Mozilla Firefox 142.0.1
What mode are you using in CircInspect?
Expected behaviour
Entire sequence of operations generated by a loop is printed, for both regular operation and their adjoints.
Actual behaviour
The number of operations is incorrect adjoints are applied. It is usually about 2 loop iterations less, but this is irregular. For example, the image below is missing CNOTs from wires 3 and 4, and the terminal
qml.adjoint(qml.QFT).However, removing the adjoint results in the correct behaviour:
I tested also in PennyLane in a Jupyter notebook, and the adjoint version is drawn correctly.
Here's the code for testing:
System information