feat(quantum): Q7 density linear algebra and advanced SVG viz
Add density-matrix ops (partial trace, Hermitian eig, Schmidt, Pauli expect, purity/fidelity, kron) and hinton/city/qsphere/paulivec/multibloch draw kinds via plugins/quantum ABI, with EN/ZH L1 and gold smokes. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
4956460773
commit
88fe076216
13 files changed
+1871
-8
No files matched your search
@@ -42,6 +42,18 @@ impl C {
|
||||
im: self.im * s,
|
||||
}
|
||||
}
|
||||
pub fn conj(self) -> C {
|
||||
C {
|
||||
re: self.re,
|
||||
im: -self.im,
|
||||
}
|
||||
}
|
||||
pub fn sub(self, o: C) -> C {
|
||||
C {
|
||||
re: self.re - o.re,
|
||||
im: self.im - o.im,
|
||||
}
|
||||
}
|
||||
pub fn to_json(self) -> Value {
|
||||
json!({ "re": self.re, "im": self.im })
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user