git: 2614c54c3c8c - main - science/py-qspin: Fix build with setuptools 58.0.0+
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 25 Mar 2022 13:50:48 UTC
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=2614c54c3c8cfd5ce41de3a4235054de912a9a65 commit 2614c54c3c8cfd5ce41de3a4235054de912a9a65 Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2022-03-25 13:33:37 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2022-03-25 13:38:19 +0000 science/py-qspin: Fix build with setuptools 58.0.0+ With hat: python --- science/py-qspin/files/patch-2to3 | 113 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) diff --git a/science/py-qspin/files/patch-2to3 b/science/py-qspin/files/patch-2to3 new file mode 100644 index 000000000000..6114807db1bf --- /dev/null +++ b/science/py-qspin/files/patch-2to3 @@ -0,0 +1,113 @@ +--- qspin/jones.py.orig 2016-08-28 06:00:41 UTC ++++ qspin/jones.py +@@ -71,61 +71,61 @@ def vsth(): + szc = 0.5*np.matrix([[1,-i],[i,1]]) - 0.5*np.matrix([[1,i],[-i,1]]) + + def photon(): +- print '----------------' +- print '|H>' ++ print('----------------') ++ print('|H>') + J,a,rho = jones(0,0,'blue') +- print 'J = ',J.T +- print 'a = ',a +- print 'rho = ' +- print rho +- print 'spins' +- print np.trace(sx*rho),np.trace(sy*rho),np.trace(sz*rho) +- print '----------------' +- print '|V>' ++ print('J = ',J.T) ++ print('a = ',a) ++ print('rho = ') ++ print(rho) ++ print('spins') ++ print(np.trace(sx*rho),np.trace(sy*rho),np.trace(sz*rho)) ++ print('----------------') ++ print('|V>') + J,a,rho = jones(pi,0,'blue') +- print 'J = ',J.T +- print 'a = ',a +- print 'rho = ' +- print rho +- print 'spins' +- print np.trace(sx*rho),np.trace(sy*rho),np.trace(sz*rho) +- print '----------------' +- print '|D> = |H>+|V>' ++ print('J = ',J.T) ++ print('a = ',a) ++ print('rho = ') ++ print(rho) ++ print('spins') ++ print(np.trace(sx*rho),np.trace(sy*rho),np.trace(sz*rho)) ++ print('----------------') ++ print('|D> = |H>+|V>') + J,a,rho = jones(pi/2,0,'green') +- print 'J = ',J.T +- print 'a = ',a +- print 'rho = ' +- print rho +- print 'spins' +- print np.trace(sx*rho),np.trace(sy*rho),np.trace(sz*rho) +- print '----------------' +- print '|A> = |H>-|V>' ++ print('J = ',J.T) ++ print('a = ',a) ++ print('rho = ') ++ print(rho) ++ print('spins') ++ print(np.trace(sx*rho),np.trace(sy*rho),np.trace(sz*rho)) ++ print('----------------') ++ print('|A> = |H>-|V>') + J,a,rho = jones(pi/2,pi,'green') +- print 'J = ',J.T +- print 'a = ',a +- print 'rho = ' +- print rho +- print 'spins' +- print np.trace(sx*rho),np.trace(sy*rho),np.trace(sz*rho) +- print '----------------' +- print '|L> = |H>+i|V>' ++ print('J = ',J.T) ++ print('a = ',a) ++ print('rho = ') ++ print(rho) ++ print('spins') ++ print(np.trace(sx*rho),np.trace(sy*rho),np.trace(sz*rho)) ++ print('----------------') ++ print('|L> = |H>+i|V>') + J,a,rho = jones(pi/2,pi/2,'red') +- print 'J = ',J.T +- print 'a = ',a +- print 'rho = ' +- print rho +- print 'spins' +- print np.trace(sx*rho),np.trace(sy*rho),np.trace(sz*rho) +- print '----------------' +- print '|R> = |H>-i|V>' ++ print('J = ',J.T) ++ print('a = ',a) ++ print('rho = ') ++ print(rho) ++ print('spins') ++ print(np.trace(sx*rho),np.trace(sy*rho),np.trace(sz*rho)) ++ print('----------------') ++ print('|R> = |H>-i|V>') + J,a,rho = jones(pi/2,-pi/2,'red') +- print 'J = ',J.T +- print 'a = ',a +- print 'rho = ' +- print rho +- print 'spins' +- print np.trace(sx*rho),np.trace(sy*rho),np.trace(sz*rho) +- print '----------------' ++ print('J = ',J.T) ++ print('a = ',a) ++ print('rho = ') ++ print(rho) ++ print('spins') ++ print(np.trace(sx*rho),np.trace(sy*rho),np.trace(sz*rho)) ++ print('----------------') + + V = np.matrix([1,0]).T + H = np.matrix([0,1]).T