Common¶
graphqomb.common module¶
Common classes and functions.
This module provides:
Plane: Measurement planes for the MBQC.Axis: Measurement axis.Sign: Measurement sign.MeasBasis: Abstract class to represent a measurement basis.PlannerMeasBasis: Class to represent a planner measurement basis.AxisMeasBasis: Class to represent an axis measurement basis.is_close_angle: Check if an angle is close to a target angle.is_clifford_angle: Check if an angle is a Clifford angle.determine_pauli_axis: Function to determine Pauli axis for a measurement basis.default_meas_basis: Function to return the default measurement basis.meas_basis: Function to get the measurement basis vector.
Enums¶
- class graphqomb.common.Plane¶
Measurement planes for MBQC.
We distinguish the axial measurements from the planar measurements.
- XY¶
Arbitrary-angle measurement on the XY plane.
- YZ¶
Arbitrary-angle measurement on the YZ plane.
- XZ¶
Arbitrary-angle measurement on the XZ plane.
Abstract Base Classes¶
Measurement Basis Classes¶
- class graphqomb.common.PlannerMeasBasis[source]¶
Bases:
MeasBasisClass to represent a planner measurement basis.
- conjugate()[source]¶
Return the angle-conjugated PlannerMeasBasis object.
This operation represents measurement-angle sign inversion. It is not defined as complex conjugation of the basis vector.
- Returns:
angle-conjugated PlannerMeasBasis
- Return type:
- Raises:
TypeError – if the plane is not one of XY, YZ, XZ
- class graphqomb.common.AxisMeasBasis[source]¶
Bases:
MeasBasisClass to represent an axis measurement basis.
The aim is to pocess the accurate information of the axis measurement.
- conjugate()[source]¶
Return the conjugate of the AxisMeasBasis object.
- Returns:
conjugate AxisMeasBasis
- Return type:
Functions¶
- graphqomb.common.is_close_angle(angle, target, atol=1e-09)[source]¶
Check if an angle is close to a target angle.
- graphqomb.common.is_clifford_angle(angle, atol=1e-09)[source]¶
Check if an angle is a Clifford angle.
- graphqomb.common.determine_pauli_axis(meas_bases)[source]¶
Determine Pauli axis for a measurement basis if it’s a Pauli measurement.
- graphqomb.common.default_meas_basis()[source]¶
Return the default measurement basis.
The default measurement basis is the XY plane with angle 0.
- Returns:
default measurement basis
- Return type: