transforming_functions

transforming_functions#

Full path: iqm.qaoa.transforming_functions

A module for custom functions that transform data from one format to another format.

Functions

ham_bp_to_ham_operator(ham_bp)

A function to transform a Hamiltonian represented as a BP into a SparsePauliOp.

ham_bqm_to_ham_operator(ham_bqm)

A function to transform Hamiltonian represented as a BQM into a SparsePauliOp.

positions_to_pauli_string(positions, num_qubits)

Create a string with the character "Z" on the specified positions and the character "I" elsewhere.