Quantum Boltzmann machine algorithm with dimension-expanded equivalent Hamiltonian