Skip to content

Commit

Permalink
Update two-qubit-process-tomography.py
Browse files Browse the repository at this point in the history
Fix qubit1/qubit2 typo, add frame reset and phase reset note, and fix align qua function call typo
  • Loading branch information
bornman-nick authored Jan 18, 2025
1 parent 908e6a7 commit a958145
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def measurement_basis_change(k, l, qubit1, qubit2):
# Change basis with operation k on qubit1
with switch_(k):
with case_(0):
wait(pi_len // 4, f"q{qubit2}_xy")
wait(pi_len // 4, f"q{qubit1}_xy")
with case_(1):
play("x180", f"q{qubit1}_xy")
with case_(2):
Expand Down Expand Up @@ -224,6 +224,10 @@ def measurement_basis_change(k, l, qubit1, qubit2):
m2, 0, m2 <= 5, m2 + 1
): # QUA for_ loop for switching between Bloch basis projections/measurements on qubit 2

# NOTE: the following frame and phase resets may not be necessary, depending on whether you're
# investigating more trivial single qubit gates or more complex entangling gates where
# relative phases are more important

reset_frame(f"q{qubit1}_xy")
reset_frame(f"q{qubit2}_xy")

Expand All @@ -238,7 +242,7 @@ def measurement_basis_change(k, l, qubit1, qubit2):
# apply the process to be analysed
analysed_process(qubit1, qubit2)

aling()
align()

# projective measurement basis change
measurement_basis_change(m1, m2, qubit1, qubit2)
Expand Down

0 comments on commit a958145

Please sign in to comment.