Published April 7, 2024 | Version v0.19
Software Open

QTechTheory/QuESTlink: v0.19

  • 1. University of Oxford
  • 2. @actions
  • 3. @HQSQuantumSimulations

Description

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.

    <img width="576" alt="image" src="https://github.com/QTechTheory/QuESTlink/assets/29574749/5a7806b7-b73e-4bbd-9903-2684659bc264">

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

    <img width="555" alt="image" src="https://github.com/QTechTheory/QuESTlink/assets/29574749/c7e02f62-2c72-4f9a-adb9-94d8c79dd073">

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

    <img width="391" alt="image" src="https://github.com/QTechTheory/QuESTlink/assets/29574749/da3d4cdb-7900-46f1-97b2-6df3159b1ac6">

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

    <img width="499" alt="image" src="https://github.com/QTechTheory/QuESTlink/assets/29574749/d7146b13-5f00-4947-af0d-2ce849eb7add">

  • 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.

    <img width="263" alt="image" src="https://github.com/QTechTheory/QuESTlink/assets/29574749/0a0e4aa3-7142-41a2-b6d2-4bacefc4176a">

  • 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.

    <img width="488" alt="image" src="https://github.com/QTechTheory/QuESTlink/assets/29574749/ab4bd3a6-4990-4841-a9b0-c096b5f099c3">

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.

    <img width="392" alt="image" src="https://github.com/QTechTheory/QuESTlink/assets/29574749/26ddc806-c1ae-437a-af4f-6f2c15569785">

  • 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).

    <img width="383" alt="image" src="https://github.com/QTechTheory/QuESTlink/assets/29574749/04514a56-a877-41db-9ac5-ce9452e20dcc">

  • 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:

    <img width="455" alt="image" src="https://github.com/QTechTheory/QuESTlink/assets/29574749/54bf044e-20e5-45a6-8d77-e10930a93365">

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"]

    <img width="400" alt="image" src="https://github.com/QTechTheory/QuESTlink/assets/29574749/b1283b23-8768-4083-8ed2-962d998010fd">

  • 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 !

Files

QTechTheory/QuESTlink-v0.19.zip

Files (44.7 MB)

Name Size Download all
md5:2fbe5a53881b63bf876d6e99fc73719e
44.7 MB Preview Download

Additional details

Related works