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

U2 Gate #1794

Open
bramathon opened this issue Jul 29, 2024 · 2 comments
Open

U2 Gate #1794

bramathon opened this issue Jul 29, 2024 · 2 comments
Labels
enhancement ✨ A request for a new feature.

Comments

@bramathon
Copy link
Contributor

Pyquil currently contains a definition for the U gate. However, there is an alternative parameterization that is often used.

def U2(θ, ϕ, λ):
    return np.array([
        [np.cos(θ/2) * np.exp(-1j* (ϕ + λ)/2), -1j* np.sin(θ/2) *np.exp(-1j*(ϕ - λ)/2)],
        [-1j* np.sin(θ/2) * np.exp(+1j* (ϕ-λ)/2),  np.cos(θ/2)* np.exp(+1j*(ϕ+λ)/2)]
    ])

I suggest adding this the gates module.

@bramathon bramathon added the enhancement ✨ A request for a new feature. label Jul 29, 2024
@Adittya
Copy link

Adittya commented Aug 28, 2024

Hello!

if this issue is open to outside contribution, I would like to work on it.

@MarquessV
Copy link
Contributor

Hello!

if this issue is open to outside contribution, I would like to work on it.

👋 Hi @Adittya. Yes, contributions are welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ A request for a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants