Qiskit check of the quantum slot#

The quantum belief slot as a Qiskit circuit (cross-check of QuantumSlot).

Each answer is a non-unitary measurement M = U diag(sqrt(L)) U^dagger with ||M|| <= 1. A circuit can only apply unitaries, so M is embedded in the unitary Halmos dilation W = [[M, sqrt(I - M M^dagger)], [sqrt(I - M^dagger M), -M^dagger]] acting on the objects (two qubits hold three objects and a spare level) plus one ancilla qubit per answer; the answer is accepted when every ancilla reads 0. This reproduces the NumPy slot exactly on a simulator; it adds no speed or accuracy, and it is not run on hardware. It needs the optional qiskit package.

Functions

qiskit_posterior

Posterior over the objects of one sequence from a Qiskit circuit; g0, L, ctx, mask as for slot.posterior with one row.

qiskit_posterior(slot, g0, L, ctx, mask)[source]#

Posterior over the objects of one sequence from a Qiskit circuit; g0, L, ctx, mask as for slot.posterior with one row.