qlauncher.hampy

Contents

qlauncher.hampy#

Hampy is a small package for creating Hamiltonians from boolean expressions

Submodules:

Summary#

__all__ Classes:

Equation

## Hampy Equation Represents a binary or general-purpose Hamiltonian equation built on qiskit.quantum_info.SparsePauliOp.The class provides logical-style operators (AND, OR, XOR, NOT) interpreted as operations on Hamiltonians with binary energies {0, 1}, along with basic arithmetic operations and utilities for analyzing the resulting operator..

TruthTable

Generates and analyzes a full truth table for a Hamiltonian represented as either an Equation or a qiskit.quantum_info.SparsePauliOp.

Variable

__all__ Functions:

one_in_n

Generates Equation for One in N problem.

shift_affected_qubits

Shifts the qubits affected by the equation by the given amount, wrapping around if the index goes out of bounds.