UNPKG

qukit

Version:

[![Npm](https://badgen.net/npm/v/qukit)](https://www.npmjs.com/package/qukit) [![Crates](https://badgen.net/crates/v/qukit)](https://crates.io/crates/qukit) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/lice

1,258 lines (1,252 loc) 42.7 kB
/* tslint:disable */ /* eslint-disable */ /** * @param {QBit} qbit */ export function hadamard(qbit: QBit): void; /** * @param {QBit} c_qbit * @param {QBit} t_qbit */ export function controlled_hadamard(c_qbit: QBit, t_qbit: QBit): void; /** * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit */ export function controlled_controlled_hadamard(c_qbit_0: QBit, c_qbit_1: QBit, t_qbit: QBit): void; /** * @param {QBit} qbit */ export function hadamard_same_step(qbit: QBit): void; /** * @param {QBit} c_qbit * @param {QBit} t_qbit */ export function controlled_hadamard_same_step(c_qbit: QBit, t_qbit: QBit): void; /** * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit */ export function controlled_controlled_hadamard_same_step(c_qbit_0: QBit, c_qbit_1: QBit, t_qbit: QBit): void; /** * @param {QBit} qbit * @param {Bit} bit */ export function hadamard_same_step_classically_controlled(qbit: QBit, bit: Bit): void; /** * @param {QBit} qbit * @param {Bit} bit */ export function hadamard_classically_controlled(qbit: QBit, bit: Bit): void; /** * @param {QBit} qbit */ export function pauli_x(qbit: QBit): void; /** * @param {QBit} c_qbit * @param {QBit} t_qbit */ export function controlled_pauli_x(c_qbit: QBit, t_qbit: QBit): void; /** * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit */ export function controlled_controlled_pauli_x(c_qbit_0: QBit, c_qbit_1: QBit, t_qbit: QBit): void; /** * @param {QBit} qbit */ export function pauli_x_same_step(qbit: QBit): void; /** * @param {QBit} c_qbit * @param {QBit} t_qbit */ export function controlled_pauli_x_same_step(c_qbit: QBit, t_qbit: QBit): void; /** * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit */ export function controlled_controlled_pauli_x_same_step(c_qbit_0: QBit, c_qbit_1: QBit, t_qbit: QBit): void; /** * @param {QBit} qbit * @param {Bit} bit */ export function pauli_x_same_step_classically_controlled(qbit: QBit, bit: Bit): void; /** * @param {QBit} qbit * @param {Bit} bit */ export function pauli_x_classically_controlled(qbit: QBit, bit: Bit): void; /** * @param {QBit} qbit */ export function pauli_y(qbit: QBit): void; /** * @param {QBit} c_qbit * @param {QBit} t_qbit */ export function controlled_pauli_y(c_qbit: QBit, t_qbit: QBit): void; /** * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit */ export function controlled_controlled_pauli_y(c_qbit_0: QBit, c_qbit_1: QBit, t_qbit: QBit): void; /** * @param {QBit} qbit */ export function pauli_y_same_step(qbit: QBit): void; /** * @param {QBit} c_qbit * @param {QBit} t_qbit */ export function controlled_pauli_y_same_step(c_qbit: QBit, t_qbit: QBit): void; /** * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit */ export function controlled_controlled_pauli_y_same_step(c_qbit_0: QBit, c_qbit_1: QBit, t_qbit: QBit): void; /** * @param {QBit} qbit * @param {Bit} bit */ export function pauli_y_same_step_classically_controlled(qbit: QBit, bit: Bit): void; /** * @param {QBit} qbit * @param {Bit} bit */ export function pauli_y_classically_controlled(qbit: QBit, bit: Bit): void; /** * @param {QBit} qbit */ export function pauli_z(qbit: QBit): void; /** * @param {QBit} c_qbit * @param {QBit} t_qbit */ export function controlled_pauli_z(c_qbit: QBit, t_qbit: QBit): void; /** * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit */ export function controlled_controlled_pauli_z(c_qbit_0: QBit, c_qbit_1: QBit, t_qbit: QBit): void; /** * @param {QBit} qbit */ export function pauli_z_same_step(qbit: QBit): void; /** * @param {QBit} c_qbit * @param {QBit} t_qbit */ export function controlled_pauli_z_same_step(c_qbit: QBit, t_qbit: QBit): void; /** * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit */ export function controlled_controlled_pauli_z_same_step(c_qbit_0: QBit, c_qbit_1: QBit, t_qbit: QBit): void; /** * @param {QBit} qbit * @param {Bit} bit */ export function pauli_z_same_step_classically_controlled(qbit: QBit, bit: Bit): void; /** * @param {QBit} qbit * @param {Bit} bit */ export function pauli_z_classically_controlled(qbit: QBit, bit: Bit): void; /** * @param {QBit} qbit */ export function phase(qbit: QBit): void; /** * @param {QBit} c_qbit * @param {QBit} t_qbit */ export function controlled_phase(c_qbit: QBit, t_qbit: QBit): void; /** * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit */ export function controlled_controlled_phase(c_qbit_0: QBit, c_qbit_1: QBit, t_qbit: QBit): void; /** * @param {QBit} qbit */ export function phase_same_step(qbit: QBit): void; /** * @param {QBit} c_qbit * @param {QBit} t_qbit */ export function controlled_phase_same_step(c_qbit: QBit, t_qbit: QBit): void; /** * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit */ export function controlled_controlled_phase_same_step(c_qbit_0: QBit, c_qbit_1: QBit, t_qbit: QBit): void; /** * @param {QBit} qbit * @param {Bit} bit */ export function phase_same_step_classically_controlled(qbit: QBit, bit: Bit): void; /** * @param {QBit} qbit * @param {Bit} bit */ export function phase_classically_controlled(qbit: QBit, bit: Bit): void; /** * @param {QBit} qbit */ export function phase_dagger(qbit: QBit): void; /** * @param {QBit} c_qbit * @param {QBit} t_qbit */ export function controlled_phase_dagger(c_qbit: QBit, t_qbit: QBit): void; /** * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit */ export function controlled_controlled_phase_dagger(c_qbit_0: QBit, c_qbit_1: QBit, t_qbit: QBit): void; /** * @param {QBit} qbit */ export function phase_dagger_same_step(qbit: QBit): void; /** * @param {QBit} c_qbit * @param {QBit} t_qbit */ export function controlled_phase_dagger_same_step(c_qbit: QBit, t_qbit: QBit): void; /** * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit */ export function controlled_controlled_phase_dagger_same_step(c_qbit_0: QBit, c_qbit_1: QBit, t_qbit: QBit): void; /** * @param {QBit} qbit * @param {Bit} bit */ export function phase_dagger_same_step_classically_controlled(qbit: QBit, bit: Bit): void; /** * @param {QBit} qbit * @param {Bit} bit */ export function phase_dagger_classically_controlled(qbit: QBit, bit: Bit): void; /** * @param {QBit} qbit */ export function phase_root(qbit: QBit): void; /** * @param {QBit} c_qbit * @param {QBit} t_qbit */ export function controlled_phase_root(c_qbit: QBit, t_qbit: QBit): void; /** * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit */ export function controlled_controlled_phase_root(c_qbit_0: QBit, c_qbit_1: QBit, t_qbit: QBit): void; /** * @param {QBit} qbit */ export function phase_root_same_step(qbit: QBit): void; /** * @param {QBit} c_qbit * @param {QBit} t_qbit */ export function controlled_phase_root_same_step(c_qbit: QBit, t_qbit: QBit): void; /** * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit */ export function controlled_controlled_phase_root_same_step(c_qbit_0: QBit, c_qbit_1: QBit, t_qbit: QBit): void; /** * @param {QBit} qbit * @param {Bit} bit */ export function phase_root_same_step_classically_controlled(qbit: QBit, bit: Bit): void; /** * @param {QBit} qbit * @param {Bit} bit */ export function phase_root_classically_controlled(qbit: QBit, bit: Bit): void; /** * @param {QBit} qbit */ export function phase_root_dagger(qbit: QBit): void; /** * @param {QBit} c_qbit * @param {QBit} t_qbit */ export function controlled_phase_root_dagger(c_qbit: QBit, t_qbit: QBit): void; /** * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit */ export function controlled_controlled_phase_root_dagger(c_qbit_0: QBit, c_qbit_1: QBit, t_qbit: QBit): void; /** * @param {QBit} qbit */ export function phase_root_dagger_same_step(qbit: QBit): void; /** * @param {QBit} c_qbit * @param {QBit} t_qbit */ export function controlled_phase_root_dagger_same_step(c_qbit: QBit, t_qbit: QBit): void; /** * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit */ export function controlled_controlled_phase_root_dagger_same_step(c_qbit_0: QBit, c_qbit_1: QBit, t_qbit: QBit): void; /** * @param {QBit} qbit * @param {Bit} bit */ export function phase_root_dagger_same_step_classically_controlled(qbit: QBit, bit: Bit): void; /** * @param {QBit} qbit * @param {Bit} bit */ export function phase_root_dagger_classically_controlled(qbit: QBit, bit: Bit): void; /** * @param {QBit} qbit */ export function pauli_x_root(qbit: QBit): void; /** * @param {QBit} c_qbit * @param {QBit} t_qbit */ export function controlled_pauli_x_root(c_qbit: QBit, t_qbit: QBit): void; /** * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit */ export function controlled_controlled_pauli_x_root(c_qbit_0: QBit, c_qbit_1: QBit, t_qbit: QBit): void; /** * @param {QBit} qbit */ export function pauli_x_root_same_step(qbit: QBit): void; /** * @param {QBit} c_qbit * @param {QBit} t_qbit */ export function controlled_pauli_x_root_same_step(c_qbit: QBit, t_qbit: QBit): void; /** * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit */ export function controlled_controlled_pauli_x_root_same_step(c_qbit_0: QBit, c_qbit_1: QBit, t_qbit: QBit): void; /** * @param {QBit} qbit * @param {Bit} bit */ export function pauli_x_root_same_step_classically_controlled(qbit: QBit, bit: Bit): void; /** * @param {QBit} qbit * @param {Bit} bit */ export function pauli_x_root_classically_controlled(qbit: QBit, bit: Bit): void; /** * @param {QBit} qbit_0 * @param {QBit} qbit_1 */ export function swap(qbit_0: QBit, qbit_1: QBit): void; /** * @param {QBit} c_qbit * @param {QBit} t_qbit_0 * @param {QBit} t_qbit_1 */ export function controlled_swap(c_qbit: QBit, t_qbit_0: QBit, t_qbit_1: QBit): void; /** * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit_0 * @param {QBit} t_qbit_1 */ export function controlled_controlled_swap(c_qbit_0: QBit, c_qbit_1: QBit, t_qbit_0: QBit, t_qbit_1: QBit): void; /** * @param {QBit} qbit_0 * @param {QBit} qbit_1 */ export function swap_same_step(qbit_0: QBit, qbit_1: QBit): void; /** * @param {QBit} c_qbit * @param {QBit} t_qbit_0 * @param {QBit} t_qbit_1 */ export function controlled_swap_same_step(c_qbit: QBit, t_qbit_0: QBit, t_qbit_1: QBit): void; /** * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit_0 * @param {QBit} t_qbit_1 */ export function controlled_controlled_swap_same_step(c_qbit_0: QBit, c_qbit_1: QBit, t_qbit_0: QBit, t_qbit_1: QBit): void; /** * @param {QBit} qbit_0 * @param {QBit} qbit_1 * @param {Bit} bit */ export function swap_same_step_classically_controlled(qbit_0: QBit, qbit_1: QBit, bit: Bit): void; /** * @param {QBit} qbit_0 * @param {QBit} qbit_1 * @param {Bit} bit */ export function swap_classically_controlled(qbit_0: QBit, qbit_1: QBit, bit: Bit): void; /** * @param {QBit} qbit_0 * @param {QBit} qbit_1 */ export function swap_root(qbit_0: QBit, qbit_1: QBit): void; /** * @param {QBit} c_qbit * @param {QBit} t_qbit_0 * @param {QBit} t_qbit_1 */ export function controlled_swap_root(c_qbit: QBit, t_qbit_0: QBit, t_qbit_1: QBit): void; /** * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit_0 * @param {QBit} t_qbit_1 */ export function controlled_controlled_swap_root(c_qbit_0: QBit, c_qbit_1: QBit, t_qbit_0: QBit, t_qbit_1: QBit): void; /** * @param {QBit} qbit_0 * @param {QBit} qbit_1 */ export function swap_root_same_step(qbit_0: QBit, qbit_1: QBit): void; /** * @param {QBit} c_qbit * @param {QBit} t_qbit_0 * @param {QBit} t_qbit_1 */ export function controlled_swap_root_same_step(c_qbit: QBit, t_qbit_0: QBit, t_qbit_1: QBit): void; /** * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit_0 * @param {QBit} t_qbit_1 */ export function controlled_controlled_swap_root_same_step(c_qbit_0: QBit, c_qbit_1: QBit, t_qbit_0: QBit, t_qbit_1: QBit): void; /** * @param {QBit} qbit_0 * @param {QBit} qbit_1 * @param {Bit} bit */ export function swap_root_same_step_classically_controlled(qbit_0: QBit, qbit_1: QBit, bit: Bit): void; /** * @param {QBit} qbit_0 * @param {QBit} qbit_1 * @param {Bit} bit */ export function swap_root_classically_controlled(qbit_0: QBit, qbit_1: QBit, bit: Bit): void; /** * @param {number} theta * @param {QBit} qbit */ export function rotation_hadamard(theta: number, qbit: QBit): void; /** * @param {number} theta * @param {QBit} c_qbit * @param {QBit} t_qbit */ export function controlled_rotation_hadamard(theta: number, c_qbit: QBit, t_qbit: QBit): void; /** * @param {number} theta * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit */ export function controlled_controlled_rotation_hadamard(theta: number, c_qbit_0: QBit, c_qbit_1: QBit, t_qbit: QBit): void; /** * @param {number} theta * @param {QBit} qbit */ export function rotation_hadamard_same_step(theta: number, qbit: QBit): void; /** * @param {number} theta * @param {QBit} c_qbit * @param {QBit} t_qbit */ export function controlled_rotation_hadamard_same_step(theta: number, c_qbit: QBit, t_qbit: QBit): void; /** * @param {number} theta * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit */ export function controlled_controlled_rotation_hadamard_same_step(theta: number, c_qbit_0: QBit, c_qbit_1: QBit, t_qbit: QBit): void; /** * @param {number} theta * @param {QBit} qbit * @param {Bit} bit */ export function rotation_hadamard_same_step_classically_controlled(theta: number, qbit: QBit, bit: Bit): void; /** * @param {number} theta * @param {QBit} qbit * @param {Bit} bit */ export function rotation_hadamard_classically_controlled(theta: number, qbit: QBit, bit: Bit): void; /** * @param {number} theta * @param {QBit} qbit */ export function rotation_pauli_x(theta: number, qbit: QBit): void; /** * @param {number} theta * @param {QBit} c_qbit * @param {QBit} t_qbit */ export function controlled_rotation_pauli_x(theta: number, c_qbit: QBit, t_qbit: QBit): void; /** * @param {number} theta * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit */ export function controlled_controlled_rotation_pauli_x(theta: number, c_qbit_0: QBit, c_qbit_1: QBit, t_qbit: QBit): void; /** * @param {number} theta * @param {QBit} qbit */ export function rotation_pauli_x_same_step(theta: number, qbit: QBit): void; /** * @param {number} theta * @param {QBit} c_qbit * @param {QBit} t_qbit */ export function controlled_rotation_pauli_x_same_step(theta: number, c_qbit: QBit, t_qbit: QBit): void; /** * @param {number} theta * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit */ export function controlled_controlled_rotation_pauli_x_same_step(theta: number, c_qbit_0: QBit, c_qbit_1: QBit, t_qbit: QBit): void; /** * @param {number} theta * @param {QBit} qbit * @param {Bit} bit */ export function rotation_pauli_x_same_step_classically_controlled(theta: number, qbit: QBit, bit: Bit): void; /** * @param {number} theta * @param {QBit} qbit * @param {Bit} bit */ export function rotation_pauli_x_classically_controlled(theta: number, qbit: QBit, bit: Bit): void; /** * @param {number} theta * @param {QBit} qbit */ export function rotation_pauli_y(theta: number, qbit: QBit): void; /** * @param {number} theta * @param {QBit} c_qbit * @param {QBit} t_qbit */ export function controlled_rotation_pauli_y(theta: number, c_qbit: QBit, t_qbit: QBit): void; /** * @param {number} theta * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit */ export function controlled_controlled_rotation_pauli_y(theta: number, c_qbit_0: QBit, c_qbit_1: QBit, t_qbit: QBit): void; /** * @param {number} theta * @param {QBit} qbit */ export function rotation_pauli_y_same_step(theta: number, qbit: QBit): void; /** * @param {number} theta * @param {QBit} c_qbit * @param {QBit} t_qbit */ export function controlled_rotation_pauli_y_same_step(theta: number, c_qbit: QBit, t_qbit: QBit): void; /** * @param {number} theta * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit */ export function controlled_controlled_rotation_pauli_y_same_step(theta: number, c_qbit_0: QBit, c_qbit_1: QBit, t_qbit: QBit): void; /** * @param {number} theta * @param {QBit} qbit * @param {Bit} bit */ export function rotation_pauli_y_same_step_classically_controlled(theta: number, qbit: QBit, bit: Bit): void; /** * @param {number} theta * @param {QBit} qbit * @param {Bit} bit */ export function rotation_pauli_y_classically_controlled(theta: number, qbit: QBit, bit: Bit): void; /** * @param {number} theta * @param {QBit} qbit */ export function rotation_pauli_z(theta: number, qbit: QBit): void; /** * @param {number} theta * @param {QBit} c_qbit * @param {QBit} t_qbit */ export function controlled_rotation_pauli_z(theta: number, c_qbit: QBit, t_qbit: QBit): void; /** * @param {number} theta * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit */ export function controlled_controlled_rotation_pauli_z(theta: number, c_qbit_0: QBit, c_qbit_1: QBit, t_qbit: QBit): void; /** * @param {number} theta * @param {QBit} qbit */ export function rotation_pauli_z_same_step(theta: number, qbit: QBit): void; /** * @param {number} theta * @param {QBit} c_qbit * @param {QBit} t_qbit */ export function controlled_rotation_pauli_z_same_step(theta: number, c_qbit: QBit, t_qbit: QBit): void; /** * @param {number} theta * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit */ export function controlled_controlled_rotation_pauli_z_same_step(theta: number, c_qbit_0: QBit, c_qbit_1: QBit, t_qbit: QBit): void; /** * @param {number} theta * @param {QBit} qbit * @param {Bit} bit */ export function rotation_pauli_z_same_step_classically_controlled(theta: number, qbit: QBit, bit: Bit): void; /** * @param {number} theta * @param {QBit} qbit * @param {Bit} bit */ export function rotation_pauli_z_classically_controlled(theta: number, qbit: QBit, bit: Bit): void; /** * @param {number} theta * @param {QBit} qbit */ export function rotation_x(theta: number, qbit: QBit): void; /** * @param {number} theta * @param {QBit} c_qbit * @param {QBit} t_qbit */ export function controlled_rotation_x(theta: number, c_qbit: QBit, t_qbit: QBit): void; /** * @param {number} theta * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit */ export function controlled_controlled_rotation_x(theta: number, c_qbit_0: QBit, c_qbit_1: QBit, t_qbit: QBit): void; /** * @param {number} theta * @param {QBit} qbit */ export function rotation_x_same_step(theta: number, qbit: QBit): void; /** * @param {number} theta * @param {QBit} c_qbit * @param {QBit} t_qbit */ export function controlled_rotation_x_same_step(theta: number, c_qbit: QBit, t_qbit: QBit): void; /** * @param {number} theta * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit */ export function controlled_controlled_rotation_x_same_step(theta: number, c_qbit_0: QBit, c_qbit_1: QBit, t_qbit: QBit): void; /** * @param {number} theta * @param {QBit} qbit * @param {Bit} bit */ export function rotation_x_same_step_classically_controlled(theta: number, qbit: QBit, bit: Bit): void; /** * @param {number} theta * @param {QBit} qbit * @param {Bit} bit */ export function rotation_x_classically_controlled(theta: number, qbit: QBit, bit: Bit): void; /** * @param {number} theta * @param {QBit} qbit */ export function rotation_y(theta: number, qbit: QBit): void; /** * @param {number} theta * @param {QBit} c_qbit * @param {QBit} t_qbit */ export function controlled_rotation_y(theta: number, c_qbit: QBit, t_qbit: QBit): void; /** * @param {number} theta * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit */ export function controlled_controlled_rotation_y(theta: number, c_qbit_0: QBit, c_qbit_1: QBit, t_qbit: QBit): void; /** * @param {number} theta * @param {QBit} qbit */ export function rotation_y_same_step(theta: number, qbit: QBit): void; /** * @param {number} theta * @param {QBit} c_qbit * @param {QBit} t_qbit */ export function controlled_rotation_y_same_step(theta: number, c_qbit: QBit, t_qbit: QBit): void; /** * @param {number} theta * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit */ export function controlled_controlled_rotation_y_same_step(theta: number, c_qbit_0: QBit, c_qbit_1: QBit, t_qbit: QBit): void; /** * @param {number} theta * @param {QBit} qbit * @param {Bit} bit */ export function rotation_y_same_step_classically_controlled(theta: number, qbit: QBit, bit: Bit): void; /** * @param {number} theta * @param {QBit} qbit * @param {Bit} bit */ export function rotation_y_classically_controlled(theta: number, qbit: QBit, bit: Bit): void; /** * @param {number} theta * @param {QBit} qbit */ export function rotation_z(theta: number, qbit: QBit): void; /** * @param {number} theta * @param {QBit} c_qbit * @param {QBit} t_qbit */ export function controlled_rotation_z(theta: number, c_qbit: QBit, t_qbit: QBit): void; /** * @param {number} theta * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit */ export function controlled_controlled_rotation_z(theta: number, c_qbit_0: QBit, c_qbit_1: QBit, t_qbit: QBit): void; /** * @param {number} theta * @param {QBit} qbit */ export function rotation_z_same_step(theta: number, qbit: QBit): void; /** * @param {number} theta * @param {QBit} c_qbit * @param {QBit} t_qbit */ export function controlled_rotation_z_same_step(theta: number, c_qbit: QBit, t_qbit: QBit): void; /** * @param {number} theta * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit */ export function controlled_controlled_rotation_z_same_step(theta: number, c_qbit_0: QBit, c_qbit_1: QBit, t_qbit: QBit): void; /** * @param {number} theta * @param {QBit} qbit * @param {Bit} bit */ export function rotation_z_same_step_classically_controlled(theta: number, qbit: QBit, bit: Bit): void; /** * @param {number} theta * @param {QBit} qbit * @param {Bit} bit */ export function rotation_z_classically_controlled(theta: number, qbit: QBit, bit: Bit): void; /** * @param {number} theta * @param {QBit} qbit_0 * @param {QBit} qbit_1 */ export function rotation_swap(theta: number, qbit_0: QBit, qbit_1: QBit): void; /** * @param {number} theta * @param {QBit} c_qbit * @param {QBit} t_qbit_0 * @param {QBit} t_qbit_1 */ export function controlled_rotation_swap(theta: number, c_qbit: QBit, t_qbit_0: QBit, t_qbit_1: QBit): void; /** * @param {number} theta * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit_0 * @param {QBit} t_qbit_1 */ export function controlled_controlled_rotation_swap(theta: number, c_qbit_0: QBit, c_qbit_1: QBit, t_qbit_0: QBit, t_qbit_1: QBit): void; /** * @param {number} theta * @param {QBit} qbit_0 * @param {QBit} qbit_1 */ export function rotation_swap_same_step(theta: number, qbit_0: QBit, qbit_1: QBit): void; /** * @param {number} theta * @param {QBit} c_qbit * @param {QBit} t_qbit_0 * @param {QBit} t_qbit_1 */ export function controlled_rotation_swap_same_step(theta: number, c_qbit: QBit, t_qbit_0: QBit, t_qbit_1: QBit): void; /** * @param {number} theta * @param {QBit} c_qbit_0 * @param {QBit} c_qbit_1 * @param {QBit} t_qbit_0 * @param {QBit} t_qbit_1 */ export function controlled_controlled_rotation_swap_same_step(theta: number, c_qbit_0: QBit, c_qbit_1: QBit, t_qbit_0: QBit, t_qbit_1: QBit): void; /** * @param {number} theta * @param {QBit} qbit_0 * @param {QBit} qbit_1 * @param {Bit} bit */ export function rotation_swap_same_step_classically_controlled(theta: number, qbit_0: QBit, qbit_1: QBit, bit: Bit): void; /** * @param {number} theta * @param {QBit} qbit_0 * @param {QBit} qbit_1 * @param {Bit} bit */ export function rotation_swap_classically_controlled(theta: number, qbit_0: QBit, qbit_1: QBit, bit: Bit): void; /** * @param {QBit} qbit * @param {Bit} bit */ export function measurement_x(qbit: QBit, bit: Bit): void; /** * @param {QBit} qbit * @param {Bit} bit */ export function measurement_y(qbit: QBit, bit: Bit): void; /** * @param {QBit} qbit * @param {Bit} bit */ export function measurement_z(qbit: QBit, bit: Bit): void; /** * @param {QBit} qbit * @param {Bit} bit */ export function measurement_x_same_step(qbit: QBit, bit: Bit): void; /** * @param {QBit} qbit * @param {Bit} bit */ export function measurement_y_same_step(qbit: QBit, bit: Bit): void; /** * @param {QBit} qbit * @param {Bit} bit */ export function measurement_z_same_step(qbit: QBit, bit: Bit): void; /** * @param {QBit} qbit */ export function reset(qbit: QBit): void; /** * @param {QBit} qbit */ export function reset_same_step(qbit: QBit): void; /** * @param {number} num_threads * @returns {Promise<any>} */ export function initThreadPool(num_threads: number): Promise<any>; /** * @param {number} receiver */ export function wbg_rayon_start_worker(receiver: number): void; export interface Complex { re: number; im: number; } /** */ export class Algorithm { free(): void; /** * @returns {AlgorithmResult} */ run(): AlgorithmResult; /** * @returns {AlgorithmResult | undefined} */ step(): AlgorithmResult | undefined; /** * @param {number} steps * @returns {Algorithm} */ intoStepper(steps: number): Algorithm; } /** */ export class AlgorithmResult { free(): void; /** * @returns {QuantumRegister} */ quantumRegister(): QuantumRegister; /** * @returns {ClassicalRegister} */ classicalRegister(): ClassicalRegister; /** */ log(): void; } /** */ export class Bit { free(): void; } /** */ export class ClassicalRegister { free(): void; /** * @returns {(boolean)[]} */ state(): (boolean)[]; } /** */ export class GateBuilder { free(): void; /** */ constructor(); /** * @returns {Algorithm} */ intoAlgorithm(): Algorithm; /** * @returns {QBit} */ qbit(): QBit; /** * @param {number} size * @returns {(QBit)[]} */ qbits(size: number): (QBit)[]; /** * @returns {Bit} */ bit(): Bit; /** * @param {number} size * @returns {(Bit)[]} */ bits(size: number): (Bit)[]; } /** */ export class QBit { free(): void; } /** */ export class QuantumRegister { free(): void; /** * Returns the array of all states * @returns {Complex[]} */ states(): Complex[]; /** * Returns the states of this index * @param {number} idx * @returns {Complex | undefined} */ state(idx: number): Complex | undefined; /** * Returns the probability of all states * @returns {Float64Array} */ amplitudes(): Float64Array; /** * Returns the probabilities of each qbit * @returns {Float64Array} */ probabilities(): Float64Array; /** * Returns the probability of a qbit * @param {number} bit * @returns {number} */ probability(bit: number): number; } /** */ export class wbg_rayon_PoolBuilder { free(): void; /** * @returns {number} */ numThreads(): number; /** * @returns {number} */ receiver(): number; /** */ build(): void; } export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module; export interface InitOutput { readonly __wbg_algorithmresult_free: (a: number) => void; readonly algorithmresult_quantumRegister: (a: number) => number; readonly algorithmresult_classicalRegister: (a: number) => number; readonly algorithmresult_log: (a: number) => void; readonly __wbg_algorithm_free: (a: number) => void; readonly algorithm_run: (a: number) => number; readonly algorithm_step: (a: number) => number; readonly algorithm_intoStepper: (a: number, b: number) => number; readonly __wbg_qbit_free: (a: number) => void; readonly __wbg_bit_free: (a: number) => void; readonly __wbg_gatebuilder_free: (a: number) => void; readonly gatebuilder_new: () => number; readonly gatebuilder_intoAlgorithm: (a: number) => number; readonly gatebuilder_qbit: (a: number) => number; readonly gatebuilder_qbits: (a: number, b: number, c: number) => void; readonly gatebuilder_bit: (a: number) => number; readonly gatebuilder_bits: (a: number, b: number, c: number) => void; readonly hadamard: (a: number) => void; readonly controlled_hadamard: (a: number, b: number) => void; readonly controlled_controlled_hadamard: (a: number, b: number, c: number) => void; readonly hadamard_same_step: (a: number) => void; readonly controlled_hadamard_same_step: (a: number, b: number) => void; readonly controlled_controlled_hadamard_same_step: (a: number, b: number, c: number) => void; readonly hadamard_same_step_classically_controlled: (a: number, b: number) => void; readonly hadamard_classically_controlled: (a: number, b: number) => void; readonly pauli_x: (a: number) => void; readonly controlled_pauli_x: (a: number, b: number) => void; readonly controlled_controlled_pauli_x: (a: number, b: number, c: number) => void; readonly pauli_x_same_step: (a: number) => void; readonly controlled_pauli_x_same_step: (a: number, b: number) => void; readonly controlled_controlled_pauli_x_same_step: (a: number, b: number, c: number) => void; readonly pauli_x_same_step_classically_controlled: (a: number, b: number) => void; readonly pauli_x_classically_controlled: (a: number, b: number) => void; readonly pauli_y: (a: number) => void; readonly controlled_pauli_y: (a: number, b: number) => void; readonly controlled_controlled_pauli_y: (a: number, b: number, c: number) => void; readonly pauli_y_same_step: (a: number) => void; readonly controlled_pauli_y_same_step: (a: number, b: number) => void; readonly controlled_controlled_pauli_y_same_step: (a: number, b: number, c: number) => void; readonly pauli_y_same_step_classically_controlled: (a: number, b: number) => void; readonly pauli_y_classically_controlled: (a: number, b: number) => void; readonly pauli_z: (a: number) => void; readonly controlled_pauli_z: (a: number, b: number) => void; readonly controlled_controlled_pauli_z: (a: number, b: number, c: number) => void; readonly pauli_z_same_step: (a: number) => void; readonly controlled_pauli_z_same_step: (a: number, b: number) => void; readonly controlled_controlled_pauli_z_same_step: (a: number, b: number, c: number) => void; readonly pauli_z_same_step_classically_controlled: (a: number, b: number) => void; readonly pauli_z_classically_controlled: (a: number, b: number) => void; readonly phase: (a: number) => void; readonly controlled_phase: (a: number, b: number) => void; readonly controlled_controlled_phase: (a: number, b: number, c: number) => void; readonly phase_same_step: (a: number) => void; readonly controlled_phase_same_step: (a: number, b: number) => void; readonly controlled_controlled_phase_same_step: (a: number, b: number, c: number) => void; readonly phase_same_step_classically_controlled: (a: number, b: number) => void; readonly phase_classically_controlled: (a: number, b: number) => void; readonly phase_dagger: (a: number) => void; readonly controlled_phase_dagger: (a: number, b: number) => void; readonly controlled_controlled_phase_dagger: (a: number, b: number, c: number) => void; readonly phase_dagger_same_step: (a: number) => void; readonly controlled_phase_dagger_same_step: (a: number, b: number) => void; readonly controlled_controlled_phase_dagger_same_step: (a: number, b: number, c: number) => void; readonly phase_dagger_same_step_classically_controlled: (a: number, b: number) => void; readonly phase_dagger_classically_controlled: (a: number, b: number) => void; readonly phase_root: (a: number) => void; readonly controlled_phase_root: (a: number, b: number) => void; readonly controlled_controlled_phase_root: (a: number, b: number, c: number) => void; readonly phase_root_same_step: (a: number) => void; readonly controlled_phase_root_same_step: (a: number, b: number) => void; readonly controlled_controlled_phase_root_same_step: (a: number, b: number, c: number) => void; readonly phase_root_same_step_classically_controlled: (a: number, b: number) => void; readonly phase_root_classically_controlled: (a: number, b: number) => void; readonly phase_root_dagger: (a: number) => void; readonly controlled_phase_root_dagger: (a: number, b: number) => void; readonly controlled_controlled_phase_root_dagger: (a: number, b: number, c: number) => void; readonly phase_root_dagger_same_step: (a: number) => void; readonly controlled_phase_root_dagger_same_step: (a: number, b: number) => void; readonly controlled_controlled_phase_root_dagger_same_step: (a: number, b: number, c: number) => void; readonly phase_root_dagger_same_step_classically_controlled: (a: number, b: number) => void; readonly phase_root_dagger_classically_controlled: (a: number, b: number) => void; readonly pauli_x_root: (a: number) => void; readonly controlled_pauli_x_root: (a: number, b: number) => void; readonly controlled_controlled_pauli_x_root: (a: number, b: number, c: number) => void; readonly pauli_x_root_same_step: (a: number) => void; readonly controlled_pauli_x_root_same_step: (a: number, b: number) => void; readonly controlled_controlled_pauli_x_root_same_step: (a: number, b: number, c: number) => void; readonly pauli_x_root_same_step_classically_controlled: (a: number, b: number) => void; readonly pauli_x_root_classically_controlled: (a: number, b: number) => void; readonly swap: (a: number, b: number) => void; readonly controlled_swap: (a: number, b: number, c: number) => void; readonly controlled_controlled_swap: (a: number, b: number, c: number, d: number) => void; readonly swap_same_step: (a: number, b: number) => void; readonly controlled_swap_same_step: (a: number, b: number, c: number) => void; readonly controlled_controlled_swap_same_step: (a: number, b: number, c: number, d: number) => void; readonly swap_same_step_classically_controlled: (a: number, b: number, c: number) => void; readonly swap_classically_controlled: (a: number, b: number, c: number) => void; readonly swap_root: (a: number, b: number) => void; readonly controlled_swap_root: (a: number, b: number, c: number) => void; readonly controlled_controlled_swap_root: (a: number, b: number, c: number, d: number) => void; readonly swap_root_same_step: (a: number, b: number) => void; readonly controlled_swap_root_same_step: (a: number, b: number, c: number) => void; readonly controlled_controlled_swap_root_same_step: (a: number, b: number, c: number, d: number) => void; readonly swap_root_same_step_classically_controlled: (a: number, b: number, c: number) => void; readonly swap_root_classically_controlled: (a: number, b: number, c: number) => void; readonly rotation_hadamard: (a: number, b: number) => void; readonly controlled_rotation_hadamard: (a: number, b: number, c: number) => void; readonly controlled_controlled_rotation_hadamard: (a: number, b: number, c: number, d: number) => void; readonly rotation_hadamard_same_step: (a: number, b: number) => void; readonly controlled_rotation_hadamard_same_step: (a: number, b: number, c: number) => void; readonly controlled_controlled_rotation_hadamard_same_step: (a: number, b: number, c: number, d: number) => void; readonly rotation_hadamard_same_step_classically_controlled: (a: number, b: number, c: number) => void; readonly rotation_hadamard_classically_controlled: (a: number, b: number, c: number) => void; readonly rotation_pauli_x: (a: number, b: number) => void; readonly controlled_rotation_pauli_x: (a: number, b: number, c: number) => void; readonly controlled_controlled_rotation_pauli_x: (a: number, b: number, c: number, d: number) => void; readonly rotation_pauli_x_same_step: (a: number, b: number) => void; readonly controlled_rotation_pauli_x_same_step: (a: number, b: number, c: number) => void; readonly controlled_controlled_rotation_pauli_x_same_step: (a: number, b: number, c: number, d: number) => void; readonly rotation_pauli_x_same_step_classically_controlled: (a: number, b: number, c: number) => void; readonly rotation_pauli_x_classically_controlled: (a: number, b: number, c: number) => void; readonly rotation_pauli_y: (a: number, b: number) => void; readonly controlled_rotation_pauli_y: (a: number, b: number, c: number) => void; readonly controlled_controlled_rotation_pauli_y: (a: number, b: number, c: number, d: number) => void; readonly rotation_pauli_y_same_step: (a: number, b: number) => void; readonly controlled_rotation_pauli_y_same_step: (a: number, b: number, c: number) => void; readonly controlled_controlled_rotation_pauli_y_same_step: (a: number, b: number, c: number, d: number) => void; readonly rotation_pauli_y_same_step_classically_controlled: (a: number, b: number, c: number) => void; readonly rotation_pauli_y_classically_controlled: (a: number, b: number, c: number) => void; readonly rotation_pauli_z: (a: number, b: number) => void; readonly controlled_rotation_pauli_z: (a: number, b: number, c: number) => void; readonly controlled_controlled_rotation_pauli_z: (a: number, b: number, c: number, d: number) => void; readonly rotation_pauli_z_same_step: (a: number, b: number) => void; readonly controlled_rotation_pauli_z_same_step: (a: number, b: number, c: number) => void; readonly controlled_controlled_rotation_pauli_z_same_step: (a: number, b: number, c: number, d: number) => void; readonly rotation_pauli_z_same_step_classically_controlled: (a: number, b: number, c: number) => void; readonly rotation_pauli_z_classically_controlled: (a: number, b: number, c: number) => void; readonly rotation_x: (a: number, b: number) => void; readonly controlled_rotation_x: (a: number, b: number, c: number) => void; readonly controlled_controlled_rotation_x: (a: number, b: number, c: number, d: number) => void; readonly rotation_x_same_step: (a: number, b: number) => void; readonly controlled_rotation_x_same_step: (a: number, b: number, c: number) => void; readonly controlled_controlled_rotation_x_same_step: (a: number, b: number, c: number, d: number) => void; readonly rotation_x_same_step_classically_controlled: (a: number, b: number, c: number) => void; readonly rotation_x_classically_controlled: (a: number, b: number, c: number) => void; readonly rotation_y: (a: number, b: number) => void; readonly controlled_rotation_y: (a: number, b: number, c: number) => void; readonly controlled_controlled_rotation_y: (a: number, b: number, c: number, d: number) => void; readonly rotation_y_same_step: (a: number, b: number) => void; readonly controlled_rotation_y_same_step: (a: number, b: number, c: number) => void; readonly controlled_controlled_rotation_y_same_step: (a: number, b: number, c: number, d: number) => void; readonly rotation_y_same_step_classically_controlled: (a: number, b: number, c: number) => void; readonly rotation_y_classically_controlled: (a: number, b: number, c: number) => void; readonly rotation_z: (a: number, b: number) => void; readonly controlled_rotation_z: (a: number, b: number, c: number) => void; readonly controlled_controlled_rotation_z: (a: number, b: number, c: number, d: number) => void; readonly rotation_z_same_step: (a: number, b: number) => void; readonly controlled_rotation_z_same_step: (a: number, b: number, c: number) => void; readonly controlled_controlled_rotation_z_same_step: (a: number, b: number, c: number, d: number) => void; readonly rotation_z_same_step_classically_controlled: (a: number, b: number, c: number) => void; readonly rotation_z_classically_controlled: (a: number, b: number, c: number) => void; readonly rotation_swap: (a: number, b: number, c: number) => void; readonly controlled_rotation_swap: (a: number, b: number, c: number, d: number) => void; readonly controlled_controlled_rotation_swap: (a: number, b: number, c: number, d: number, e: number) => void; readonly rotation_swap_same_step: (a: number, b: number, c: number) => void; readonly controlled_rotation_swap_same_step: (a: number, b: number, c: number, d: number) => void; readonly controlled_controlled_rotation_swap_same_step: (a: number, b: number, c: number, d: number, e: number) => void; readonly rotation_swap_same_step_classically_controlled: (a: number, b: number, c: number, d: number) => void; readonly rotation_swap_classically_controlled: (a: number, b: number, c: number, d: number) => void; readonly measurement_x: (a: number, b: number) => void; readonly measurement_y: (a: number, b: number) => void; readonly measurement_z: (a: number, b: number) => void; readonly measurement_x_same_step: (a: number, b: number) => void; readonly measurement_y_same_step: (a: number, b: number) => void; readonly measurement_z_same_step: (a: number, b: number) => void; readonly reset: (a: number) => void; readonly reset_same_step: (a: number) => void; readonly __wbg_quantumregister_free: (a: number) => void; readonly quantumregister_states: (a: number) => number; readonly quantumregister_state: (a: number, b: number) => number; readonly quantumregister_amplitudes: (a: number) => number; readonly quantumregister_probabilities: (a: number) => number; readonly quantumregister_probability: (a: number, b: number) => number; readonly __wbg_classicalregister_free: (a: number) => void; readonly classicalregister_state: (a: number, b: number) => void; readonly __wbg_wbg_rayon_poolbuilder_free: (a: number) => void; readonly wbg_rayon_poolbuilder_numThreads: (a: number) => number; readonly wbg_rayon_poolbuilder_receiver: (a: number) => number; readonly wbg_rayon_poolbuilder_build: (a: number) => void; readonly initThreadPool: (a: number) => number; readonly wbg_rayon_start_worker: (a: number) => void; readonly memory: WebAssembly.Memory; readonly __wbindgen_malloc: (a: number) => number; readonly __wbindgen_realloc: (a: number, b: number, c: number) => number; readonly __wbindgen_add_to_stack_pointer: (a: number) => number; readonly __wbindgen_free: (a: number, b: number) => void; readonly __wbindgen_thread_destroy: () => void; readonly __wbindgen_start: () => void; } /** * Synchronously compiles the given `bytes` and instantiates the WebAssembly module. * * @param {BufferSource} bytes * @param {WebAssembly.Memory} maybe_memory * * @returns {InitOutput} */ export function initSync(bytes: BufferSource, maybe_memory?: WebAssembly.Memory): InitOutput; /** * If `module_or_path` is {RequestInfo} or {URL}, makes a request and * for everything else, calls `WebAssembly.instantiate` directly. * * @param {InitInput | Promise<InitInput>} module_or_path * @param {WebAssembly.Memory} maybe_memory * * @returns {Promise<InitOutput>} */ export default function init (module_or_path?: InitInput | Promise<InitInput>, maybe_memory?: WebAssembly.Memory): Promise<InitOutput>;