distributed#
Distributed operations
Functions
|
Apply a gate to a distributed Fock state tensor. |
|
Apply a SWAP operation to a distributed Fock state tensor. |
|
Get the digit of a decimal number at a specific position. |
|
Get the pair rank for communication. |
|
Apply a gate to a Fock state tensor locally. |
|
Apply a SWAP operation to a Fock state tensor locally. |
|
Measure a distributed Fock state tensor. |
- dist_gate(state: DistributedFockState, targets: list[int], matrix: Tensor) DistributedFockState[source]#
Apply a gate to a distributed Fock state tensor.
- dist_swap_gate(state: DistributedFockState, target1: int, target2: int)[source]#
Apply a SWAP operation to a distributed Fock state tensor.
- get_digit(decimal: int, target: int, cutoff: int) int[source]#
Get the digit of a decimal number at a specific position.
- get_pair_rank(rank: int, target_rank: int, new_digit: int, cutoff: int, ndigit: int) int[source]#
Get the pair rank for communication.
- local_gate(state: Tensor, targets: list[int], matrix: Tensor) Tensor[source]#
Apply a gate to a Fock state tensor locally.
- local_swap_gate(state: Tensor, target1: int, target2: int) Tensor[source]#
Apply a SWAP operation to a Fock state tensor locally.
- measure_dist(state: DistributedFockState, shots: int = 1024, with_prob: bool = False, wires: int | list[int] | None = None, block_size: int = 16777216) dict[source]#
Measure a distributed Fock state tensor.