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: Korean
언어
English
Japanese
German
Korean