pyriemann_qiskit.classification.QuantumStateDiscriminator

class pyriemann_qiskit.classification.QuantumStateDiscriminator(n_jobs=1)[source]

Quantum state classifier using the Pretty Good Measurement (PGM).

The mental state of the user (class A or B) is modeled as a mixed quantum state (density matrix) rho_c, estimated from training EEG via quantum state tomography. Class priors pi_c are estimated from class frequencies in the training set.

The classifier is a POVM (Positive Operator-Valued Measure) built via the Pretty Good Measurement:

Pi_c = rho_total^{-1/2} (pi_c * rho_c) rho_total^{-1/2}

where rho_total = sum_c pi_c * rho_c is the prior-weighted average state.

The POVM satisfies sum_c Pi_c = I, so scores trace(Pi_c . M) are valid probabilities (non-negative, summing to 1) directly from the Born rule — no softmax needed.

For two classes with equal priors, this approximates the Helstrom measurement (theoretically optimal quantum state discrimination).

Parameters:

n_jobs (int, default=1) – Number of parallel jobs over trials at predict time.

density_matrices_

Per-class density matrices rho_c (trace=1, PSD), estimated via quantum state tomography.

Type:

dict[label -> ndarray (n_channels, n_channels)]

povm_

Per-class POVM elements Pi_c satisfying sum_c Pi_c = I.

Type:

dict[label -> ndarray (n_channels, n_channels)]

priors_

Class prior probabilities estimated from training set frequencies.

Type:

dict[label -> float]

classes_

Unique class labels seen at fit time.

Type:

ndarray

n_channels_

Number of EEG channels.

Type:

int

Notes

Added in version 0.5.0.

Changed in version 0.6.0: Moved to algorithms sub-package

__init__(n_jobs=1)[source]