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

Fix ambiguity for empty location #18

Merged
merged 6 commits into from
May 24, 2019
Merged

Fix ambiguity for empty location #18

merged 6 commits into from
May 24, 2019

Conversation

Roger-luo
Copy link
Member

No description provided.

@codecov
Copy link

codecov bot commented May 22, 2019

Codecov Report

Merging #18 into master will decrease coverage by 0.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #18      +/-   ##
==========================================
- Coverage   77.13%   77.11%   -0.02%     
==========================================
  Files           8        8              
  Lines         433      437       +4     
==========================================
+ Hits          334      337       +3     
- Misses         99      100       +1
Impacted Files Coverage Δ
src/instruct.jl 92.45% <66.66%> (-0.46%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8526648...164395c. Read the comment docs.

src/instruct.jl Outdated
@@ -185,6 +192,9 @@ for (G, FACTOR) in zip([:Z, :S, :T, :Sdag, :Tdag], [:(-1), :(im), :($(exp(im*π/
@eval YaoBase.instruct!(state::AbstractVecOrMat, g::Val{$(QuoteNode(G))}, locs::Tuple{Int}) =
instruct!(state, g, locs...)

# no effect (to fix ambiguity)
@eval YaoBase.instruct!(::AbstractVecOrMat, ::Val{$(QuoteNode(G))}, ::Tuple{}) = nothing
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a test for this.

src/instruct.jl Outdated
@@ -185,6 +192,9 @@ for (G, FACTOR) in zip([:Z, :S, :T, :Sdag, :Tdag], [:(-1), :(im), :($(exp(im*π/
@eval YaoBase.instruct!(state::AbstractVecOrMat, g::Val{$(QuoteNode(G))}, locs::Tuple{Int}) =
instruct!(state, g, locs...)

# no effect (to fix ambiguity)
@eval YaoBase.instruct!(::AbstractVecOrMat, ::Val{$(QuoteNode(G))}, ::Tuple{}) = nothing
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a test for this.

@GiggleLiu GiggleLiu merged commit 7f6f55a into master May 24, 2019
@Roger-luo Roger-luo deleted the pkgbenchmark branch September 24, 2019 23:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants