TuringQ / deepquantum

DeepQuantum for quantum computing
https://deepquantum.turingq.com/
Apache License 2.0
31 stars 7 forks source link

Support batched Fock basis states for Fock backend #27

Closed Jooyuza closed 1 month ago

Jooyuza commented 1 month ago

Fock backend now supports batched initial states as input.

As encoding QumodeCircuit parameters with batched data, inputing batched initial states will receive a batched output.

For example, forward function will return a batched unitary matrices(is_prob=None), or a dictionary of output states with batched key values(is_prob=True/False).

Notice

When both initial state and circuit parameters have batch input, the calculation would be one-to-one corresponding. Make sure they have the same batch size:)

Fix

Fix #29