A Python package for reducing the quantum resource requirement of your problems, making them more NISQ-friendly!
To install from the root of the project run:
pip install .
For basic usage see notebooks
Qubit reduction techniques such as tapering and Contextual-Subspace VQE are effected by the underlying stabilizer subspace projection mechanism; such methods may be differentiated by the approach taken to selecting the stabilizers one wishes to project over.
.symplectic
contains the following classes (in resolution order):
PauliwordOp
for representing general Pauli operators.QuantumState
for representing quantum statevectors.ObservableOp
for representing Hermitian operators, including expectation values and VQE functionality.AnsatzOp
is input into ObservableOp.VQE and contains a method for converting excitation terms to a quantum circuit.StabilizerOp
represents algebraically independent sets of Pauli operators for stabilizer manipulation/projections.AnticommutingOp
represents sets of anticommuting Pauli operators for the purposes of Unitary Partitioning and Linear Combination of Unitaries as in this paper.MajoranaOp
represents operators in the Majorana basis instead of Paulis, though the underlying symplectic structure is analogous.
.projection
contains stabilizer subspace projection classes (in resolution order):
-
S3_projection
for rotating a StabilizerOp onto some basis of single-qubit Pauli operators via Clifford operations and projecting into the corresponding stabilizer subspace. -
- Performs the qubit tapering technique, exploiting
$\mathbb{Z}_2$ symmetries to reduce the number of qubits in the input Hamiltonian while preserving the ground state energy exactly. - The stablizers are chosen to be an independent generating set of a Hamiltonian symmetry.
- Performs the qubit tapering technique, exploiting
-
- Performs Contextual-Subspace VQE, allowing one to specify precisely how many qubits they would like in the output Hamiltonian. Despite this process incurring some systematic error, it is possible to retain sufficient information to permit high precision simulations at a significant reduction in quantum resource. This is the updated approach to ContextualSubspaceVQE.
- Here, the stabilizers are taken to be an independent generating set of a sub-Hamiltonian symmetry (defined by a noncontextual subset of terms) with an additional contribution encapsulating the remaining anticommuting terms therein.
Why should you use Symmer? It has been designed for high efficiency when manipulating large Pauli operators -- addition, multiplication, Clifford/general rotations, commutativity/contextuality checks, symmetry basis identification, basis reconstruction and subspace projections have all been reformulated in the symplectic representation and implemented carefully to avoid unnecessary operations and redundancy. But don't just take our word for it, see these benchmarks against various popular quantum computing packages:
Clifford Rotations | General Rotations |
---|---|
Clifford rotation of 100-qubit Pauli operators with increasing numbers of terms; this tests commutativity checks and multiplication. Symmer has been optimized with this in mind since it is one of the core operations necessary for stabilizer subspace projection techniques. | General (non-Clifford) rotations of 100-qubit Pauli operators with increasing numbers of terms; this tests commutativity checks and multiplication, as well as addition and the subsequent cleanup operation. This is relevant for performing unitary partitioning in CS-VQE. |
- Multiply two 100,000,000-qubit Pauli terms together.
- Square a 100-qubit Pauli operator with 1,000 terms, involving a cleanup procedure over 1,000,000 cross terms.
- Perform a unitary rotation of a 100-qubit Pauli operator with 1,000,000 terms.
All this allows us to approach significantly larger systems than was previously possible, including those exceeding the realm of classical tractibility.
When you use in a publication or other work, please cite as:
William M. Kirby, Andrew Tranter, and Peter J. Love, Contextual Subspace Variational Quantum Eigensolver, Quantum 5, 456 (2021). Tim J. Weaving, Alexis Ralli, William M. Kirby, Andrew Tranter, Peter J. Love, and Peter V. Coveney, A stabilizer framework for Contextual Subspace VQE and the noncontextual projection ansatz, arxiv preprint (2022), arxiv:2204.02150. Alexis Ralli, Tim Weaving, Andrew Tranter, William M. Kirby, Peter J. Love, and Peter V. Coveney, Unitary Partitioning and the Contextual Subspace Variational Quantum Eigensolver, arxiv preprint (2022), arxiv:2207.03451.