Skip to content

Commit

Permalink
Fix bug and redundant check
Browse files Browse the repository at this point in the history
Fix loop range and remove unnecessary separate clause for 1 qubit
  • Loading branch information
dieris committed Mar 7, 2016
1 parent 8756823 commit 0aecc5e
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions QGL/Tomography.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,8 @@ def process_tomo(seq, qubits, numPulses=4, measChans=None):
if measChans is None:
measChans = qubits

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

else:

seqs=[]
for k in range(numPulses**2):
seqs=[]
for k in range(numPulses**qubits):
for readoutBlock in create_tomo_blocks(qubits, numPulses):
prepBlock = create_tomo_blocks(qubits,numPulses)[k]
tomoseq = [prepBlock] + seq + [readoutBlock, MEAS(*measChans)]
Expand Down

0 comments on commit 0aecc5e

Please sign in to comment.