Skip to content

Commit

Permalink
Remove second Wait
Browse files Browse the repository at this point in the history
There should already be a WAIT before compiling to TDM. It shouldn't be necessary to move it after the initial invalidate, set_mask etc., but to be tested
  • Loading branch information
Diego Ristè committed Jun 12, 2018
1 parent eba3c34 commit ea4e701
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
6 changes: 3 additions & 3 deletions QGL/BasicSequences/Feedback.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ def BitFlip3(data_qs, ancilla_qs, theta=None, phi=None, nrounds=1, meas_delay=1e
if len(data_qs) != 3 or len(ancilla_qs) != 2:
raise Exception("Wrong number of qubits")
seqs = [
DecodeSetRounds(1,0,2**nrounds-1),
Invalidate(addr=10, mask=2**nrounds-1),
DecodeSetRounds(1,0,nrounds),
Invalidate(addr=10, mask=4**nrounds-1),
Invalidate(addr=11, mask=0x1)]

# encode single-qubit state into 3 qubits
Expand All @@ -138,7 +138,7 @@ def BitFlip3(data_qs, ancilla_qs, theta=None, phi=None, nrounds=1, meas_delay=1e
seqs+= [MEASA(ancilla_qs[0], maddr=(10,2*k+1))*MEASA(ancilla_qs[1], maddr=(10,2*k+2)),
Id(ancilla_qs[0], meas_delay),
MEAS(data_qs[0],amp=0)*MEAS(data_qs[1],amp=0)*MEAS(data_qs[2],amp=0)] # virtual msmt's just to keep the number of segments uniform across digitizer channels
seqs+=Decode(10, 11, 2**nrounds-1)
seqs+=Decode(10, 11, 4**nrounds-1)
seqs+=qwait("RAM",11, 1)
seqs+=[MEAS(data_qs[0])*MEAS(data_qs[1])*MEAS(data_qs[2])
*MEAS(ancilla_qs[0],amp=0)*MEAS(ancilla_qs[1],amp=0)] # virtual msmt's just to keep the number
Expand Down
5 changes: 0 additions & 5 deletions QGL/drivers/APS2Pattern.py
Original file line number Diff line number Diff line change
Expand Up @@ -1304,11 +1304,6 @@ def tdm_instructions(seqs):

#add sync at the beginning of the sequence. FIXME: for now, ignore subroutines. Assume that the first entry is a label
instructions.append(Sync(label=label))
# add a WAIT before the first waveform FIXME: there must be a more efficient way
if ControlFlow.Wait not in seq:
ind_wait = min([ind for ind,s in enumerate(seq) if isinstance(s,PulseSequencer.Pulse) or isinstance(s,PulseSequencer.CompositePulse) or isinstance(s,PulseSequencer.CompoundGate) or isinstance(s,PulseSequencer.PulseBlock)])
seq.insert(ind_wait, ControlFlow.Wait())


label = None
for s in seq:
Expand Down

0 comments on commit ea4e701

Please sign in to comment.