@qctrl/visualizer
Version:
The Q-CTRL Visualizer is a package for displaying animated 3d Bloch sphere visualizations.
17 lines (16 loc) • 805 B
TypeScript
import { Vector3Tuple } from "three";
export type StandardGateType = "X" | "Y" | "Z" | "H" | "S" | "S_DAG" | "T" | "T_DAG";
export type GateType = StandardGateType | "MEASUREMENT";
export interface Gate {
gateType: GateType;
rotationPercentage?: number;
}
export type Gates = Gate[];
export declare const STANDARD_GATE_ROTATION_RADIANS: Record<StandardGateType, number>;
export declare const GATE_AXES: Record<StandardGateType, Vector3Tuple>;
/**
* Gets an array of {@link https://threejs.org/docs/index.html#api/en/math/Vector3|Threejs Vectors3s}
* that represent a sequence of gates or rotations to be plotted on a bloch sphere
*/
declare const getVectorsFromGateSeq: (gates: Gates, start: Vector3Tuple, generatePathVectors?: boolean) => Vector3Tuple[];
export default getVectorsFromGateSeq;