qamuy.chemistry package#

Module contents#

class qamuy.chemistry.AlgorithmForFindingExcitedStates(_mapping=None, **kwargs)#
class Type(value)#

An enumeration.

QEOM = 2#
QSE = 1#
UNKNOWN = 0#
class qamuy.chemistry.Ansatz(_mapping=None, **kwargs)#
class EntanglementPatternType(value)#

An enumeration.

CIRCULAR = 1#
LINEAR = 0#
class Type(value)#

An enumeration.

FERMIONIC_ADAPTIVE = 5#
HARDWARE_EFFICIENT = 1#
QUBIT_ADAPTIVE = 6#
SYMMETRY_PRESERVING = 2#
UCCD = 3#
UCCSD = 4#
UNKNOWN = 0#
class qamuy.chemistry.AtomBasis(_mapping=None, **kwargs)#
class qamuy.chemistry.BandStructureEnergyValue(_mapping=None, **kwargs)#
class qamuy.chemistry.BandStructureEnergyValueList(_mapping=None, **kwargs)#
class qamuy.chemistry.BandStructureParameterList(_mapping=None, **kwargs)#
class qamuy.chemistry.Cas(_mapping=None, **kwargs)#
class qamuy.chemistry.CircuitInformation(_mapping=None, **kwargs)#
class qamuy.chemistry.Complex(_mapping=None, **kwargs)#
class qamuy.chemistry.CostFunction(_mapping=None, **kwargs)#
class Type(value)#

An enumeration.

CVAR = 3#
GIBBS = 4#
NONE = 0#
SIMPLE = 2#
class qamuy.chemistry.CostHistory(_mapping=None, **kwargs)#
class qamuy.chemistry.Derivative(_mapping=None, **kwargs)#
class Type(value)#

An enumeration.

ANALYTICAL = 1#
ANALYTICAL_PYSCF = 5#
ANALYTICAL_QAMUY = 6#
HAMILTONIAN_ANALYTICAL = 4#
HAMILTONIAN_NUMERICAL = 3#
NUMERICAL = 2#
UNKNOWN = 0#
class qamuy.chemistry.DeviceArgs(_mapping=None, **kwargs)#
class qamuy.chemistry.Differential(_mapping=None, **kwargs)#
class Type(value)#

An enumeration.

ANALYTICAL = 1#
NUMERICAL = 2#
UNKNOWN = 0#
class qamuy.chemistry.DipoleMomentParameter(_mapping=None, **kwargs)#
class qamuy.chemistry.DipoleMomentParameterList(_mapping=None, **kwargs)#
class qamuy.chemistry.DipoleMomentValue(_mapping=None, **kwargs)#
class qamuy.chemistry.DipoleMomentValueList(_mapping=None, **kwargs)#
class qamuy.chemistry.EnergyHistory(_mapping=None, **kwargs)#
class qamuy.chemistry.EnergyParameter(_mapping=None, **kwargs)#
class qamuy.chemistry.EnergyParameterList(_mapping=None, **kwargs)#
class qamuy.chemistry.EnergyValue(_mapping=None, **kwargs)#
class qamuy.chemistry.EnergyValueList(_mapping=None, **kwargs)#
class qamuy.chemistry.Error(_mapping=None, **kwargs)#
class qamuy.chemistry.EstimatedExecutionTime(_mapping=None, **kwargs)#
class qamuy.chemistry.EvaluatedProperty(_mapping=None, **kwargs)#
class qamuy.chemistry.FermionQubitMapping(_mapping=None, **kwargs)#
class Type(value)#

An enumeration.

