BosonicLinearMapper#
- class BosonicLinearMapper(max_occupation)[ソース]#
ベースクラス:
BosonicMapper
The Linear boson-to-qubit mapping.
This mapper generates a linear encoding of the Bosonic operator \(b_k^\dagger, b_k\) to qubit operators (linear combinations of pauli strings). In this linear encoding each bosonic mode is represented via \(n_k^{max} + 1\) qubits, where \(n_k^{max}\) is the max occupation of the mode (meaning the number of states used in the expansion of the mode, or equivalently the state at which the maximum excitation can take place). The mode \(|k\rangle\) is then mapped to the occupation number vector \(|0_{n_k^{max}}, 0_{n_k^{max} - 1},..., 0_{n_k + 1}, 1_{n_k}, 0_{n_k - 1},..., 0_{0_k}\rangle\)
It implements the formula in Section II.C of Reference [1]:
\[b_k^\dagger = \sum_{n_k =0}^{n_k^{max}-1}(\sqrt{n_k +1}\sigma_{n_k}^{+}\sigma_{n_k + 1}^{-})\]from \(n_k = 0\) to \(n_k^{max} + 1\) where \(n_k^{max}\) is the maximum occupation (defined by the user). In the following implementation, we explicit the operators \(\sigma^+\) and \(\sigma^-\) with the Pauli matrices:
\[ \begin{align}\begin{aligned}\sigma_{n_k}^+ := S_j^+ = 0.5 * (X_j + \textit{i}Y_j)\\\sigma_{n_k}^- := S_j^- = 0.5 * (X_j - \textit{i}Y_j)\end{aligned}\end{align} \]The length of the qubit register is:
BosonicOp.num_modes * (BosonicLinearMapper.max_occupation + 1)
To use this mapper one can for example:
from qiskit_nature.second_q.mappers import BosonicLinearMapper from qiskit_nature.second_q.operators import BosonicOp mapper = BosonicLinearMapper(max_occupation=1) qubit_op = mapper.map(BosonicOp({'+_0 -_0': 1}, num_modes=1))
注釈
Since this mapper truncates the maximum occupation of a bosonic state as represented in the qubit register, the commutation relation after the mapping differ from the standard ones. Please refer to Section 4, equation 22 of Reference [2] for more details
参照
[1] A. Miessen et al., Quantum algorithms for quantum dynamics: A performance study on the spin-boson model, Phys. Rev. Research 3, 043212. https://link.aps.org/doi/10.1103/PhysRevResearch.3.043212
[2] R. Somma et al., Quantum Simulations of Physics Problems, Arxiv https://doi.org/10.48550/arXiv.quant-ph/0304063
- パラメータ:
max_occupation (int) – defines the excitation space of the k-th bosonic state. Together with the number of modes required to represent the bosonic operator, it defines the minimum length of the qubit register. The minimum value is 1.
Attributes
- max_occupation#
The maximum occupation of any bosonic state.
Methods
- map(second_q_ops, *, register_length=None)#
Maps a second quantized operator or a list, dict of second quantized operators based on the current mapper.
- パラメータ:
second_q_ops (BosonicOp | List[BosonicOp | None] | Dict[str, BosonicOp]) – A second quantized operator, or list thereof.
register_length (int | None) – when provided, this will be used to overwrite the
register_length
attribute of theSparseLabelOp
being mapped. This is possible because theregister_length
is considered a lower bound in aSparseLabelOp
.
- 戻り値:
A qubit operator in the form of a
SparsePauliOp
, or list (resp. dict) thereof if a list (resp. dict) of second quantized operators was supplied.- 戻り値の型:
SparsePauliOp | List[SparsePauliOp | None] | Dict[str, SparsePauliOp]
- classmethod mode_based_mapping(second_q_op, register_length=None)#
Utility method to map a
SparseLabelOp
to a qubit operator using a pauli table.- パラメータ:
second_q_op (SparseLabelOp) – the SparseLabelOp to be mapped.
register_length (int | None) – when provided, this will be used to overwrite the
register_length
attribute of the operator being mapped. This is possible because theregister_length
is considered a lower bound.
- 戻り値:
The qubit operator corresponding to the problem-Hamiltonian in the qubit space.
- 例外:
QiskitNatureError – If number length of pauli table does not match the number of operator modes, or if the operator has unexpected label content
- 戻り値の型:
- classmethod pauli_table(register_length)#
Generates a Pauli-lookup table mapping from modes to pauli pairs.
The generated table is processed by
QubitMapper.sparse_pauli_operators()
.- パラメータ:
register_length (int) – the register length for which to generate the table.
- 戻り値:
A list of tuples in which the first and second Pauli operator the real and imaginary Pauli strings, respectively.
- 戻り値の型:
list[tuple[qiskit.quantum_info.operators.symplectic.pauli.Pauli, qiskit.quantum_info.operators.symplectic.pauli.Pauli]]
- classmethod sparse_pauli_operators(register_length)#
Generates the cached
SparsePauliOp
terms.This uses
QubitMapper.pauli_table()
to construct a list of operators used to translate the second-quantization symbols into qubit operators.- パラメータ:
register_length (int) – the register length for which to generate the operators.
- 戻り値:
Two lists stored in a tuple, consisting of the creation and annihilation operators, applied on the individual modes.
- 戻り値の型:
tuple[list[qiskit.quantum_info.operators.symplectic.sparse_pauli_op.SparsePauliOp], list[qiskit.quantum_info.operators.symplectic.sparse_pauli_op.SparsePauliOp]]