# qiskit.chemistry.transformations.BosonicTransformation¶

class BosonicTransformation(qubit_mapping=<BosonicQubitMappingType.DIRECT: 'direct'>, transformation_type=<BosonicTransformationType.HARMONIC: 'harmonic'>, basis_size=2, truncation=3)[código fonte]

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

Parâmetros
• 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__(qubit_mapping=<BosonicQubitMappingType.DIRECT: 'direct'>, transformation_type=<BosonicTransformationType.HARMONIC: 'harmonic'>, basis_size=2, truncation=3)[código fonte]
Parâmetros
• 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_mapping BosonicQubitMappingType build_hopping_operators([excitations]) type excitations Union[str, List[List[int]]] 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

 basis returns the basis (number of modals per mode) commutation_rule Getter of the commutation rule num_modes the number of modes untapered_qubit_op Getter for the untapered qubit operator
property basis

returns the basis (number of modals per mode)

Tipo de retorno

Union[int, List[int]]

build_hopping_operators(excitations='sd')[código fonte]
Parâmetros

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

Tipo de retorno

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

Retorna

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

property commutation_rule

Getter of the commutation rule

Tipo de retorno

bool

get_default_filter_criterion()[código fonte]

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.

Tipo de retorno

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

interpret(raw_result)[código fonte]

Interprets an EigenstateResult in the context of this transformation.

Parâmetros

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

Tipo de retorno

VibronicStructureResult

Retorna

An vibronic structure result.

property num_modes

the number of modes

Type

Returns

Tipo de retorno

int

transform(driver, aux_operators=None)[código fonte]

Transformation to qubit operator from the driver

Parâmetros
• driver (BaseDriver) – BaseDriver

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

Tipo de retorno

Tuple[WeightedPauliOperator, List[WeightedPauliOperator]]

Retorna

qubit operator, auxiliary operators

property untapered_qubit_op

Getter for the untapered qubit operator