BRAVYI_KITAEV = 2#
JORDAN_WIGNER = 1#
SYMMETRY_CONSERVING_BRAVYI_KITAEV = 3#
UNKNOWN = 0#
class qamuy.chemistry.FrequencyNormalModePair(_mapping=None, **kwargs)#
class qamuy.chemistry.GeometryOptimization(_mapping=None, **kwargs)#
class qamuy.chemistry.GeometryOptimizationResult(_mapping=None, **kwargs)#
class qamuy.chemistry.GradientParameter(_mapping=None, **kwargs)#
class qamuy.chemistry.GradientParameterList(_mapping=None, **kwargs)#
class qamuy.chemistry.GradientValue(_mapping=None, **kwargs)#
class qamuy.chemistry.GradientValueList(_mapping=None, **kwargs)#
class qamuy.chemistry.HFResult(_mapping=None, **kwargs)#
class qamuy.chemistry.HamiltonianGeneration(_mapping=None, **kwargs)#
class qamuy.chemistry.HessianParameter(_mapping=None, **kwargs)#
class qamuy.chemistry.HessianParameterList(_mapping=None, **kwargs)#
class qamuy.chemistry.HessianValue(_mapping=None, **kwargs)#
class qamuy.chemistry.HessianValueList(_mapping=None, **kwargs)#
class qamuy.chemistry.IBMQProvider(_mapping=None, **kwargs)#
class qamuy.chemistry.MCSCFExcitedState(_mapping=None, **kwargs)#
class Type(value)#

An enumeration.

STATE_AVERAGED = 1#
STATE_SPECIFIC = 2#
UNSPECIFIED = 0#
class qamuy.chemistry.MeasurementErrorMitigationParameterList(_mapping=None, **kwargs)#
class qamuy.chemistry.Mitigation(_mapping=None, **kwargs)#
class qamuy.chemistry.MolecularOrbital(_mapping=None, **kwargs)#
class qamuy.chemistry.MolecularOrbitalData(_mapping=None, **kwargs)#
class Format(value)#

An enumeration.

MOLDEN = 1#
NONE = 0#
class qamuy.chemistry.Molecule(_mapping=None, **kwargs)#
class Geometry(_mapping=None, **kwargs)#
class MolecularCoordinate(value)#

An enumeration.

CARTESIAN = 0#
Z_MATRIX = 1#
class qamuy.chemistry.MoleculeResult(_mapping=None, **kwargs)#
class qamuy.chemistry.MultiplicityParameter(_mapping=None, **kwargs)#
class qamuy.chemistry.MultiplicityParameterList(_mapping=None, **kwargs)#
class qamuy.chemistry.MultiplicityValue(_mapping=None, **kwargs)#
class qamuy.chemistry.MultiplicityValueList(_mapping=None, **kwargs)#
class qamuy.chemistry.NonAdiabaticCouplingParameter(_mapping=None, **kwargs)#
class qamuy.chemistry.NonAdiabaticCouplingParameterList(_mapping=None, **kwargs)#
class qamuy.chemistry.NonAdiabaticCouplingValue(_mapping=None, **kwargs)#
class qamuy.chemistry.NonAdiabaticCouplingValueList(_mapping=None, **kwargs)#
class qamuy.chemistry.NumElectronsParameter(_mapping=None, **kwargs)#
class qamuy.chemistry.NumElectronsParameterList(_mapping=None, **kwargs)#
class qamuy.chemistry.NumElectronsValue(_mapping=None, **kwargs)#
class qamuy.chemistry.NumElectronsValueList(_mapping=None, **kwargs)#
class qamuy.chemistry.ObservableGrouping(_mapping=None, **kwargs)#
class Type(value)#

An enumeration.

BITWISE_COMMUTING = 0#
NO_GROUPING = 1#
class qamuy.chemistry.Optimizer(_mapping=None, **kwargs)#
class Type(value)#

An enumeration.

BFGS = 1#
BFGS_FTOL = 12#
CG = 6#
COBYLA = 9#
L_BFGS_B = 2#
NELDER_MEAD = 4#
NEWTON_CG = 7#
NFT = 3#
POWELL = 5#
SGD = 11#
SLSQP = 10#
TNC = 8#
UNKNOWN = 0#
class qamuy.chemistry.OrbitalOptimization(_mapping=None, **kwargs)#
class Type(value)#

An enumeration.

