BosonicTransformation
class BosonicTransformation(qubit_mapping=<BosonicQubitMappingType.DIRECT: 'direct'>, transformation_type=<BosonicTransformationType.HARMONIC: 'harmonic'>, basis_size=2, truncation=3)
Bases: qiskit.chemistry.transformations.transformation.Transformation
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…)
Methods
build_hopping_operators
BosonicTransformation.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
get_default_filter_criterion
BosonicTransformation.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
BosonicTransformation.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.
transform
BosonicTransformation.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
Attributes
basis
returns the basis (number of modals per mode)
Return type
Union
[int
, List
[int
]]
commutation_rule
Getter of the commutation rule
Return type
bool
num_modes
the number of modes
Type
Returns
Return type
int
untapered_qubit_op
Getter for the untapered qubit operator