@@ -75,22 +75,22 @@ full dimension of the circuit:
7575
7676.. testoutput ::
7777
78- [Quantum object: dims = [[2, 2], [2, 2]], shape = (4, 4), type = oper, isherm = True
78+ [Quantum object: dims= [[2, 2], [2, 2]], shape= (4, 4), type=' oper', dtype=CSR, isherm= True
7979 Qobj data =
8080 [[1. 0. 0. 0.]
8181 [0. 0. 1. 0.]
8282 [0. 1. 0. 0.]
83- [0. 0. 0. 1.]], Quantum object: dims = [[2, 2], [2, 2]], shape = (4, 4), type = oper, isherm = True
83+ [0. 0. 0. 1.]], Quantum object: dims= [[2, 2], [2, 2]], shape= (4, 4), type=' oper', dtype=CSR, isherm= True
8484 Qobj data =
8585 [[1. 0. 0. 0.]
8686 [0. 1. 0. 0.]
8787 [0. 0. 0. 1.]
88- [0. 0. 1. 0.]], Quantum object: dims = [[2, 2], [2, 2]], shape = (4, 4), type = oper, isherm = True
88+ [0. 0. 1. 0.]], Quantum object: dims= [[2, 2], [2, 2]], shape= (4, 4), type=' oper', dtype=CSR, isherm= True
8989 Qobj data =
9090 [[0. 0. 1. 0.]
9191 [0. 0. 0. 1.]
9292 [1. 0. 0. 0.]
93- [0. 1. 0. 0.]], Quantum object: dims = [[2, 2], [2, 2]], shape = (4, 4), type = oper, isherm = True
93+ [0. 1. 0. 0.]], Quantum object: dims= [[2, 2], [2, 2]], shape= (4, 4), type=' oper', dtype=CSR, isherm= True
9494 Qobj data =
9595 [[1. 0. 0. 0.]
9696 [0. 0. 1. 0.]
@@ -110,25 +110,25 @@ can be achieved with the argument ``expand=False`` specified to the
110110
111111.. testoutput ::
112112
113- [Quantum object: dims = [[2, 2], [2, 2]], shape = (4, 4), type = oper, isherm = True
114- Qobj data =
115- [[1. 0. 0. 0.]
116- [0. 0. 1. 0.]
117- [0. 1. 0. 0.]
118- [0. 0. 0. 1.]], Quantum object: dims = [[2, 2], [2, 2]], shape = (4, 4), type = oper, isherm = True
119- Qobj data =
120- [[1. 0. 0. 0.]
121- [0. 1. 0. 0.]
122- [0. 0. 0. 1.]
123- [0. 0. 1. 0.]], Quantum object: dims = [[2], [2]], shape = (2, 2), type = oper, isherm = True
124- Qobj data =
125- [[0. 1.]
126- [1. 0.]], Quantum object: dims = [[2, 2], [2, 2]], shape = (4, 4), type = oper, isherm = True
127- Qobj data =
128- [[1. 0. 0. 0.]
129- [0. 0. 1. 0.]
130- [0. 1. 0. 0.]
131- [0. 0. 0. 1.]]]
113+ [Quantum object: dims= [[2, 2], [2, 2]], shape= (4, 4), type=' oper', dtype=Dense, isherm= True
114+ Qobj data =
115+ [[1. 0. 0. 0.]
116+ [0. 0. 1. 0.]
117+ [0. 1. 0. 0.]
118+ [0. 0. 0. 1.]], Quantum object: dims= [[2, 2], [2, 2]], shape= (4, 4), type=' oper', dtype=Dense, isherm= True
119+ Qobj data =
120+ [[1. 0. 0. 0.]
121+ [0. 1. 0. 0.]
122+ [0. 0. 0. 1.]
123+ [0. 0. 1. 0.]], Quantum object: dims= [[2], [2]], shape= (2, 2), type=' oper', dtype=Dense, isherm= True
124+ Qobj data =
125+ [[0. 1.]
126+ [1. 0.]], Quantum object: dims= [[2, 2], [2, 2]], shape= (4, 4), type=' oper', dtype=Dense, isherm= True
127+ Qobj data =
128+ [[1. 0. 0. 0.]
129+ [0. 0. 1. 0.]
130+ [0. 1. 0. 0.]
131+ [0. 0. 0. 1.]]]
132132
133133.. _quantum_gates :
134134
@@ -195,7 +195,7 @@ gate function returning a :class:`qutip.Qobj` and save it in the attribute ``use
195195
196196 def user_gate1(arg_value):
197197 # controlled rotation X
198- mat = np.zeros((4, 4), dtype=np.complex )
198+ mat = np.zeros((4, 4), dtype=np.complex128 )
199199 mat[0, 0] = mat[1, 1] = 1.
200200 mat[2:4, 2:4] = rx(arg_value).full()
201201 return Qobj(mat, dims=[[2, 2], [2, 2]])
@@ -229,7 +229,7 @@ gate function returning a :class:`qutip.Qobj` and save it in the attribute ``use
229229.. testoutput ::
230230 :options: +NORMALIZE_WHITESPACE
231231
232- Quantum object: dims = [[2, 2], [2, 2]], shape = (4, 4), type = oper, isherm = False
232+ Quantum object: dims= [[2, 2], [2, 2]], shape= (4, 4), type=' oper', dtype=CSR, isherm= False
233233 Qobj data =
234234 [[1. +0.j 0. +0.j 0. +0.j 0. +0.j ]
235235 [0. +0.j 1. +0.j 0. +0.j 0. +0.j ]
@@ -246,7 +246,7 @@ gate function returning a :class:`qutip.Qobj` and save it in the attribute ``use
246246 :options: +NORMALIZE_WHITESPACE
247247
248248
249- Quantum object: dims = [[2, 2], [2, 2]], shape = (4, 4), type = oper, isherm = False
249+ Quantum object: dims= [[2, 2], [2, 2]], shape= (4, 4), type=' oper', dtype=CSR, isherm= False
250250 Qobj data =
251251 [[1. +0.j 0. +0.j 0. +0.j 0. +0.j ]
252252 [0. +0.j 0.70711+0.j 0. +0.j 0. -0.70711j]
@@ -263,12 +263,12 @@ gate function returning a :class:`qutip.Qobj` and save it in the attribute ``use
263263.. testoutput ::
264264 :options: +NORMALIZE_WHITESPACE
265265
266- Quantum object: dims = [[2, 2], [2, 2]], shape = (4, 4), type = oper, isherm = False
267- Qobj data =
268- [[1.+0.j 0.+0.j 0.+0.j 0.+0.j]
269- [0.+0.j 0.+1.j 0.+0.j 0.+0.j]
270- [0.+0.j 0.+0.j 1.+0.j 0.+0.j]
271- [0.+0.j 0.+0.j 0.+0.j 0.+1.j]]
266+ Quantum object: dims= [[2, 2], [2, 2]], shape= (4, 4), type=' oper', dtype=CSR, isherm= False
267+ Qobj data =
268+ [[1.+0.j 0.+0.j 0.+0.j 0.+0.j]
269+ [0.+0.j 0.+1.j 0.+0.j 0.+0.j]
270+ [0.+0.j 0.+0.j 1.+0.j 0.+0.j]
271+ [0.+0.j 0.+0.j 0.+0.j 0.+1.j]]
272272
273273.. _quantum_circuit_plots :
274274
0 commit comments