Skip to content

Commit

Permalink
avoid plotting of unused-qubits
Browse files Browse the repository at this point in the history
Yet decorator implementation may be adopted in the future to provide cleaner coding and more flexible usage.
  • Loading branch information
chensgit169 authored and Zhaoyilunnn committed Aug 8, 2023
1 parent 0384c8d commit e73b585
Showing 1 changed file with 0 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,3 @@ def __add__(self, other: 'QuantumRegister'):

def exchange(self, p1, p2):
pass


if __name__ == '__main__':
# q0 = Qubit(0)
# q1 = Qubit(1)
# reg = {q.pos: q for q in [q0, q1]}
# print(reg)
#
# reg[0], reg[1] = reg[1], reg[0]
# reg[0].pos, reg[1].pos = reg[1].pos, reg[0].pos
#
# print(reg)
# print([q0.pos, q1.pos])
reg = QuantumRegister(4, name='reg')
print(reg[3])

0 comments on commit e73b585

Please sign in to comment.