We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
How should I create a custom parameterised gate? I tried to copy the example in https://github.com/GTorlai/PastaQ.jl/blob/master/examples/01_quantumgates.jl, but this seems to be incorrect.
using ITensors using PastaQ import PastaQ: gate N = 2 hilbert = qubits(N) gate(::GateName"G"; θ::Number) = [ 1 0 0 0 0 cos(θ / 2) -sin(θ / 2) 0 0 sin(θ / 2) cos(θ / 2) 0 0 0 0 1 ] circuit = Tuple[("G", (1, 2), 0.1)] psi = runcircuit(hilbert, circuit)
The text was updated successfully, but these errors were encountered:
Solved, found that I needed to change the rotation argument:
circuit = Tuple[("G", (1, 2), (θ = 0.1,))]
Sorry, something went wrong.
No branches or pull requests
How should I create a custom parameterised gate? I tried to copy the example in https://github.com/GTorlai/PastaQ.jl/blob/master/examples/01_quantumgates.jl, but this seems to be incorrect.
The text was updated successfully, but these errors were encountered: