Skip to content

Commit

Permalink
Move Barrier to QGL1.
Browse files Browse the repository at this point in the history
  • Loading branch information
blakejohnson committed May 15, 2017
1 parent c015e99 commit 66ed22c
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 31 deletions.
4 changes: 2 additions & 2 deletions src/python/pyqgl2/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ def countChannelsInSequences(seqs):
from QGL.Channels import Qubit as qgl1Qubit
from QGL.Channels import Edge
from QGL.PatternUtils import flatten
from qgl2.qgl1control import Barrier
from qgl2.qgl1 import Barrier
import collections
import logging

Expand Down Expand Up @@ -605,7 +605,7 @@ def mapQubitsToSequences(seqs):
from QGL.Compiler import find_unique_channels
from QGL.Channels import Qubit as qgl1Qubit
from QGL.Channels import Edge
from qgl2.qgl1control import Barrier
from qgl2.qgl1 import Barrier
import copy
import logging

Expand Down
3 changes: 1 addition & 2 deletions src/python/qgl2/qgl1.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,7 @@ def Wait() -> control:
def Sync() -> control:
print('Sync')

# This function is QGL1 but only for use by QGL2
@qgl2stub('qgl2.qgl1control')
@qgl2stub('QGL.ControlFlow')
def Barrier(chanlist: qreg) -> control:
# chanlist is list of channels that are waiting here
print('Barrier(%s)' % (chanlist))
Expand Down
23 changes: 0 additions & 23 deletions src/python/qgl2/qgl1control.py

This file was deleted.

3 changes: 1 addition & 2 deletions test/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
from QGL.PulseSequencer import Pulse, CompositePulse
from QGL.PatternUtils import flatten
from QGL.PulsePrimitives import Id, X, MEAS
from QGL.ControlFlow import qsync, qwait, ControlInstruction, Goto
from QGL.ControlFlow import qsync, qwait, ControlInstruction, Goto, Barrier
from QGL.BlockLabel import BlockLabel
from qgl2.qgl1control import Barrier

import collections
from math import pi
Expand Down
1 change: 0 additions & 1 deletion test/test_basic_mins.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from pyqgl2.main import compile_function
from pyqgl2.qreg import QRegister
from QGL import *
from qgl2.qgl1control import Barrier

from test.helpers import testable_sequence, \
channel_setup, assertPulseSequenceEqual, \
Expand Down
1 change: 0 additions & 1 deletion test/test_multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from pyqgl2.main import compile_function

from QGL import *
from qgl2.qgl1control import Barrier

class TestMulti(unittest.TestCase):
def setUp(self):
Expand Down

0 comments on commit 66ed22c

Please sign in to comment.