From e73b58549dc85ee947077ba4fe91b19cb06cfc5a Mon Sep 17 00:00:00 2001 From: chensgit169 Date: Tue, 8 Aug 2023 19:40:38 +0800 Subject: [PATCH] avoid plotting of unused-qubits Yet decorator implementation may be adopted in the future to provide cleaner coding and more flexible usage. --- .../circuits/{qreg.py => quantum_register.py} | 15 --------------- 1 file changed, 15 deletions(-) rename src/quafu/circuits/{qreg.py => quantum_register.py} (85%) diff --git a/src/quafu/circuits/qreg.py b/src/quafu/circuits/quantum_register.py similarity index 85% rename from src/quafu/circuits/qreg.py rename to src/quafu/circuits/quantum_register.py index dc8b2ae..cc7d458 100644 --- a/src/quafu/circuits/qreg.py +++ b/src/quafu/circuits/quantum_register.py @@ -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])