permute
will be a wrapper around toQuantumInterface.permutesubsystems
. Documentation forpermute!
would be similarly updated- reworking the rest of
NoisyCircuits
and moving it out ofExperimental
- Enhancements to
GF(2)
Linear Algebra: unexported, experimentalgf2_row_echelon_with_pivots!
,gf2_nullspace
,gf2_rowspace_basis
.
pftrajectories
now supports fast multiqubit measurements withPauliMeasurement
in addition to the already supported single qubit measurementssMX/Z/Y
and workarounds likenaive_syndrome_circuit
.
- (fix)
affectedqubits()
onsMX
,sMY
, andsMR*
- (fix) restrictive type-assert in
MixedDestabilizer
failing on views of tableaux - Implementing additional named two-qubit gates:
sSQRTXX, sInvSQRTXX, sSQRTYY, sInvSQRTYY
- New error-correction group theory tools:
canonicalize_noncomm
function to find a generating set with minimal anticommutivitySubsystemCodeTableau
data structure to represent the output ofcanonicalize_noncomm
commutify
function to find a commutative version of a non-commutative set of Paulis with minimal changesmatroid_parent
to, for set of Paulis that doesn't represent a state, find a version that does.
- Implementing additional named two-qubit gates:
sSWAPCX, sInvSWAPCX, sCZSWAP, sCXSWAP, sISWAP, sInvISWAP, sSQRTZZ, sInvSQRTZZ
- Minor compat fixes for julia 1.11 in the handling of
hgp
hcat
of Tableaux objectsQuantumReedMuller
codes added to the ECC module- (breaking) change the convention for how to provide a representation function in the constructor of
LPCode
-- strictly speaking a breaking change, but this is not an API that is publicly used in practice
- The lifted product class of quantum LDPC codes is implemented in the ECC submodule.
- (fix)
ECC.code_s
now gives the number of parity checks with redundancy. If you want the number of linearly independent parity checks, you can useLinearAlgebra.rank
. - Implementing many more named single-qubit gates following naming convention similar to the stim package in python.
- (fix) Bug fix to the
parity_checks(ReedMuller(r, m))
of classical Reed-Muller code (it was returning generator matrix). RecursiveReedMuller
code implementation as an alternative implementation ofReedMuller
.
inv
is implemented for all Clifford operator types (symbolic, dense, sparse).
- New group-theoretical tools:
groupify
to generate full stabilizer group from generating setminimal_generating_set
function to find the minimal generating set of a set of operatorspauligroup
to generate the full Pauli group of a certain number of qubitsnormalizer
to generate all Paulis that commute with a set of Pauliscentralizer
to find a subset of a set of Paulis such that each element in the subset commutes with each element in the setcontractor
to find a subset of Paulis in a tableau that have an identity operator on a certain qubitdelete_columns
to remove the operators corresponding to a certain qubit from all Paulis in a Stabilizer
PauliError
can now encode biased noise during Pauli frame simulation, i.e. one can simulate only X errors, or only Y errors, or only Z errors, or some weighted combination of these.
- (fix
#320
) Fix a serious correctness bug in the SIMD implementation of Pauli string multiplication (affects the correctness of canonicalization and traceout for tableaux bigger than ~500 qubits; does not affect symbolic gates or Pauli frame simulations of any scale)
inv
implementation for single-qubit "symbolic" Clifford operators (subtypes ofAbstractSingleQubitOperator
).
- Implementation of random all-to-all and brickwork Clifford circuits and corresponding ECC codes.
- Addition of a constructor for concatenated quantum codes
Concat
. - Addition of multiple unexported classical code constructors.
- Gate errors are now conveniently supported by the various ECC benchmark setups in the
ECC
module. - Significant improvements to the low-level circuit compiler (the sumtype compactifier), leading to faster Pauli frame simulation of noisy circuits.
- Bump
QuantumOpticsBase.jl
package extension compat bound. - (fix) Remove printing of spurious debug info from the PyBP decoder.
- (fix) Failed compactification of gates now only raises a warning instead of throwing an error. Defaults to slower non-compactified gates.
- (fix) One of
random_pauli
's methods was disregarding the error probability and had incorrect kwarg defaults.
- The ECC module now has access to an iterative bitflip decoder thanks to
LDPCDecoders.jl
. - Provide more configuration options in the
PyBeliefProp
decoders. - (fix) The belief prop decoder from LDPCDecoders was counting iterations incorrectly.
- Implemented
iscss
function to identify whether a given code is known to be a CSS (Calderbank-Shor-Steane) code. - Added the classical Reed-Muller code in the ECC module.
- Added the surface code to the ECC module.
- (breaking) The defaults in
random_pauli
are nowrealphase=true
andnophase=true
. - (breaking) The convention for for flip probability in
random_pauli
. - (breaking) The convention for noise probability in
UnbiasedUncorrelatedNoise
changed. The input number is the total probability for an error to occur. - Implement an inplace
random_pauli!
, a non-allocating alternative torandom_pauli
. - Significant improvement in the performance of the ECC decoder pipeline (but many low-hanging fruits still remain).
- Implemented the Gottesman code family, also known as [[2^j, 2^j - j - 2, 3]] quantum Hamming codes.
- Bump the
PyQDecoders
dependency, switching toPythonCall
behind the scenes for reliability. - Bump the
LDPCDecoders
dependency.
- Significant additions to the
ECC
submodule, with constructors for a few new codes (Toric
and genericCSS
); incorporating many syndrome decoding algorithms (thanks to thePyQDecoders.jl
andLDPCDecoders.jl
packages); and providing a convenient API for evaluating code performance in different settings through the newevaluate_decoder
function.
- Bumping up the lower bounds of many dependencies and adding lower-bound compatibility checks to CI.
ECC.faults_matrix
detects and warns when encountery codes with redundant checks.
- (fix) Some
affectedqubits
methods were returning single integers instead of a one-tuple. - The non-public
ECC
module has seen a few improvements (anaive_encoding_circuit
implementation and a few new codes), as well as some breaking changes to API.
- (breaking) Changes to the circuit generation in the non-public ECC module. Adding a Shor syndrome measurement circuit.
- Added a
ClassicalXOR
gate, for now supporting onlyPauliFrame
s.
- Initial support for GPU accelerated circuit simulation (with CUDA).
- Minor documentation fixes around
phases
and a workaround for Makie plotting regression.
- Circuit plotting with Quantikz from inside other modules (common with Pluto) showed wrong names for gates due to how we were serializing the names. It is now fixed.
- (fix) There was a bug with incorrect scaling for
Operator(::CliffordOperator)
conversions. - A few more features to the
ECC
module's circuit generation routines. - Quantikz circuit plotting improvements to
CliffordOperator
ands*CY
andsYC*
.
- Initial implementation of non-Clifford simulation (mainly for circuits that are slightly non-Clifford, e.g. containing T gates). See
StabMixture
,PauliChannel
,UnitaryPauliChannel
, andpcT
. embed
implemented forPauliOperator
andPauliChannel
.- Various convenience constructors that transform a tableaux or an operator into a
Ket
orOperator
fromQuantumOptics.jl
. Use the constructors directly likeKet(::Stabilizer)
,Operator(::CliffordOperator)
, etc.
petrajectories
, for (potentially symbolic) perturbative expansions of the result of a circuit, is moved out ofExperimental
into the public part of the interface. The underlyingpetrajectory
is not made public yet due to the ad-hoc low-level return conventions for it.mctrajectory
andpetrajectory
can now optionally report the end state of each trajectory, not just the circuit status (i.e. "success", "detected failure", etc).- Internally we now use a trait system to distinguish deterministic from non-deterministic operations. Not part of the public API yet.
- Remove Polyester.jl multithreading, leading to simpler and better compiled single-thread code. Now single-thread performance is much higher. Multithreading was generally not useful at the inner loops where it was deployed.
- Implement
fastcolumn
andfastrow
, which transform a tableau into a memory layout optimized for column or row operations.
- In the unexported experimental ECC module:
- we now implement
fault_matrix
which gives the mapping between single-qubit physical errors and logical observables. MixedDestabilizer
andStabilizer
now have constructors when acting on an ECC object.
- we now implement
stab_to_gf2
now works with Pauli operators as well.
- Bump
QuantumInterface
compat.
- Better UX and threading support for
pftrajectories
. affectedqubits
now more consistently returns tuples instead of vectors.- Private
affectedbits
is now implemented. - Many operation constructors now throw an error if they are given negative qubit indices.
- Fixes to Quantikz circuit plotting of empty circuits and
PauliOperator
- Internal helper method
mul_right!
is now available for right Pauli inplace multiplication. - Implemented
sMRZ
to reset single qubits to the |0⟩ (and respectivelysMRX
andsMRY
).
- Bump
QuantumInterface
to 0.2.0.
- Improvements to printing and documentation.
- Initial, experimental, unexported helper functions for work with error correcting codes. Might change at any time.
- (fix) Fix to Quantikz circuit plotting functions.
- (breaking) Deprecated the
QuantumCliffordPlots
library and moved that functionality to 3 package extensions, one for each ofQuantikz
,Plots
, andMakie
visualizations. - (breaking) Set minimum requirements to Julia 1.9
- Initial implementation of Pauli frame simulations (with
pftrajectories
andPauliFrame
) - Initial support for "sum type" gates for much faster dispatch (with
compactify_circuit
) - (fix) Fixes to print/show formatting.
- Non-standard string literals
P
,T
,S
, andC
(e.g.P"X"
used to create a Pauli operator) are now not cached at compile time. Before this versionf() = P"X"
would have resulted inf() === f()
, while now that statement would return false. Change made given that the objects created by these literals are mutable which can lead to bugs where a local variable seems to "remember" how it is being modified at each execution of a function.
- Better printing of tableaux and operators.
- (breaking) Switched the convention for results from
apply!(Register(...), sMX)
(and corresponding forsMY
andsMZ
). Previously the +1 eigenvector and -1 eigenvector were mapped to 1 and 0 as measurement results. This is inconvenient for boolean math and contrary to typical convection. Moving to standard convention now (+1 eigenvector corresponds to result 0). Most convenient becauseeigenvalue = (-1)^measurement result
. - The clipped gauge (
canonicallize_clip!
) now works on mixed (i.e. incomplete, i.e. non-square) tableaux
- (fix) Fixed bug in
CliffordOperator(AbstractTwoQubitOperator)
. - Fixes to inference failures (detected by JET).
- Significant test coverage increase.
- Significant improvement in TTFX thanks to fixes to Polyester.jl (for Julia 1.9).
- Stabilizing a few features, moving out of
Experimental.NoisyCircuits
applynoise!
affectedqubits
NoisyGate
NoiseOp
andNoiseOpAll
UnbiasedUncorrelatedNoise
random_destabilizer(rank,nb_of_qubits)
now exists to provide a randomMixedDestabilizer
instance of a givenrank
.- Stabilizing a few features, moving out of
Experimental.NoisyCircuits
BellMeasurement
mctrajectories
,mctrajectory!
,applywstatus!
CircuitStatus
colpermute!
was turned intoBase.permute!
. It was not documented or used previously.check_allrowscommute
is not exported by default anymore. It was not documented or used previously.
- Minor API adjustments in preparation for releasing
BPGates.jl
.
- Move the API declarations to
QuantumInterface.jl
, a mostly namespacing package shared withQuantumOptics.jl
.
- Bring the v0.6.2 performance improvements to Julia 1.7 and 1.6. Switch from using
constprop
to explicit static dispatch with@valbooldispatch
. - Support Julia 1.6 again.
- Performance improvements: fine tuning of
constprop
, eliminating a handful of common causes of dynamic dispatch. - Drop support for Julia 1.6.
- (fix) Fix a bug in the unexported
projectremoverand!
that occurred due to the introduction ofTableau
.
- (breaking) Split the
Stabilizer
object into aStabilizer
that semantically represents a state, and a generalTableau
that does not carry such an interpretation.Stabilizer
usesTableau
internally.stab.xzs
andstab.phases
property access would now fail. Usetab(stab)
to get the tableau object andphases(stab)
to get the phases. - Simplify type parameters.
Register
now works withtraceout!
andproject*rand!
.
- Implement
projectremoverand!
which besides performing a projective measurement likeprojectrand!
also removes the measured qubit from the tableau, returning a smaller tableau. Not yet exported in public API.
- (fix)
apply!(S"XXX", P"X", [1])
and similar sparse Pauli applies were giving wrong results. - Significant speedup of
petrajectories
thanks to an order of magnitude speedup inapplynoise_branches(...,::UnbiasedUncorrelatedNoise)
. - Expanding test suite, including base functions,
Experimental.NoisyCircuits
, and others. Re-establishing tests of alternative bit-packing.
- (fix) Bug-fixes to
PauliMeasurement
,Reset
, andRegister
, detected by JET.
- (breaking fix)
CliffordOperator
constructor called on a square tableau occasionally resulted in incorrect results due to row-reordering during canonicalization. - Continuing static analysis fixes thanks to JET.
- Optimization of
canonicalize_clip!
, now resulting in much fewer allocations.
- Start using
JET.jl
for static analysis during CI. - The
MixedDestabilizer
constructor now accepts over redundant tableaux (tableaux with redundant rows). - Resolved multiple method ambiguities and started testing for them with
Aqua.jl
in CI.
- (fix
#60
)enumerate_clifford
was broken due to an earlier refactor inrowswap!
- Implement the clipped gauge canonicalization
canonicalize_clip!
and related functions. - Implement
entanglement_entropy
.
- (fix
#57
c83f85f
) - Graph vertex indices and qubit indices in tableaux were mismatched.
- (breaking) Rename all pre-defined tableaux to have a
t
prefix. e.g.,CNOT
→tCNOT
, in order to distinguish them from "symbolic" operators likesCNOT
. - (breaking) Rename
CliffordId
totId1
to match the naming style ofsId1
. - Implement
enumerate_cliffords
,enumerate_phases
,symplecticGS
used for the enumeration of all Clifford operations over given number of qubits. - Implement convertors from symbolic operators to dense tableau operators:
CliffordOperator(sCNOT)
now givestCNOT
which acts equivalently tosCNOT(1,2)
. - Implement
project[X|Y|Z]rand!
as a simpler interface toproject!
with automatic randomization of measurement phases. - Implement
sMX
/sMY
/sMZ
symbolic measurement operations that can be used withapply!
. Useprojectrand!
internally. - (breaking) Cleanup of
NoisyCircuits
- The experimental module
NoisyCircuits
now supports onlyMixedDestabilizer
andRegister
. Register
is moved out ofNoisyCircuits
. Used withsMX
/etc to store classical bit results during circuit evolution.SparseGate
is moved out ofNoisyCircuits
.Reset
is moved out ofNoisyCircuits
.DenseMeasurement
is renamedPauliMeasurement
and moved out ofNoisyCircuits
.DenseGate
is removed (just use any dense CliffordOperator).SparseMeasurement
is removed (just usesMX
,sMY
,sMZ
). Due to this we lost the functionality of measuring more than one but less than all qubits.applyop!
is renamed toapplywstatus!
and simplified.applyop_branches
is renamed toapplybranches
and simplified.
- The experimental module
- Implement
trusted_rank
that returnsrank
for states that support it andlength
for others (e.g.Stabilizer
). - Implement
length
for[Mixed]Destabilizer
. - Clean up code repetition between
project!
andprojectX/Y/Z!
. Issue#40
- More conversion constructors between different tableau types.
- Implement pre-compilation examples (again) for julia 1.9+.
generate!
does not needlessly allocate anymore, helpingproject!
onStabilizer
. Issue#39
project!
does not needlessly allocate anymore onMixedDestabilizer
. Issue#39
, PR#41
apply_single_*
are not exported anymore, assX
/sY
/sZ
are cleaner choices.- Faster single-qubit projections with
projectX!
,projectY!
,projectZ!
. - Move circuit plotting with
Quantikz.jl
toQuantumCliffordPlots.jl
- Random states with zeroed phases with
phases=false
. - Pre-compilation and inference cleanup (useful for Julia 1.8+).
- Switch from
LoopVectorization.jl
toSIMD.jl
for fine-tuning of performance (and coincidentally, better TTFX).
- Permit whitespace separators in the
S
string macro. - (breaking)
project!
now returnsanticom_index=rank
instead ofanticom_index=0
in the case of projection operator commuting with all stabilizer rows but not in the stabilizer group. If your code previously hadanticom_index!=0
checks, now you might want to useanticom_index!=0 && anticom_index!=rank
. Conversely, treating projective measurements in general code is now much simpler. - (fix
#31
b86b30e2
) Dependent on the above, a bug fix toExperimental.DenseMeasurement
when the measurement operator commutes with but is not in the stabilizer. - A new
expect
function to find the expectation value of a Pauli measurement for a given stabilizer; simpler to use compared toproject!
. - (fix
#28
9292333a
) Fix a rare bug inreset_qubits!(::MixedDestabilizer)
.
dot
andlogdot
for calculating dot products betweenStabilizer
states.- Initial support for graph states, e.g., conversion to and from arbitrary
Stabilizer
state. - (breaking) Implemented
Makie.jl
plotting recipes in theQuantumCliffordPlots.jl
package, which now also stores thePlots.jl
recipes. - Much faster
tensor
product of states. - (breaking)
CliffordColumnForm
has been completely removed. OnlyCliffordOperator
now exists. - (breaking)
random_singlequbitop
was removed, as it was usingCliffordColumnForm
.random_clifford1
is a partial alternative. - Drop
Require
to improve import times. - Simplify internal data layout for
Stabilizer
. - (fix
4b536231
) Fixed bug ingenerate!
that occurs on smallIZ
Paulis. - Some performance improvements related to allocations in
apply!
.
apply!
is now multi-threaded thanks to Polyester.- Named Clifford operators with much-faster special-cased
apply!
are implemented. - An assortment of new constructors are available to ease the conversion between data structures.
- Drop support for Julia 1.5.