Skip to content
This repository has been archived by the owner on Dec 18, 2021. It is now read-only.

Commit

Permalink
fix type error when ctrl is an empty tuple (#35)
Browse files Browse the repository at this point in the history
* fix type error when ctrl is an empty tuple

* force to be Int
  • Loading branch information
Roger-luo authored and GiggleLiu committed Oct 10, 2019
1 parent d70d829 commit c7ff3a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/instruct.jl
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ function YaoBase.instruct!(
a = T(cos(theta/2))
c = T(-im * sin(theta/2))
e = T(exp(-im/2*theta))
@inbounds for b in itercontrol(log2i(size(state, 1)), [control_locs...], [control_bits...])
@inbounds for b in itercontrol(log2i(size(state, 1)), collect(Int, control_locs), collect(Int, control_bits))
if b&mask1==0
i = b+1
i_ = b mask12 + 1
Expand Down

0 comments on commit c7ff3a1

Please sign in to comment.