aboutsummaryrefslogtreecommitdiff
path: root/libpsi-core/src/core/component.rs
diff options
context:
space:
mode:
Diffstat (limited to 'libpsi-core/src/core/component.rs')
-rw-r--r--libpsi-core/src/core/component.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/libpsi-core/src/core/component.rs b/libpsi-core/src/core/component.rs
index 09095ec..be5fbca 100644
--- a/libpsi-core/src/core/component.rs
+++ b/libpsi-core/src/core/component.rs
@@ -4,7 +4,7 @@ use crate::{complex, ColumnVector, Complex, Matrix, Vector, VectorMatrix};
use core::ops;
pub type QuantumBit = ColumnVector<Complex<f64>>;
-pub type QuantumGate = Matrix<Complex<f64>>;
+pub type QuantumGate = (&'static str, Matrix<Complex<f64>>);
#[macro_export]
macro_rules! count {
@@ -124,7 +124,7 @@ impl QuantumRegister {
}
pub fn apply(&self, gate: &QuantumGate) -> QuantumBit {
- self.state.mul_matrix(gate).unwrap()
+ self.state.mul_matrix(&gate.1).unwrap()
}
}