from qrisp import QuantumArray, QuantumVariable, rzz
import numpy as np
from sympy import Symbol
M=2
N=2
qtype = QuantumVariable(2)
q_array = QuantumArray(qtype = qtype, shape = (M))
gamma = [Symbol("gamma_" + str(i)) for i in range(1)]
rzz(gamma[0],q_array[0][1],q_array[1][0])
rzz(gamma[0],q_array[0][1],q_array[1][1])
qc=q_array.qs.compile() #parameterized compiling
sv_array = qc.statevector_array()
This yields "TypeError: cannot determine truth value of Relational". The same error occurs for "sv = q_array.qs.statevector()" (with a different error message). The error seems to be related to two rzz gates acting on the same qubit.
Consider the following example:
This yields "TypeError: cannot determine truth value of Relational". The same error occurs for "sv = q_array.qs.statevector()" (with a different error message). The error seems to be related to two rzz gates acting on the same qubit.