qibotn.backends package#

Submodules#

qibotn.backends.cutensornet module#

class qibotn.backends.cutensornet.CuTensorNet(runcard)#

Bases: NumpyBackend

apply_gate(gate, state, nqubits)#

Apply a gate to state vector.

apply_gate_density_matrix(gate, state, nqubits)#

Apply a gate to density matrix.

assign_measurements(measurement_map, circuit_result)#
cuda_type(dtype='complex64')#
execute_circuit(circuit, initial_state=None, nshots=None, return_array=False)#

Executes a quantum circuit.

Parameters:
  • circuit (qibo.models.circuit.Circuit) – Circuit to execute.

  • initial_state (qibo.models.circuit.Circuit) – Circuit to prepare the initial state. If None the default |00...0> state is used.

Returns:

set_precision(precision)#

Set complex number precision.

Parameters:

precision (str) – ‘single’ or ‘double’.

qibotn.backends.quimb module#

class qibotn.backends.quimb.QuimbBackend(runcard)#

Bases: NumpyBackend

apply_gate(gate, state, nqubits)#

Apply a gate to state vector.

apply_gate_density_matrix(gate, state, nqubits)#

Apply a gate to density matrix.

assign_measurements(measurement_map, circuit_result)#
execute_circuit(circuit, initial_state=None, nshots=None, return_array=False)#

Executes a quantum circuit.

Parameters:
  • circuit (qibo.models.circuit.Circuit) – Circuit to execute.

  • initial_state (qibo.models.circuit.Circuit) – Circuit to prepare the initial state. If None the default |00...0> state is used.

Returns:

set_precision(precision)#

Set complex number precision.

Parameters:

precision (str) – ‘single’ or ‘double’.