NONE = 0#
STATE_AVERAGED = 1#
STATE_SPECIFIC = 2#
class qamuy.chemistry.OscillatorStrengthParameter(_mapping=None, **kwargs)#
class qamuy.chemistry.OscillatorStrengthParameterList(_mapping=None, **kwargs)#
class qamuy.chemistry.OscillatorStrengthValue(_mapping=None, **kwargs)#
class qamuy.chemistry.OscillatorStrengthValueList(_mapping=None, **kwargs)#
class qamuy.chemistry.OutputMetadata(_mapping=None, **kwargs)#
class qamuy.chemistry.OverlapValue(_mapping=None, **kwargs)#
class qamuy.chemistry.OverlapValueList(_mapping=None, **kwargs)#
class qamuy.chemistry.PeriodicSystem(_mapping=None, **kwargs)#
class Geometry(_mapping=None, **kwargs)#
class qamuy.chemistry.PostHFLog(_mapping=None, **kwargs)#
class qamuy.chemistry.PostHFMethod(_mapping=None, **kwargs)#
class Type(value)#

An enumeration.

CASCI = 4#
CASSCF = 5#
CCSD = 3#
CISD = 2#
FCI = 6#
MP2 = 1#
UNKNOWN = 0#
class qamuy.chemistry.PostHFResult(_mapping=None, **kwargs)#
class qamuy.chemistry.PropertyMetadata(_mapping=None, **kwargs)#
class qamuy.chemistry.QamuyChemistryInput(_mapping=None, **kwargs)#
class qamuy.chemistry.QamuyChemistryOutput(_mapping=None, **kwargs)#
class qamuy.chemistry.QuantumDevice(_mapping=None, **kwargs)#
class Type(value)#

An enumeration.

AWS_IONQ = 5#
AWS_RIGETTI = 4#
EXACT_SIMULATOR = 1#
IBM = 3#
SAMPLING_SIMULATOR = 2#
UNKNOWN = 0#
class qamuy.chemistry.QuantumDeviceResult(_mapping=None, **kwargs)#
class qamuy.chemistry.QuantumResources(_mapping=None, **kwargs)#
class qamuy.chemistry.Randomness(_mapping=None, **kwargs)#
class Type(value)#

An enumeration.

GAUSSIAN = 1#
NONE = 0#
UNIFORM = 2#
class qamuy.chemistry.ReferenceState(_mapping=None, **kwargs)#
class Type(value)#

An enumeration.

CIS = 5#
COMPUTATIONAL_BASIS = 1#
RHF = 2#
ROHF = 4#
UHF = 3#
UNKNOWN = 0#
class qamuy.chemistry.ResourceConstraint(_mapping=None, **kwargs)#
class qamuy.chemistry.SamplingInformation(_mapping=None, **kwargs)#
class qamuy.chemistry.SamplingStrategy(_mapping=None, **kwargs)#
class Type(value)#

An enumeration.

AS_PER_OPTIMIZER = 4#
CONSTANT = 0#
UNIFORM = 1#
WEIGHTED = 2#
WEIGHTED_RANDOM = 3#
class qamuy.chemistry.Solver(_mapping=None, **kwargs)#
class Type(value)#

An enumeration.

MCVQE = 3#
PROPERTY_EVAL = 5#
SSVQE = 2#
UNKNOWN = 0#
VQD = 4#
VQE = 1#
class qamuy.chemistry.SpinState(_mapping=None, **kwargs)#
class qamuy.chemistry.SzNumberParameter(_mapping=None, **kwargs)#
class qamuy.chemistry.SzNumberParameterList(_mapping=None, **kwargs)#
class qamuy.chemistry.SzNumberValue(_mapping=None, **kwargs)#
class qamuy.chemistry.SzNumberValueList(_mapping=None, **kwargs)#
class qamuy.chemistry.TargetChemicalProperty(_mapping=None, **kwargs)#
class qamuy.chemistry.TargetSolverProperty(_mapping=None, **kwargs)#
class qamuy.chemistry.TransitionDipoleMomentParameter(_mapping=None, **kwargs)#
class qamuy.chemistry.TransitionDipoleMomentParameterList(_mapping=None, **kwargs)#
class qamuy.chemistry.TransitionDipoleMomentValue(_mapping=None, **kwargs)#
class qamuy.chemistry.TransitionDipoleMomentValueList(_mapping=None, **kwargs)#
class qamuy.chemistry.VQELog(_mapping=None, **kwargs)#
class qamuy.chemistry.VibrationalAnalysisParameter(_mapping=None, **kwargs)#
class qamuy.chemistry.VibrationalAnalysisParameterList(_mapping=None, **kwargs)#
class qamuy.chemistry.VibrationalAnalysisValue(_mapping=None, **kwargs)#
class qamuy.chemistry.VibrationalAnalysisValueList(_mapping=None, **kwargs)#
qamuy.chemistry.cas(active_ele=None, active_orb=None, cas_list=None)#

Create an object representing a complete active space.

Parameters:
  • active_ele (int) – Number of electrons in the active space.

  • active_orb (int) – Number of orbitals in the active space.

  • cas_list (list<int>) – List of orbital indices in the active space.

Returns:

A Cas object.

qamuy.chemistry.cas_periodic_system(active_ele=None, active_orb=None)#

Create an object representing a complete active space.

Parameters:
  • active_ele (int) – Number of electrons in the active space for a cell.

  • active_orb (int) – Number of orbitals in the active space for a k-point.

Returns:

A Cas object.

qamuy.chemistry.geometry_to_xyz(geometry, vib_mode=None)#

Convert molecular geometry to a string of xyz format.

Parameters:
  • geometry – A Molecule.Geometry object.

  • vib_mode (optional) – A list of displacements of each nucleus specifying a vibration mode, whose length is 3 * n_atoms, e.g., [0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8] for water molecule

Returns:

A string of xyz format.

qamuy.chemistry.get_cost_history(vqe_log, state=None)#

Extract a history of the cost function in VQE as a list. For a non-VQD solver, state argument should not be passed since there is always only one cost history. For VQD, state argument should be passed to specify which cost history to extract.

Parameters:
  • vqe_log – A VQELog object.

  • state (Optional[int]) – (Only for VQD) The state index for which a cost history is extracted.

Returns:

A list containing a history of cost function value.

qamuy.chemistry.get_energy_history_for_state(vqe_log, state=0)#

Extract a history of energy of a state in VQE as a list.

Parameters:
  • vqe_log – A VQELog object.

  • state (int) – The index of a state for which the energy history it extracted.

Returns:

A list containing a history of energy value for the specified state.

qamuy.chemistry.get_evaluated_properties(result, property_name)#

Extract evaluated property values from a quantum/post-HF result object.

Parameters:
  • result – A QuantumDeviceResult or PostHFResult object.

  • property_name (str) – The name of a property to extract.

Returns:

A list of objects containing values for the specified property, typically contains a list of property values and metadata.

qamuy.chemistry.get_evaluated_properties_for_state(result, property_name, state=0)#

Extract evaluated property values for a state from a quantum/post-HF result object.

Parameters:
  • result – A QuantumDeviceResult or PostHFResult object.

  • property_name (str) – The name of a property to extract.

  • state (int) – The index of a state for a property value to be extracted.

Returns:

A list of objects containing a value for the specified property for the specified state, typically contains the state index, the property value and its sample standard deviation.

qamuy.chemistry.get_evaluated_properties_for_state_pair(result, property_name, state_pair)#

Extract evaluated property values for a state pair from a quantum/post-HF result object.

Parameters:
  • result – A QuantumDeviceResult or PostHFResult object.

  • property_name (str) – The name of a property to extract.

  • state_pair (Iterable[int]) – A pair of indices of the state pair for the property value to be extracted.

Returns:

A list of objects containing a value for the specified property for the specified state pair, typically contains the state pair, the property value and its sample standard deviation.

qamuy.chemistry.get_evaluated_property(result, property_name)#

Extract evaluated property values from a quantum/post-HF result object.

Parameters:
  • result – A QuantumDeviceResult or PostHFResult object.

  • property_name (str) – The name of a property to extract.

Returns:

An object containing values for the specified property, typically contains a list of property values and metadata.

qamuy.chemistry.get_evaluated_property_for_state(result, property_name, state=0)#

Extract an evaluated property value for a state from a quantum/post-HF result object.

Parameters:
  • result – A QuantumDeviceResult or PostHFResult object.

  • property_name (str) – The name of a property to extract.

  • state (int) – The index of a state for a property value to be extracted.

Returns:

An object containing a value for the specified property for the specified state, typically contains the state index, the property value and its sample standard deviation.

qamuy.chemistry.get_evaluated_property_for_state_pair(result, property_name, state_pair)#

Extract an evaluated property value for a state pair from a quantum/post-HF result object.

Parameters:
  • result – A QuantumDeviceResult or PostHFResult object.

  • property_name (str) – The name of a property to extract.

  • state_pair (Iterable[int]) – A pair of indices of the state pair for the property value to be extracted.

Returns:

An object containing a value for the specified property for the specified state pair, typically contains the state pair, the property value and its sample standard deviation.

qamuy.chemistry.get_optimized_geometry(geo_result)#

Extract an object representing optimized geometry of molecule.

Parameters:

geo_result – A GeometryOptimizationResult object.

Returns:

A Molecule.Geometry object.

qamuy.chemistry.mitigation(mitigation_type, **kwargs)#

Create an object representing parameters of a mitigation to be used. See a description of mitigation in the reference page of input data for detail.

Parameters:
  • mitigation_type (str) – An identifier of the mitigation method. (e.g. “measurement_error”)

  • kwargs – Keyword arguments necessary for each mitigation.

Returns:

A Mitigation object, which can be put into quantum_device.mitigation attribute.

qamuy.chemistry.molecule_geometry(atoms, coordinates, geometry_format='CARTESIAN')#

Create an object representing geometry of a molecule.

Parameters:
  • atoms – A list of nuclei that make up the molecule.

  • coordinates – A list of coordinates of the nuclei specifying a molecular structure, or a list of such lists specifying multiple molecular structure.

  • geometry_format – A notation in which the coordinates are described. Possible values are CARTESIAN (default) and Z_MATRIX.

Returns:

A Molecule.Geometry object, which can be substituted in target_molecule.geometry attribute.

qamuy.chemistry.molecule_geometry_from_xyz(xyz)#

Create an object representing geometry of a molecule from a string of xyz format. See https://en.wikipedia.org/wiki/XYZ_file_format

Parameters:

xyz – A string of xyz format.

Returns:

A Molecule.Geometry object, which can be substituted in target_molecule.geometry attribute.

qamuy.chemistry.output_chemical_property(target, **kwargs)#

Create an object representing parameters of a chemical property to be calculated. See a description of each target property in the reference page of input data for detail.

Parameters:
  • target (str) – An identifier of the target property. (e.g. “energy”, “dipole_moment”, etc.)

  • kwargs – Keyword arguments necessary for each target property.

Returns:

A TargetChemicalProperty object, which can be put into output_chemical_properties attribute.

qamuy.chemistry.periodic_system_geometry(atoms, coordinates, trans_vector, kpt_grid_shape)#

Create an object representing geometry of a periodic system.

Parameters:
  • atoms – A list of nuclei that make up a cell of a periodic system.

  • coordinates – A list of coordinates of the nuclei specifying a priodic system, or a list of such lists specifying multiple structures.

  • trans_vector – Translation vectors that characterize a periodic boundary condition.

  • kpt_grid_shape – The numbers of k points for each axis of the reciprocal space.

Returns:

A PeriodicSystem.Geometry object, which can be substituted in target_periodic_system.geometry attribute.

qamuy.chemistry.spin_state(state, multiplicity, sz)#

Create an object representing a spin state for a reference state.

Parameters:
  • state (int) – The index of a reference state.

  • multiplicity (int) – The multiplicity of a reference state.

  • sz (float) – The value of z component of the total spin of a reference state.

Returns:

A SpinState object.