error while using swap gate

Issue #10 resolved
Former user created an issue
>>> SWAP(3)|Ket(1, 0, 0)

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-62-9cf94f821dc5> in <module>()
----> 1 SWAP(3)|Ket(1, 0, 0)

/Users/Divergence/anaconda/lib/python2.7/site-packages/pyqc/braket.pyc in __ror__(self, other)
    670         # as this method could just be a wrapper
    671         if isinstance(other, OperatorBase):
--> 672             result = other.qobj * self.qobj
    673         elif isinstance(other, qutip.Qobj):
    674             try:

/Users/Divergence/anaconda/lib/python2.7/site-packages/pyqc/gates.pyc in qobj(self)
    256             mask[0] = 1
    257             mask[-1] = 1
--> 258         return qutip.swap(mask=mask)
    259 
    260 

TypeError: swap() got an unexpected keyword argument 'mask'

Comments (2)

  1. Log in to comment