Skip to content

Commit bb1fc7f

Browse files
committed
simplify the imports in test
1 parent e566bcf commit bb1fc7f

File tree

6 files changed

+13
-19
lines changed

6 files changed

+13
-19
lines changed

test/core-test/generalized_master_equation.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@testitem "Generalized Master Equation" default_imports=false begin
22
using Test
33
using QuantumToolbox
4-
import LinearAlgebra: triu
4+
using LinearAlgebra
55

66
N_c = 30
77
N_trunc = 10

test/core-test/low_rank_dynamics.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@testitem "Low Rank Dynamics" default_imports=false begin
22
using Test
33
using QuantumToolbox
4-
import LinearAlgebra: Diagonal, mul!
4+
using LinearAlgebra
55

66
# Define lattice
77
Nx, Ny = 2, 3

test/core-test/quantum_objects.jl

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
@testitem "Quantum Objects" default_imports=false begin
22
using Test
33
using QuantumToolbox
4-
5-
# Importing only the necessary functions to keep track the re-export of the functions
6-
import LinearAlgebra: I, triu, tril, triu!, tril!
7-
import SparseArrays: sparse, sprand, spzeros, nnz, SparseVector, SparseMatrixCSC
8-
import StaticArraysCore: SVector
4+
using LinearAlgebra
5+
using SparseArrays
6+
using StaticArraysCore
97

108
# ArgumentError: type is incompatible with vector or matrix
119
@testset "ArgumentError" begin

test/core-test/quantum_objects_evo.jl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
@testitem "Quantum Objects Evolution" default_imports=false begin
22
using Test
33
using QuantumToolbox
4-
5-
# Importing only the necessary functions to keep track the re-export of the functions
6-
import LinearAlgebra: I
7-
import SparseArrays: sprand
8-
import StaticArraysCore: SVector
9-
import SciMLOperators: MatrixOperator, NullOperator, IdentityOperator
4+
using LinearAlgebra
5+
using SparseArrays
6+
using StaticArraysCore
7+
using SciMLOperators
108

119
# DomainError: incompatible between size of array and type
1210
@testset "Thrown Errors" begin

test/core-test/states_and_operators.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
using Test
33
using QuantumToolbox
44
import QuantumToolbox: position, momentum
5-
6-
# Importing only the necessary functions to keep track the re-export of the functions
7-
import LinearAlgebra: I
8-
import SparseArrays: sparse, spzeros, spdiagm, SparseMatrixCSC, AbstractSparseMatrix
5+
using LinearAlgebra
6+
using SparseArrays
97

108
@testset "zero state" begin
119
v1 = zero_ket(4)

test/core-test/time_evolution.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
@testitem "Time Evolution and Partial Trace" default_imports=false begin
22
using Test
33
using QuantumToolbox
4-
import Random: MersenneTwister
5-
import SciMLOperators: MatrixOperator
4+
using Random
5+
using SciMLOperators
66

77
# Global definition of the system
88
N = 10

0 commit comments

Comments
 (0)