Skip to content

Commit 18ff6fa

Browse files
author
Roger-luo
committed
fix test
1 parent 7a76d79 commit 18ff6fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/Diff.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Return the loss function f = <Zi> (means measuring the ibit-th bit in computatio
4747
"""
4848
loss_Z1!(circuit::AbstractBlock; ibit::Int=1) = loss_expect!(circuit, put(nqubits(circuit), ibit=>Z))
4949

50-
cnot_entangler(n::Int, pairs) = chain(n, control(n, [ctrl], target=>X) for (ctrl, target) in pairs)
50+
_cnot_entangler(n::Int, pairs) = chain(n, control(n, [ctrl], target=>X) for (ctrl, target) in pairs)
5151

5252
function rotor(nbit::Int, ibit::Int, noleading::Bool=false, notrailing::Bool=false)
5353
rt = chain(nbit, [put(nbit, ibit=>Rz(0.0)), put(nbit, ibit=>Rx(0.0)), put(nbit, ibit=>Rz(0.0))])
@@ -61,7 +61,7 @@ rset(nbit::Int, noleading::Bool=false, notrailing::Bool=false) = chain(nbit, [ro
6161
function ibm_diff_circuit(nbit, nlayer, pairs)
6262
circuit = chain(nbit)
6363

64-
ent = cnot_entangler(nbit, pairs)
64+
ent = _cnot_entangler(nbit, pairs)
6565
for i = 1:(nlayer + 1)
6666
i!=1 && push!(circuit, ent)
6767
push!(circuit, rset(nbit, i==1, i==nlayer+1))

0 commit comments

Comments
 (0)