File tree Expand file tree Collapse file tree 3 files changed +18
-19
lines changed Expand file tree Collapse file tree 3 files changed +18
-19
lines changed Original file line number Diff line number Diff line change 11# News
22
3+ ## v0.3.10 - 2025-04-06
4+
5+ - Deprecate ` PauliBasis ` as it is identical to ` SpinBasis(1//2)^N ` but without the compatibility with ` CompositeBasis ` .
6+
37## v0.3.9 - 2025-04-03
48
59- Deprecate ` equal_bases ` .
Original file line number Diff line number Diff line change 289289Base.:(== )(b1:: NLevelBasis , b2:: NLevelBasis ) = b1. N == b2. N
290290
291291
292- """
293- PauliBasis(num_qubits::Int)
294-
295- Basis for an N-qubit space where `num_qubits` specifies the number of qubits.
296- The dimension of the basis is 2²ᴺ.
297- """
298- struct PauliBasis{S,B} <: Basis
299- shape:: S
300- bases:: B
301- function PauliBasis (num_qubits:: T ) where {T<: Integer }
302- shape = [2 for _ in 1 : num_qubits]
303- bases = Tuple (SpinBasis (1 // 2 ) for _ in 1 : num_qubits)
304- return new {typeof(shape),typeof(bases)} (shape, bases)
305- end
306- end
307-
308- Base.:(== )(pb1:: PauliBasis , pb2:: PauliBasis ) = length (pb1. bases) == length (pb2. bases)
309-
310-
311292"""
312293 SpinBasis(n)
313294
Original file line number Diff line number Diff line change @@ -10,3 +10,17 @@ function equal_bases(a, b)
1010 end
1111 return true
1212end
13+
14+ struct PauliBasis{S,B} <: Basis
15+ shape:: S
16+ bases:: B
17+ function PauliBasis (num_qubits:: T ) where {T<: Integer }
18+ Base. depwarn (" `PauliBasis` is currently not the Pauli operator basis and its behavior will be changed in future versions." , :PauliBasis )
19+ shape = [2 for _ in 1 : num_qubits]
20+ bases = Tuple (SpinBasis (1 // 2 ) for _ in 1 : num_qubits)
21+ return new {typeof(shape),typeof(bases)} (shape, bases)
22+ end
23+ end
24+
25+ Base.:(== )(pb1:: PauliBasis , pb2:: PauliBasis ) = length (pb1. bases) == length (pb2. bases)
26+
You can’t perform that action at this time.
0 commit comments