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-21
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-20
48
59- Implement general ` tensor_pow ` via ` power_by_squaring `
Original file line number Diff line number Diff line change 282282Base.:(== )(b1:: NLevelBasis , b2:: NLevelBasis ) = b1. N == b2. N
283283
284284
285- """
286- PauliBasis(num_qubits::Int)
287-
288- Basis for an N-qubit space where `num_qubits` specifies the number of qubits.
289- The dimension of the basis is 2²ᴺ.
290- """
291- struct PauliBasis{S,B} <: Basis
292- shape:: S
293- bases:: B
294- function PauliBasis (num_qubits:: T ) where {T<: Integer }
295- shape = [2 for _ in 1 : num_qubits]
296- bases = Tuple (SpinBasis (1 // 2 ) for _ in 1 : num_qubits)
297- return new {typeof(shape),typeof(bases)} (shape, bases)
298- end
299- end
300-
301- Base.:(== )(pb1:: PauliBasis , pb2:: PauliBasis ) = length (pb1. bases) == length (pb2. bases)
302-
303-
304285"""
305286 SpinBasis(n)
306287
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 not the Pauli operator basis will be removed 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