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: gphase within control environment #113

Open
renezander90 opened this issue Dec 27, 2024 · 0 comments
Open

Bug: gphase within control environment #113

renezander90 opened this issue Dec 27, 2024 · 0 comments
Assignees

Comments

@renezander90
Copy link
Contributor

Consider the following example where a gphase is applied upon the control qubit being in state 0:

from qrisp import * 

qf = QuantumFloat(2)    

case_indicator = QuantumFloat(1)
h(case_indicator)

#with control(case_indicator,ctrl_state=1): # DOES WORK
with control(case_indicator,ctrl_state=0): # DOES NOT WORK
    gphase(np.pi,qf[0])

print(qf.qs.statevector())

Yields:

AttributeError: 'int' object has no attribute 'identifier'

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

2 participants