Skip to content
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

Bug: statevector for parametrized circuit #44

Open
renezander90 opened this issue Apr 11, 2024 · 0 comments
Open

Bug: statevector for parametrized circuit #44

renezander90 opened this issue Apr 11, 2024 · 0 comments

Comments

@renezander90
Copy link
Contributor

Consider the following example:

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant