Skip to content

Commit 81f7baa

Browse files
committed
Remove usage of PauliBasis
1 parent 24d1fbc commit 81f7baa

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

docs/src/api.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -598,10 +598,6 @@ passive_state
598598

599599
## [Pauli](@id API: Pauli)
600600

601-
```@docs
602-
PauliBasis
603-
```
604-
605601
```@docs
606602
PauliTransferMatrix
607603
```
@@ -640,4 +636,4 @@ lazytensor_cachesize
640636

641637
```@docs
642638
lazytensor_clear_cache
643-
```
639+
```

test/test_metrics.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,7 @@ rho_mix = DenseOperator(rho_ent.basis_l, diagm(ComplexF64[1.0,1.0,1.0,1.0]))
127127
@test_throws ArgumentError entanglement_entropy(rho_mix, (1,2))
128128
@test_throws ArgumentError entanglement_entropy(rho_mix, 3)
129129

130-
q2 = PauliBasis(2)
131-
CNOT = DenseOperator(q2, q2, diagm(0 => [1,1,0,0], 1 => [0,0,1], -1 => [0,0,1]))
130+
CNOT = dm(spinup(b1))identityoperator(b1) + dm(spindown(b1))sigmax(b1)
132131
CNOT_sop = SuperOperator(CNOT)
133132
CNOT_chi = ChiMatrix(CNOT)
134133
CNOT_ptm = PauliTransferMatrix(CNOT)

test/test_pauli.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ using QuantumOpticsBase
55

66
@testset "pauli" begin
77

8-
@test_throws MethodError PauliBasis(1.4)
9-
8+
b = SpinBasis(1//2)
109
# Test conversion of unitary matrices to superoperators.
11-
q2 = PauliBasis(2)
12-
q3 = PauliBasis(3)
10+
q2 = b^2
11+
q3 = b^3
1312
CZ = DenseOperator(q2, q2, diagm(0 => [1,1,1,-1]))
1413
CZ_sop = SuperOperator(CZ)
1514

0 commit comments

Comments
 (0)