Shortcuts

qiskit.quantum_info.Quaternion

class Quaternion(data)[ソース]

A class representing a Quaternion.

__init__(data)[ソース]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(data)

Initialize self.

from_axis_rotation(angle, axis)

Return quaternion for rotation about given axis.

from_euler(angles[, order])

Generate a quaternion from a set of Euler angles.

norm()

Norm of quaternion.

normalize([inplace])

Normalizes a Quaternion to unit length so that it represents a valid rotation.

to_matrix()

Converts a unit-length quaternion to a rotation matrix.

to_zyz()

Converts a unit-length quaternion to a sequence of ZYZ Euler angles.

classmethod from_axis_rotation(angle, axis)[ソース]

Return quaternion for rotation about given axis.

パラメータ
  • angle (float) – Angle in radians.

  • axis (str) – Axis for rotation

戻り値

Quaternion for axis rotation.

戻り値の型

Quaternion

例外

ValueError – Invalid input axis.

classmethod from_euler(angles, order='yzy')[ソース]

Generate a quaternion from a set of Euler angles.

パラメータ
  • angles (array_like) – Array of Euler angles.

  • order (str) – Order of Euler rotations. 『yzy』 is default.

戻り値

Quaternion representation of Euler rotation.

戻り値の型

Quaternion

norm()[ソース]

Norm of quaternion.

normalize(inplace=False)[ソース]

Normalizes a Quaternion to unit length so that it represents a valid rotation.

パラメータ

inplace (bool) – Do an inplace normalization.

戻り値

Normalized quaternion.

戻り値の型

Quaternion

to_matrix()[ソース]

Converts a unit-length quaternion to a rotation matrix.

戻り値

Rotation matrix.

戻り値の型

ndarray

to_zyz()[ソース]

Converts a unit-length quaternion to a sequence of ZYZ Euler angles.

戻り値

Array of Euler angles.

戻り値の型

ndarray

表示 lang: Japanese
言語
English
Japanese
German
Korean