Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.
Important

IBM Quantum Platform is moving and this version will be sunset on July 1. To get started on the new platform, read the migration guide.

qiskit.chemistry.transformations.BosonicTransformation

class BosonicTransformation(qubit_mapping=<BosonicQubitMappingType.DIRECT: 'direct'>, transformation_type=<BosonicTransformationType.HARMONIC: 'harmonic'>, basis_size=2, truncation=3)

GitHub

A vibronic Hamiltonian operator representing the energy of the nuclei in the molecule

Parameters

  • qubit_mapping (BosonicQubitMappingType) – a string giving the type of mapping (only the ‘direct’ mapping is implemented at this point)
  • transformation_type (BosonicTransformationType) – a string giving the modal basis. The Hamiltonian is expressed in this basis.
  • basis_size (Union[int, List[int]]) – define the number of modals per mode. If the number of modals is the same for each mode, then only an int is required. However, if the number of modals differ depending on the mode basis_size should be a list of int, for example: [3,4] means 2 modes: first mode has 3 modals, second mode has 4 modals.
  • truncation (int) – where is the Hamiltonian expansion truncation (1 for having only 1-body terms, 2 for having on 1- and 2-body terms…)

__init__

__init__(qubit_mapping=<BosonicQubitMappingType.DIRECT: 'direct'>, transformation_type=<BosonicTransformationType.HARMONIC: 'harmonic'>, basis_size=2, truncation=3)

Parameters

  • qubit_mapping (BosonicQubitMappingType) – a string giving the type of mapping (only the ‘direct’ mapping is implemented at this point)
  • transformation_type (BosonicTransformationType) – a string giving the modal basis. The Hamiltonian is expressed in this basis.
  • basis_size (Union[int, List[int]]) – define the number of modals per mode. If the number of modals is the same for each mode, then only an int is required. However, if the number of modals differ depending on the mode basis_size should be a list of int, for example: [3,4] means 2 modes: first mode has 3 modals, second mode has 4 modals.
  • truncation (int) – where is the Hamiltonian expansion truncation (1 for having only 1-body terms, 2 for having on 1- and 2-body terms…)

Methods

__init__([qubit_mapping, …])type qubit_mappingBosonicQubitMappingType
build_hopping_operators([excitations])type excitationsUnion[str, List[List[int]]]
get_default_filter_criterion()Returns a default filter criterion method to filter the eigenvalues computed by the eigen solver.
interpret(raw_result)Interprets an EigenstateResult in the context of this transformation.
transform(driver[, aux_operators])Transformation to qubit operator from the driver

Attributes

basisreturns the basis (number of modals per mode)
commutation_ruleGetter of the commutation rule
num_modesthe number of modes
untapered_qubit_opGetter for the untapered qubit operator

basis

returns the basis (number of modals per mode)

Return type

Union[int, List[int]]

build_hopping_operators

build_hopping_operators(excitations='sd')

Parameters

excitations (Union[str, List[List[int]]]) –

Return type

Tuple[Dict[str, WeightedPauliOperator], Dict, Dict[str, List[List[int]]]]

Returns

Dict of hopping operators, dict of commutativity types and dict of excitation indices

commutation_rule

Getter of the commutation rule

Return type

bool

get_default_filter_criterion

get_default_filter_criterion()

Returns a default filter criterion method to filter the eigenvalues computed by the eigen solver. For more information see also aqua.algorithms.eigen_solvers.NumPyEigensolver.filter_criterion. In the fermionic case the default filter ensures that the number of particles is being preserved.

Return type

Optional[Callable[[Union[List, ndarray], float, Optional[List[float]]], bool]]

interpret

interpret(raw_result)

Interprets an EigenstateResult in the context of this transformation.

Parameters

raw_result (Union[EigenstateResult, EigensolverResult, MinimumEigensolverResult]) – an eigenstate result object.

Return type

VibronicStructureResult

Returns

An vibronic structure result.

num_modes

the number of modes

Type

Returns

Return type

int

transform

transform(driver, aux_operators=None)

Transformation to qubit operator from the driver

Parameters

  • driver (BaseDriver) – BaseDriver
  • aux_operators (Optional[List[Any]]) – Optional additional aux ops to evaluate

Return type

Tuple[WeightedPauliOperator, List[WeightedPauliOperator]]

Returns

qubit operator, auxiliary operators

untapered_qubit_op

Getter for the untapered qubit operator

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