qns.models.core package

Submodules

qns.models.core.backend module

class qns.models.core.backend.QuantumModel[source]

Bases: object

The interface to present the backend models, including qubit, epr and other models.

measure_error_model(decoherence_rate: Optional[float] = 0, **kwargs)[source]

The error model for measuring a qubit. This function will change the quantum state.

Parameters
  • decoherence_rate (float) – the decoherency rate

  • kwargs – other parameters

operate_error_model(decoherence_rate: Optional[float] = 0, **kwargs)[source]

The error model for operating a qubit. This function will change the quantum state.

Parameters
  • decoherence_rate (float) – the decoherency rate

  • kwargs – other parameters

store_error_model(t: Optional[float] = 0, decoherence_rate: Optional[float] = 0, **kwargs)[source]

The error model for quantum memory. This function will change the quantum state or fidelity according to different backend models.

Parameters
  • t (float) – the time stored in a quantum memory. The unit it second.

  • decoherence_rate (float) – the decoherency rate

  • kwargs – other parameters

transfer_error_model(length: Optional[float] = 0, decoherence_rate: Optional[float] = 0, **kwargs)[source]

The error model for transmitting a qubit in quantum channel. This function will change the quantum state or fidelity according to different backend models.

Parameters
  • length (float) – the length of the channel

  • decoherence_rate (float) – the decoherency rate

  • kwargs – other parameters

Module contents

class qns.models.core.QuantumModel[source]

Bases: object

The interface to present the backend models, including qubit, epr and other models.

measure_error_model(decoherence_rate: Optional[float] = 0, **kwargs)[source]

The error model for measuring a qubit. This function will change the quantum state.

Parameters
  • decoherence_rate (float) – the decoherency rate

  • kwargs – other parameters

operate_error_model(decoherence_rate: Optional[float] = 0, **kwargs)[source]

The error model for operating a qubit. This function will change the quantum state.

Parameters
  • decoherence_rate (float) – the decoherency rate

  • kwargs – other parameters

store_error_model(t: Optional[float] = 0, decoherence_rate: Optional[float] = 0, **kwargs)[source]

The error model for quantum memory. This function will change the quantum state or fidelity according to different backend models.

Parameters
  • t (float) – the time stored in a quantum memory. The unit it second.

  • decoherence_rate (float) – the decoherency rate

  • kwargs – other parameters

transfer_error_model(length: Optional[float] = 0, decoherence_rate: Optional[float] = 0, **kwargs)[source]

The error model for transmitting a qubit in quantum channel. This function will change the quantum state or fidelity according to different backend models.

Parameters
  • length (float) – the length of the channel

  • decoherence_rate (float) – the decoherency rate

  • kwargs – other parameters