Skip to content

Commit

Permalink
Inverted MSB-LSB
Browse files Browse the repository at this point in the history
  • Loading branch information
dieris committed Dec 21, 2016
1 parent f5e603f commit 8ccbbac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sequences.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function create_tomo_blocks(qubits::Tuple{Vararg{Qubit}}, num_pulses::Int64 = 4)
error("Only able to handle numPulses=4 or 6")
end
pulse_mat = product(fill(1:num_pulses,length(qubits))...)
return [reduce(, tomo_set[pulse_ind[ct]](qubits[ct]) for ct in 1:length(pulse_ind)) for pulse_ind in pulse_mat]
return [reduce(, tomo_set[pulse_ind[ct]](qubits[end-ct+1]) for ct in 1:length(pulse_ind)) for pulse_ind in pulse_mat]
end

function state_tomo{T<:QGL.SequenceEntry}(seq::Vector{T}, qubits::Tuple{Vararg{Qubit}}, num_pulses::Int64 = 4)
Expand All @@ -23,5 +23,5 @@ function create_cal_seqs(qubits::Tuple{Vararg{Qubit}}, num_repeats::Int64 = 2)
cal_set = [Id, X]
meas_block = reduce(, [MEAS(q) for q in qubits])
pulse_mat = product(fill(1:length(qubits),length(qubits))...)
cal_seqs = [[reduce(, cal_set[pulse_ind[ct]](qubits[ct]) for ct in 1:length(pulse_ind)), meas_block] for pulse_ind in pulse_mat for _ in 1:num_repeats]
cal_seqs = [[reduce(, cal_set[pulse_ind[ct]](qubits[end-ct+1]) for ct in 1:length(pulse_ind)), meas_block] for pulse_ind in pulse_mat for _ in 1:num_repeats]
end

2 comments on commit 8ccbbac

@caryan
Copy link
Collaborator

@caryan caryan commented on 8ccbbac Dec 22, 2016

Choose a reason for hiding this comment

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

Ah yes. We've been complaining about this for a long time: JuliaCollections/Iterators.jl#40

@blakejohnson
Copy link
Collaborator

Choose a reason for hiding this comment

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

Julia 0.6 should introduce lexproduct in base to finally fix this. In any case, I would propose simplifying this by making pulse_mat a produce of qubits rather than indices. Probably with a reverse in there to get the product ordering you want.

Please sign in to comment.