A method for allocating logical qubits of a quantum algorithm to physical qubits of a quantum processor arranged according to a given architecture, said method being computer-implemented and comprising: - the establishment, from said architecture, of a connectivity graph, each node of said graph representing a position of a physical qubit and each link representing a possibility of interaction between two physical qubits; - the establishment, from said quantum algorithm, of a graph of logical operations (G'), each node of said graph representing a logical qubit and each link of said graph representing a quantum logical gate between two logical qubits; - the assignment of a weight to each logical qubit of said graph of logical operations (G'), determined according to the total number of logical gates involving said logical qubit; - the ranking of logical qubits according to weight; - the allocation of a first logical qubit to a first physical qubit of the quantum processor, said first logical qubit being chosen by a first random choice favoring a logical qubit having the greatest weight; - an iterative procedure for allocating the logical qubits remaining to be allocated comprising: - the selection of candidate logical qubits, said candidate logical qubits being, among the logical qubits remaining to be allocated, logical qubits linked in the graph of logical operations (G') to at least one of the already allocated logical qubits; - the selection of candidate physical qubits, said candidate physical qubits being, among the physical qubits remaining to be allocated, physical qubits linked in the connectivity graph to at least one of the already allocated physical qubits; - for each pair of candidate logical qubit and candidate physical qubit, the calculation of a score, each score being determined, for a possible allocation of said candidate logical qubit to said candidate physical qubit, by the number of logical operations between said candidate logical qubit and the logical qubits already allocated to the physical qubits linked in the connectivity graph to said candidate physical qubit; - the ranking of pairs of candidate logical qubits and candidate physical qubits according to the score; and - the allocation of a logical qubit to a physical qubit, said logical qubit and said physical qubit being selected by a second random selection favoring the candidate logical qubit and the candidate physical qubit of a pair of candidate physical qubit and candidate logical qubit having a higher score among said pairs of candidate logical qubits and candidate physical qubits; - the reproduction of said iterative allocation procedure until the allocation of the last logical qubit remaining to be allocated, thus resulting in producing a configuration for allocating logical qubits of the quantum algorithm to physical qubits of the quantum processor. - the establishment, from said architecture, of a connectivity graph, each node of said graph representing a position of a physical qubit and each link representing a possibility of interaction between two physical qubits; - the establishment, from said quantum algorithm, of a graph of logical operations (G'), each node of said graph representing a logical qubit and each link of said graph representing a quantum logical gate between two logical qubits; - the assignment of a weight to each logical qubit of said graph of logical operations (G'), determined according to the total number of logical gates involving said logical qubit; - the ranking of logical qubits according to weight; - the allocation of a first logical qubit to a first physical qubit of the quantum processor, said first logical qubit being chosen by a first random choice favoring a logical qubit having the greatest weight; - an iterative procedure for allocating the logical qubits remaining to be allocated comprising: - the selection of candidate logical qubits, said candidate logical qubits being, among the logical qubits remaining to be allocated, logical qubits linked in the graph of logical operations (G') to at least one of the already allocated logical qubits; - the selection of candidate physical qubits, said candidate physical qubits being, among the physical qubits remaining to be allocated, physical qubits linked in the connectivity graph to at least one of the already allocated physical qubits; - for each pair of candidate logical qubit and candidate physical qubit, the calculation of a score, each score being determined, for a possible allocation of said candidate logical qubit to said candidate physical qubit, by the number of logical operations between said candidate logical qubit and the logical qubits already allocated to the physical qubits linked in the connectivity graph to said candidate physical qubit; - the ranking of pairs of candidate logical qubits and candidate physical qubits according to the score; and - the allocation of a logical qubit to a physical qubit, said logical qubit and said physical qubit being selected by a second random selection favoring the candidate logical qubit and the candidate physical qubit of a pair of candidate physical qubit and candidate logical qubit having a higher score among said pairs of candidate logical qubits and candidate physical qubits; - the reproduction of said iterative allocation procedure until the allocation of the last logical qubit remaining to be allocated, thus resulting in producing a configuration for allocating logical qubits of the quantum algorithm to physical qubits of the quantum processor.