qoqo.operations.PragmaGeneralNoise

class qoqo.operations.PragmaGeneralNoise

The general noise PRAGMA operation.

This PRAGMA operation applies a noise term according to the given operators.

Parameters:
  • qubit (int) – The qubit the PRAGMA operation is applied to.

  • gate_time (CalculatorFloat) – The time (in seconds) the gate takes to be applied to the qubit on the (simulated) hardware

  • Rates – The rates representing the general noise matrix M (a 3x3 matrix as 2d array).

__init__()

Methods

__init__()

gate_time()

Return the gate_time of the PRAGMA operation.

hqslang()

Return hqslang name of the operation.

involved_qubits()

List all involved qubits.

is_parametrized()

Return true when the operation has symbolic parameters.

qubit()

Return the qubit on which the PRAGMA operation is applied.

rates()

Return the rates of the PRAGMA operation.

remap_qubits(mapping)

Remap qubits in a clone of the PRAGMA operation.

substitute_parameters(substitution_parameters)

Substitute the symbolic parameters in a clone of the PRAGMA operation according to the input.

superoperator()

Return the superoperator of the PRAGMA operation.

tags()

Return tags classifying the type of the operation.

gate_time()

Return the gate_time of the PRAGMA operation.

Returns:

The gate time of the PRAGMA operation.

Return type:

CalculatorFloat

hqslang()

Return hqslang name of the operation.

Returns:

The hqslang name of the operation.

Return type:

str

involved_qubits()

List all involved qubits.

Returns:

The involved qubits of the PRAGMA operation.

Return type:

set[int]

is_parametrized()

Return true when the operation has symbolic parameters.

Returns:

True if the operation contains symbolic parameters, False if it does not.

Return type:

is_parametrized (bool)

qubit()

Return the qubit on which the PRAGMA operation is applied.

Returns:

The qubit of the PRAGMA operation.

Return type:

int

rates()

Return the rates of the PRAGMA operation.

Returns:

The rates of the PRAGMA operation.

Return type:

np.ndarray

remap_qubits(mapping)

Remap qubits in a clone of the PRAGMA operation.

Parameters:

mapping (dict[int, int]) – The dictionary containing the {qubit: qubit} mapping to use in the PRAGMA operation.

Returns:

The PRAGMA operation with the qubits remapped.

Return type:

self

Raises:

RuntimeError – The qubit remapping failed.

substitute_parameters(substitution_parameters)

Substitute the symbolic parameters in a clone of the PRAGMA operation according to the input.

Parameters:

substitution_parameters (dict[str, float]) – The dictionary containing the substitutions to use in the PRAGMA operation.

Returns:

The PRAGMA operation with the parameters substituted.

Return type:

self

Raises:

RuntimeError – The parameter substitution failed.

superoperator()

Return the superoperator of the PRAGMA operation.

Returns:

The matrix form of the superoperator of the PRAGMA operation.

Return type:

np.ndarray

tags()

Return tags classifying the type of the operation.

Used for the type based dispatch in ffi interfaces.

Returns:

The tags of the Operation.

Return type:

list[str]