Pattern data structure¶
graphix.command module¶
This module defines standard data structure for pattern commands.
Data validator command classes.
- class graphix.command.N(node: int, state: ~graphix.states.State = <factory>)[source]¶
Preparation command.
graphix.fundamentals module¶
This module defines standard data structure for Pauli operators.
Fundamental components related to quantum mechanics.
- class graphix.fundamentals.Axis(value)[source]¶
Axis: X, Y or Z.
- property matrix: npt.NDArray[np.complex128]¶
Return the matrix representation.
- class graphix.fundamentals.ComplexUnit(value)[source]¶
Complex unit: 1, -1, j, -j.
Complex units can be multiplied with other complex units, with Python constants 1, -1, 1j, -1j, and can be negated.
- static from_properties(*, sign: Sign = Sign.PLUS, is_imag: bool = False) ComplexUnit[source]¶
Construct ComplexUnit from its properties.
- property is_imag: bool¶
Return True if j or -j.
- static try_from(value: ComplexUnit | SupportsComplex | SupportsFloat | SupportsIndex | complex) ComplexUnit | None[source]¶
Return the ComplexUnit instance if the value is compatible, None otherwise.
- class graphix.fundamentals.IXYZ(value)[source]¶
I, X, Y or Z.
- property matrix: npt.NDArray[np.complex128]¶
Return the matrix representation.
graphix.pauli module¶
This module defines standard data structure for Pauli operators.
Pauli gates ± {1,j} × {I, X, Y, Z}.
- class graphix.pauli.Pauli(symbol: IXYZ = IXYZ.I, unit: ComplexUnit = ComplexUnit.ONE)[source]¶
Pauli gate: u * {I, X, Y, Z} where u is a complex unit.
Pauli gates can be multiplied with other Pauli gates (with @), with complex units and unit constants (with *), and can be negated.
graphix.instruction module¶
This module defines standard data structure for gate seqence (circuit model) used for graphix.transpiler.Circuit.
Instruction classes.
- class graphix.instruction.RX(target: int, angle: float, meas_index: int | None = None)[source]¶
X rotation circuit instruction.
- class graphix.instruction.RZ(target: int, angle: float, meas_index: int | None = None)[source]¶
Z rotation circuit instruction.
- class graphix.instruction.RY(target: int, angle: float, meas_index: int | None = None)[source]¶
Y rotation circuit instruction.
graphix.states module¶
Quantum states and operators.