Qamomile v0.12.5 adds Pauli Correlation Encoding (PCE) through PCEConverter and PCEEncoder, so quadratic optimization workflows can encode spin variables as k-body Pauli correlators and can reduce qubit counts compared with one-qubit-per-spin encodings. QURI Parts sampling can now be seeded for reproducible tutorials and benchmarks. This release also fixes issues around controlled gates, measurement-dependent conditions, and expectation values for Vector elements.
pip install qamomile==0.12.5New Features¶
Pauli Correlation Encoding (PCE)¶
Use PCEConverter to apply Pauli Correlation Encoding to quadratic QUBO/Ising optimization problems supplied as either an ommx.v1.Instance or a Qamomile BinaryModel. PCE encodes each spin variable as a distinct k-body Pauli correlator. This can reduce the required qubit count compared with assigning one qubit to each spin variable. When num_qubits is omitted, the converter uses the smallest n >= k satisfying C(n, k) * 3**k >= num_variables. The assigned observables are available through get_encoded_pauli_list(), and correlator expectation values can be decoded with decode(...) (#369).
from qamomile.optimization.binary_model import BinaryModel
from qamomile.optimization.pce import PCEConverter
ising = BinaryModel.from_ising(
linear={0: 1.0, 1: -1.0, 2: 0.5},
quad={(0, 1): 2.0},
constant=0.0,
)
converter = PCEConverter(ising, correlator_order=2)
observables = converter.get_encoded_pauli_list()
sampleset = converter.decode([0.8, -0.4, 0.2])
print(converter.num_qubits, len(observables))
print(sampleset.samples, sampleset.energy)2 3
[{0: 1, 1: -1, 2: 1}] [0.5]See Pauli Correlation Encoding (PCE) for the full workflow.
Reproducible QURI Parts sampling¶
With the default Qulacs-based sampler, QuriPartsExecutor(seed=...) and QuriPartsTranspiler().executor(seed=...) can now fix the random seed. Two executors built with the same seed and sampled on the same circuit return identical shot counts, while omitting the seed keeps the previous non-deterministic behavior (#441).
from qamomile.quri_parts import QuriPartsTranspiler
transpiler = QuriPartsTranspiler()
executor = transpiler.executor(seed=42)Bug Fixes¶
Measured
Vector[Bit]element branch conditions now lower correctly on supported dynamic-control-flow backends. Afters = qmc.measure(register), patterns such asif s[i]:,if s[0] & s[1]:,while s[i]:, and conditions over sliced views likeif s[j:j+1][0]:could fail during transpilation. This release lowers them to the correct classical-bit addresses (#443).qmc.expvalonVectorelements behaves correctly. Calls such asqmc.expval(q[1], obs)andqmc.expval((q[1],), obs)now refer to the correct qubits through the parentVector, sliced views, composite-gate results, and controlled-gate results (#450).Controlled-gate execution is more consistent across supported SDKs. QURI Parts and CUDA-Q can now run more backend-supported
qmc.control(...)patterns end to end. Covered cases include more controlled quantum kernels, parameterized composites, powered controls, broadcast targets, and selected control indices, while unsupported shapes still raise clear backend errors (#442, #444, #447).Vector-slice refresh and borrow checks support more safe cases. Same-slice refreshes, adjacent symbolic slice borrows, and slice-assignment refresh paths that can be proven safe are now accepted, while unsupported symbolic overlap cases remain rejected with explicit limitations documented in the repository (#444).
Documentation¶
New Pauli Correlation Encoding (PCE) algorithm article builds a PCE MaxCut workflow with
PCEConverter, a hardware-efficient ansatz, SciPy optimization, and sign-rounding decode (#369).New Using OMMX Quantum Benchmarks (1): Implementing and Benchmarking Quantum Algorithms with Qamomile integration article loads a LABS instance from OMMX Quantum Benchmarks, runs a Qamomile QAOA workflow, and compares it with SCIP through an OMMX adapter (#393).
QURI Parts Support now shows seeded Qulacs sampling and the reproducibility guarantee for repeated tutorial runs (#441).
VQE for the Hydrogen Molecule now uses the clearer “Hardware Efficient SU(2)” ansatz name (#414).