-
Notifications
You must be signed in to change notification settings - Fork 79
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
Add support for more elements in qir for cirq #175
base: master
Are you sure you want to change the base?
Conversation
elif gate_name == "reset": | ||
cmd.append(cirq.ResetChannel().on(*index)) | ||
elif gate_name in ["ox", "oy", "oz"]: | ||
cmd.append(getattr(cirq, gate_name[1:])().controlled().on(*index)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if no value specified, controlled
is for cx cy cz gates?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! Theoretically that would be the case, as Gate.controlled()
turns a gate (x,y,z
in this case) into a controlled gate according to cirq's documentation.
Though I am still having some trouble trying to set up the development environment on my mac M2 machine, and haven't been able to test the gates yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for m2, I guess this may help https://tensorcircuit.readthedocs.io/en/latest/contribs/development_Mac.html
cmd.append(getattr(cirq, gate_name[1:])().controlled().on(*index)) | ||
elif gate_name in ["orx", "ory", "orz"]: | ||
cmd.append(getattr(cirq, gate_name[1:])(_get_float(parameters, "theta")).controlled().on(*index)) | ||
elif gate_name == "phase": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this gate has parameters
#68