Skip to content

Commit

Permalink
Unique tomo pulses
Browse files Browse the repository at this point in the history
Prevent the generation of multiple pulses with the same id.
Specifically, the same slave trigger was referenced to n times, with n
the number of segments in the sequence. This was causing the Id appended
to the (same) trigger to grow at every segment. (lingering from PyQlab)
  • Loading branch information
dieris committed Feb 25, 2016
1 parent 9aea68e commit 569cd9a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions QGL/Tomography.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,14 @@ def process_tomo(seq, qubits, numPulses=4, measChans=None):
'''
if measChans is None:
measChans = qubits

if len(qubits)==1:
return [[prepBlock] + seq + [readoutBlock, MEAS(*measChans)]
for prepBlock, readoutBlock in product(create_tomo_blocks(qubits, numPulses), repeat=2)]

else:

return [[prepBlock] + seq + [readoutBlock, MEAS(*measChans)]
for prepBlock, readoutBlock in product(create_tomo_blocks(qubits, numPulses), repeat=2)]
return [[prepBlock] + seq + [readoutBlock, MEAS(*measChans)]
for prepBlock, readoutBlock in zip([create_tomo_blocks(qubits,numPulses)[int(k)] for k in (np.floor(np.arange(numPulses**4)/numPulses**2))],
[x for tomo_blocks in [create_tomo_blocks(qubits,numPulses) for _ in range(numPulses**2)] for x in tomo_blocks])]

0 comments on commit 569cd9a

Please sign in to comment.