Header menu logo Encodings

MajoranaEncoding Module

 Generic fermion-to-qubit encoding via Majorana decomposition.

 Every encoding in this family maps a single fermionic ladder operator
 to a pair of Majorana operators (c, d) built from three index sets:

   U(j, n)  — update set:     qubits that flip when occupation of mode j changes
   P(j)     — parity set:     qubits encoding the parity n₀ ⊕ … ⊕ n_{j−1}
   Occ(j)   — occupation set: qubits encoding whether mode j is occupied

 The Majorana operators are:
   c_j = X_{U(j)∪{j}} · Z_{P(j)}
   d_j = Y_j · X_{U(j)} · Z_{(P(j)⊕Occ(j))∖{j}}

 And the ladder operators follow:
   a†_j = ½(c_j − i·d_j)     a_j = ½(c_j + i·d_j)

 Different choices of index-set functions yield different encodings:
   Jordan-Wigner :  U = ∅,              P = {0…j−1},     Occ = {j}
   Parity        :  U = {j+1…n−1},      P = {j−1}?,      Occ = {j−1,j}?
   Bravyi-Kitaev :  U, P, Occ from Fenwick tree structure

Types

Type Description

EncodingScheme

Defines the three index-set functions that characterise an encoding.

Functions and values

Function or value Description

bravyiKitaevScheme

Full Usage: bravyiKitaevScheme

Returns: EncodingScheme

Bravyi-Kitaev: index sets from the Fenwick tree.

Returns: EncodingScheme

cMajorana scheme j n

Full Usage: cMajorana scheme j n

Parameters:
Returns: (int * Pauli) list

c Majorana: X on {j} ∪ U(j), Z on P(j).

scheme : EncodingScheme
j : int
n : int
Returns: (int * Pauli) list

dMajorana scheme j n

Full Usage: dMajorana scheme j n

Parameters:
Returns: (int * Pauli) list

d Majorana: Y on j, X on U(j), Z on (P(j) ⊕ Occ(j)) \ {j}.

scheme : EncodingScheme
j : int
n : int
Returns: (int * Pauli) list

encodeOperator scheme op j n

Full Usage: encodeOperator scheme op j n

Parameters:
Returns: PauliRegisterSequence
 Encode a single ladder operator using the given scheme.

   a†_j = ½ c_j − ½i d_j
   a_j  = ½ c_j + ½i d_j
scheme : EncodingScheme
op : LadderOperatorUnit
j : uint32
n : uint32
Returns: PauliRegisterSequence

jordanWignerScheme

Full Usage: jordanWignerScheme

Returns: EncodingScheme

Jordan-Wigner: U = ∅, P = {0 … j−1}, Occ = {j}.

Returns: EncodingScheme

parityScheme

Full Usage: parityScheme

Returns: EncodingScheme

Parity: U = {j+1 … n−1}, P = {j−1} if j>0 else ∅, Occ = {j−1, j} if j>0 else {j}.

Returns: EncodingScheme

parityTerms op j n

Full Usage: parityTerms op j n

Parameters:
Returns: PauliRegisterSequence

Encode a ladder operator using the Parity encoding.

op : LadderOperatorUnit
j : uint32
n : uint32
Returns: PauliRegisterSequence

pauliOfAssignments n assignments coeff

Full Usage: pauliOfAssignments n assignments coeff

Parameters:
Returns: PauliRegister

Build a PauliRegister of width n from a sparse assignment list. Qubits not mentioned default to I.

n : int
assignments : (int * Pauli) list
coeff : Complex
Returns: PauliRegister

Type something to start searching.