Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK. Go to the latest version.

qiskit.chemistry.BosonicOperator

class BosonicOperator(h, basis)

GitHub

A set of functions to map bosonic Hamiltonians to qubit Hamiltonians.

References:

  • Veis Libor, et al., International Journal of Quantum Chemistry 116.18 (2016): 1328-1336.
  • McArdle Sam, et al., Chemical science 10.22 (2019): 5725-5735.
  • Ollitrault Pauline J., Chemical science 11 (2020): 6842-6855.

The Bosonic operator in this class is written in the n-mode second quantization format (Eq. 10 in Ref. Ollitrault Pauline J., Chemical science 11 (2020): 6842-6855.) The second quantization operators act on a given modal in a given mode. self._degree is the truncation degree of the expansion (n).

Parameters

  • h (List[List[Tuple[List[List[int]], float]]]) – Matrix elements for the n-body expansion. The format is as follows: h is a self._degree (n) dimensional array. For each degree n, h[n] contains the list [[indices, coeff]_0, [indices, coeff]_1, …] where the indices is a n-entry list and each entry is of the shape [mode, modal1, modal2] which define the indices of the corresponding raising (mode, modal1) and lowering (mode, modal2) operators.
  • basis (List[int]) – Is a list defining the number of modals per mode. E.g. for a 3 modes system with 4 modals per mode basis = [4,4,4].

__init__

__init__(h, basis)

The Bosonic operator in this class is written in the n-mode second quantization format (Eq. 10 in Ref. Ollitrault Pauline J., Chemical science 11 (2020): 6842-6855.) The second quantization operators act on a given modal in a given mode. self._degree is the truncation degree of the expansion (n).

Parameters

  • h (List[List[Tuple[List[List[int]], float]]]) – Matrix elements for the n-body expansion. The format is as follows: h is a self._degree (n) dimensional array. For each degree n, h[n] contains the list [[indices, coeff]_0, [indices, coeff]_1, …] where the indices is a n-entry list and each entry is of the shape [mode, modal1, modal2] which define the indices of the corresponding raising (mode, modal1) and lowering (mode, modal2) operators.
  • basis (List[int]) – Is a list defining the number of modals per mode. E.g. for a 3 modes system with 4 modals per mode basis = [4,4,4].

Methods

__init__(h, basis)The Bosonic operator in this class is written in the n-mode second quantization format (Eq.
direct_mapping_filtering_criterion(state, value)Filters out the states of irrelevant symmetries
mapping([qubit_mapping, threshold])Maps a bosonic operator into a qubit operator.
number_occupied_modals_per_mode(mode)A bosonic operator which can be used to evaluate the number of occupied modals in a given mode

direct_mapping_filtering_criterion

direct_mapping_filtering_criterion(state, value, aux_values=None)

Filters out the states of irrelevant symmetries

Parameters

  • state (Union[List, ndarray]) – the statevector
  • value (float) – the energy
  • aux_values (Optional[List[float]]) – the auxiliary energies

Return type

bool

Returns

True if the state is has one and only one modal occupied per mode meaning that the direct mapping symmetries are respected and False otherwise

mapping

mapping(qubit_mapping='direct', threshold=1e-08)

Maps a bosonic operator into a qubit operator.

Parameters

  • qubit_mapping (str) – a string giving the type of mapping (only the ‘direct’ mapping is implemented at this point)
  • threshold (float) – threshold to chop the low contribution paulis

Return type

WeightedPauliOperator

Returns

A qubit operator

Raises

ValueError – If requested mapping is not supported

number_occupied_modals_per_mode

number_occupied_modals_per_mode(mode)

A bosonic operator which can be used to evaluate the number of occupied modals in a given mode

Parameters

mode (int) – the index of the mode

Returns

the corresponding bosonic operator

Return type

BosonicOperator

Was this page helpful?
Report a bug or request content on GitHub.