Skip to content

v0.19

Latest
Compare
Choose a tag to compare
@TysonRayJones TysonRayJones released this 07 Apr 22:20

This release re-exposes some Monte Carlo sampling functions previously hidden (due to insufficient testing), extends the AssertValidChannels option to gates, and generally improves validation. It also patches a critical bug in SimplifyPaulis[], as elaborated upon below - please read on!

New features

  • GetCircuitsFromChannel[] (added privately in v0.12 2022) analytically decomposes a channel or noisy circuit into a list of pure circuits, each compatible with state-vector simulation, and which together constitute the circuit's possible errors.

    image
  • GetRandomCircuitFromChannel[] (of v0.12) randomly returns one of the channel's decomposed pure circuits (like above), weighted by its classical probability.

    image
  • SampleExpecPauliString[] estimates a noisy expectation value through Monte Carlo sampling of statevector simulation, avoiding quadratically more expensive density-matrix simulation.

    image
  • GetCircuitConjugated[] returns a circuit with a Z-basis matrix equal to the complex conjugate of that of the given circuit.

    image
  • GetPauliString[] can now simultaneously accept specification of both the target qubits, and the number of final Paulis to keep in the string (padding with Id). This enables users to (e.g.) specify an 8x8 matrix encoding the Paulis upon qubits {2,4,7}, and further request that the output string acts upon 5 qubits.

    image
  • Option AssertValidChannels -> False to functions like CalcCircuitMatrix[] now further relaxes the assumption that the operator parameters (like rotation strength) are real. This is necessary for obtaining the correct results from functions like GetCircuitSuperoperator[] and CalcPauliTransferMatrix[] when you wish to permit all symbols to be completely general.

    image

Changes

  • improved the validation of SimplifyPaulis[] so that it explicitly reports an error when encountering an non-simplifiable sub-expression, forbidding the expression to commute.

    image
  • improved the validation of DrawPauliTransferMap[] which now warns when the given map includes an un-rendered null transition (i.e. the map produces nothing from one or more Pauli states).

    image
  • improved the node-labelling of DrawPauliTransferMap[] when given option "PauliStringForm" -> "String" or "Kronecker". Previously, node labels were agnostic to the particular target qubits of the operator, indicating only the "internal, relative" states of the map; this was concise but confusing. Nodes are now labelled as explicit, full Pauli strings:

    image

Bug fixes

  • patched a catastrophic error in SimplifyPaulis[] whereby multiplication of same-target operators X*Z and Z*X produced an incorrect sign. A warning of this bug is temporarily reported when calling Import["...questlink.m"]

    image
  • patched a bug where passing symbolic constants (e.g. Pi, Sqrt[2], Rational[1,10]) as coefficients of Pauli operators to backend Pauli string functions (like CalcExpecPauliString[]) caused the QuESTlink process to crash. The following functions now permit symbolic constants, provided they are later evaluable as floating-point numbers:

    • CalcExpecPauliStringDerivs[]
    • SetQuregToPauliString[]
    • CalcExpecPauliString[]
    • ApplyPauliString[]
    • CalcPauliStringMatrix[]
    • SampleExpecPauliString[]
  • patched ApplyPauliTransferMap[] to support null-transition maps, as can result from maximally-mixing channels (e.g. Damp[prob=1])

  • patched ApplyPauliTransferMap[] when given numerical operator parameters, which was previously vulnerable to throwing an unexpected input-validation error.

  • patched SimplifyPaulis[] validation which previously correctly displayed an error message when given bad input, but returned Null instead of $Failed.

  • fixed a typo in the real-time simulation demo. Thanks to the hawk-eyed @GibbsJR !