From aa15ed2684a92312f4bca8b18c2f6d22edfa349e Mon Sep 17 00:00:00 2001 From: Fe-r-oz Date: Thu, 5 Dec 2024 16:33:29 +0500 Subject: [PATCH] use logx_ops, logz_ops --- ext/QuantumCliffordJuMPExt/QuantumCliffordJuMPExt.jl | 3 ++- ext/QuantumCliffordJuMPExt/util.jl | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ext/QuantumCliffordJuMPExt/QuantumCliffordJuMPExt.jl b/ext/QuantumCliffordJuMPExt/QuantumCliffordJuMPExt.jl index 92260bb65..53c1df00a 100644 --- a/ext/QuantumCliffordJuMPExt/QuantumCliffordJuMPExt.jl +++ b/ext/QuantumCliffordJuMPExt/QuantumCliffordJuMPExt.jl @@ -12,7 +12,8 @@ import QuantumClifford import QuantumClifford: stab_to_gf2, logicalxview, logicalzview, canonicalize!, MixedDestabilizer, Stabilizer import QuantumClifford.ECC -import QuantumClifford.ECC: distance, AbstractECC, code_n, code_k, parity_checks +import QuantumClifford.ECC: distance, AbstractECC, code_n, code_k, parity_checks, + logx_ops, logz_ops import SparseArrays import SparseArrays: SparseMatrixCSC, sparse, spzeros, findnz, sparsevec diff --git a/ext/QuantumCliffordJuMPExt/util.jl b/ext/QuantumCliffordJuMPExt/util.jl index bcd77f0ce..27155d65b 100644 --- a/ext/QuantumCliffordJuMPExt/util.jl +++ b/ext/QuantumCliffordJuMPExt/util.jl @@ -12,8 +12,8 @@ function get_stab(matrix::SparseMatrixCSC{Int, Int}, logical_operator_type::Symb end function get_lx_lz(c::Stabilizer) - lx = stab_to_gf2(logicalxview(canonicalize!(MixedDestabilizer(c)))) - lz = stab_to_gf2(logicalzview(canonicalize!(MixedDestabilizer(c)))) + lx = stab_to_gf2(logx_ops(c)) + lz = stab_to_gf2(logz_ops(c)) lx = SparseMatrixCSC{Int, Int}(lx) lz = SparseMatrixCSC{Int, Int}(lz) return lx, lz