qubits calculations