Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Commit 9b05a04

Browse files
committed
Address feedback.
1 parent 4519992 commit 9b05a04

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/Simulation/qdk_sim_rs/src/linalg/array_ext.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ use num_traits::Zero;
1010

1111
use crate::error::QdkSimError;
1212

13-
pub(crate) trait ShapeExt {
13+
pub(crate) trait ArrayBaseShapeExt {
1414
fn require_square(&self) -> Result<usize, QdkSimError>;
1515
}
1616

17-
impl<S, D> ShapeExt for ArrayBase<S, D>
17+
impl<S, D> ArrayBaseShapeExt for ArrayBase<S, D>
1818
where
1919
S: RawData,
2020
D: Dimension,
@@ -29,15 +29,15 @@ where
2929
}
3030
}
3131

32-
pub trait MatrixExt
32+
pub trait ArrayBaseMatrixExt
3333
where
3434
Self: Sized,
3535
{
3636
type Output;
3737
fn lower_triangular(&self) -> Self::Output;
3838
fn upper_triangular(&self) -> Self::Output;
3939
}
40-
impl<S, A> MatrixExt for ArrayBase<S, Ix2>
40+
impl<S, A> ArrayBaseMatrixExt for ArrayBase<S, Ix2>
4141
where
4242
S: Data<Elem = A>,
4343
A: Zero + Clone,
@@ -66,10 +66,10 @@ where
6666
}
6767
}
6868

69-
pub(crate) trait RemoveAxisExt {
69+
pub(crate) trait ArrayBaseRemoveAxisExt {
7070
fn swap_index_axis(&mut self, axis: Axis, idx_source: usize, idx_dest: usize);
7171
}
72-
impl<S, D> RemoveAxisExt for ArrayBase<S, D>
72+
impl<S, D> ArrayBaseRemoveAxisExt for ArrayBase<S, D>
7373
where
7474
S: Data + DataMut,
7575
<S as RawData>::Elem: Clone,
@@ -88,7 +88,7 @@ where
8888

8989
#[cfg(test)]
9090
mod tests {
91-
use super::MatrixExt;
91+
use super::ArrayBaseMatrixExt;
9292
use ndarray::{array, Array2};
9393

9494
#[test]

src/Simulation/qdk_sim_rs/src/linalg/decompositions/lu.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use num_traits::FromPrimitive;
99

1010
use crate::{
1111
error::QdkSimError,
12-
linalg::array_ext::{RemoveAxisExt, ShapeExt},
12+
linalg::array_ext::{ArrayBaseRemoveAxisExt, ArrayBaseShapeExt},
1313
};
1414

1515
/// Represents the output of an LU decomposition acting on a matrix.

0 commit comments

Comments
 (0)