Skip to content

v0.12

Compare
Choose a tag to compare
@TysonRayJones TysonRayJones released this 07 Nov 20:53

This major release significantly extends QuESTlink's capabilities for efficient and convenient simulation of quantum variational algorithms, as well as generally improving quality-of-life. It includes asymptotically improved functions for calculating variational quantities, in noisy settings and with previous ansatz constraints relaxed, new functions to generate Pauli strings and ansatz circuits, and improved error messages. This release involved a complete refactor of QuESTlink's C++ backend which is now more modular, defensively-designed, and enables backend circuit-level optimisations and functions. It also adds native MacoS ARM (M1) support through the efforts of @rrmeister.

New features

  • ApplyCircuitDerivs
  • CalcExpecPauliStringDerivs
  • CalcMetricTensor

The above functions perform automatic differentiation of quantum circuits and channels, enabling simulation of routines like noise-aware quantum natural gradient. They employ the author's novel algorithms (for gradients and metric tensors, and their noisy forms in Ch 5.7) to run asymptotically faster than the state-of-the-art. They furthermore totally relax ansatz constraints, permitting repetition of parameters, multi-parameter gates, and gates featuring any continuously differentiable functions of ansatz parameters.

  • CalcPauliStringMinEigVal computes the lowest eigenvalue of a Pauli string using a sparse iterative scheme, and is exponentially more efficient than numerical parallel methods (like Min @ Eigenvalues @ CalcPauliStringMatrix) for many-qubit strings with few terms.
  • GetKnownCircuit can now generate "TrotterAnsatz", "LowDepthAnsatz" and "HardwareEfficientAnsatz"
  • Error messages from functions which accept circuits (like CalcCircuitMatrix and ApplyCircuit) now include the specific erroneous gate.

Convenience functions

  • GetRandomPauliString
  • SetQuregToPauliString

do exactly what they say!

New gates

  • Fac
  • UNonNorm

are now accepted by all circuit-accepting functions, which respectively scale the full quantum state by an arbitrary complex scalar, and apply a unitary gate albeit with no enforced normalisation. UNonNorm replaces the previous use of gate Matr.

  • SampleClassicalShadow encodes a density matrix into a number of sampled Pauli product outcomes, producing a classical shadow.
  • DrawCircuit will now draw global phase gates (G) and identitys (Id) within Pauli gadgets (R)
  • CreateDownloadedQuESTEnv[] will now report its progress and throw errors upon timeout or connection issues

Changes

  • CalcCircuitMartrix will now simplify channels by (default) asserting them to be completely-positive and trace-preserving (togged with optional argument AssertValidChannels)
  • CalcDensityInnerProduct and CalcDensityInnerProducts now return complex scalars, and so will have non-real components for non-normalised inputs. Finite precision effects may mean these functions return negligible imaginary components for normalised density matrices which can be removed with Chop
  • CalcPauliExpressionMatrix now returns a sparse matrix for more efficient handling of large operators, especially symbolic ones with few terms.
  • Matr now describes a gate which is never asserted unitary, and hence is only left-multiplied onto density-matrices.
  • MixDamping, MixDephasing, MixDepolarising, MixTwoQubitDephasing and MixTwoQubitDepolarising have been deprecated, since they can each be performed with ApplyCircuit
  • CalcQuregDerivs has been replaced with the (significantly extended) ApplyCircuitDerivs, though the change is backwards compatible.
  • All mentions of PauliSum in the API have been replaced with PauliString, though the change is backwards compatible.

Bug fixes

  • patched CreateLocalQuESTEnv on Windows
  • CalcCircuitMatrix and ApplyCircuit now accept a Pauli gadget (R) containing Id Pauli operators
  • CreateDownloadedQuESTEnv no longer hangs when download fails