To take an expectation value of a general modular Hamiltonian, bitstrings get drawn from the model QHBM. Then, we need the ability to pick out just those bits on which the EBM of the modular Hamiltonian is supported in order to compute energies. For more details see the equation labeled "eq:ModularHamiltonianExpectation" in the QVR notes.
As well, in that equation we see that bitstrings are actually drawn from the concatenation of the model QNN and the inverse of the modular Hamiltonian QNN. The solution I want to use is to make QNNs support inverse and addition, to easily set up such a combination.
Bitstring and QNN utilities needed for #95.
To take an expectation value of a general modular Hamiltonian, bitstrings get drawn from the model QHBM. Then, we need the ability to pick out just those bits on which the EBM of the modular Hamiltonian is supported in order to compute energies. For more details see the equation labeled "eq:ModularHamiltonianExpectation" in the QVR notes.
As well, in that equation we see that bitstrings are actually drawn from the concatenation of the model QNN and the inverse of the modular Hamiltonian QNN. The solution I want to use is to make QNNs support inverse and addition, to easily set up such a combination.